stephen@datacube.UUCP (02/10/87)
> SUMMARY: Simply using a small memory model is not enough to guarantee > safety of your process. > -------- > Kenneth R. Ballou ARPA: ballou@brahms.berkeley.edu > Department of Mathematics UUCP: ...!ucbvax!brahms!ballou > University of California > Berkeley, California 94720 It is possible to prevent the execution of data by requiring that the code of a process always completely occupies its own 64K segment of memory, with the excess space being filled with NOPs. This absurd scheme would still be unstable, because the garbage PC loaded off the stack could still point to an instruction which was not in the original code because it would not necessarily point to one of the original program's instruction boundaries, i.e.: Original: PC <- 0 0 XX YY ZZ mov ax,YYZZ 3 UU WW ja WW 4 SS nop New PC <- 1 1 YY ZZ UU WW SS jump far zzuu:wwss ( I haven't written 80[123]?8[86] code recently enough to show an actual example ). Stephen Watkins UUCP: ihnp4!datacube!stephen Datacube Inc.; 4 Dearborn Rd.; Peabody, Ma. 01960; 617-535-6644