home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!netnews.upenn.edu!netnews.cc.lehigh.edu!news
- From: AMN@vms.brighton.ac.uk (Anthony Naggs)
- Newsgroups: comp.virus
- Subject: Re: Virus Armour
- Message-ID: <0021.9209081605.AA21066@barnabas.cert.org>
- Date: 4 Sep 92 00:16:47 GMT
- Sender: virus-l@lehigh.edu
- Lines: 44
- Approved: news@netnews.cc.lehigh.edu
-
- Suresh Thennarangam, <suresh@papaya.iss.nus.sg>, raises some questions:
- > In the Jan 1992 issue of Virus Bulletin,column Virus Anlysis,
- > James Beckett writes:
- >
- > <> Designers realized some time ago that the efficiency of micro-processors
- > <> can be increased by using the spare bus time to pre-fetch the next few
- > <> bytes of instructions. This has the curious corollary that if the
- > <> memory is modified a very short distance in front of the current
- > <> instruction, the processor never sees the change, as it has already
- > <> read the relevant bytes ........
- >
- > While this seems somewhat plausible I wonder if Intel's chip designers
- > didn't make the 80x86 processors smart enough to detect memory changes
- > in the vicinity of the current instruction and reload the pre-fetch
- > queue in response.
-
- No they don't. This would make the processor much more complicated, as it
- would have to monitor and understand all DMA accesses (including DRAM refresh
- cycles, disk data transfers, ..). And you are asking it throw away
- instructions that are already partly executed, and restart them from
- their original start conditions.
-
- Cache memory, on the other hand, uses techniques such as "bus snooping" to
- ensure that the cache contents are not used if they vary from the real
- memory. It should be noted that the more recent CPUs of most families use
- pipelining, (starting to execute several instructions before earlier ones are
- complete), to help give their increase in speed.
-
- > Well, if not then this is a hazard for programs that modify themselves
- > during runtime.
-
- For most purposes, self modifying programs went out of fashion with the
- Commodore PET, around 1979. (The PET did indeed use a considerable quantity
- of self modifying code, too get the maximum speed of operation).
-
- The only use I have made of self-modifying code was for a magazine article in
- 1989, to identify through software the different members of the 80x86 family.
- This indeed relied in the effect of the CPU pre-fetch in one of its tests.
-
- Yours, Anthony Naggs
- Software/Electronics Engineer P O Box 1080, Peacehaven
- (and virus researcher) East Sussex BN10 8PZ
- Phone: +44 273 589701 Great Britain
- Email: (c/o Univ of Brighton) amn@vms.brighton.ac.uk or xa329@city.ac.uk
-