home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / virus / 3732 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.6 KB

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