home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / vmsnet / internal / 1680 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  2.0 KB

  1. Path: sparky!uunet!spool.mu.edu!wupost!usc!elroy.jpl.nasa.gov!decwrl!infopiz!cmkrnl!jeh
  2. Newsgroups: vmsnet.internals
  3. Subject: Re: Why does this code crash with ACCVIO?
  4. Message-ID: <1992Dec12.203945.960@cmkrnl.com>
  5. From: jeh@cmkrnl.com
  6. Date: 12 Dec 92 20:39:45 PST
  7. References: <00964FAA.F91C1440.10804@trex.oscs.montana.edu>
  8. Organization: Kernel Mode Consulting, San Diego, CA
  9. Lines: 36
  10.  
  11. In article <00964FAA.F91C1440.10804@trex.oscs.montana.edu>, "Michael L. Hitch" <osymh%trex.oscs.montana.edu@MTSUNIX1.BITNET> writes:
  12. > =>
  13. > => >                                    I can manually deposit values at
  14. > => > location pointed to by dest/r0 (using debugger 'deposit *dest=...'),
  15. > => > so it is not a invalid address.
  16. > =>
  17. > => But now for the interesting !
  18. > =>
  19. > => The above test do NOT test what you think it tests at all !
  20. > =>
  21. > => The debugger is capable of depositing values in NOWRT psects !
  22. > ....
  23. > => This little feature has been around for all the VMS versions I have
  24. > => used and can be quite usefull.
  25. > =>
  26. > => I once got the explanation that it is due to the fact, that the NOWRT
  27. > => psect actually means user-mode:readonly and the debugger runs in
  28. > => supervisor-mode !
  29.  
  30. The debugger does not run in supervisor mode.  
  31.  
  32. NOWRT psects normally cause pages to be protected "UR", which means user (or
  33. any inner mode) read, nobody write.  
  34.  
  35. The debugger can write into such pages the same way your program can:  Use the
  36. $SETPRT system service to change the protection mask on the pages of interest
  37. to UW, do your writes, then change them back to UR.  
  38.  
  39. You can do this to any pages mapped by your process as long as they're owned by
  40. user mode, are not shareable (non-CRF) pages defined by a global section, and
  41. several other restrictions (see the System Services Reference Manual).  
  42.  
  43.     --- Jamie Hanrahan, Kernel Mode Consulting, San Diego CA
  44. Chair, Programming and Internals Working Group, U.S. DECUS VMS Systems SIG 
  45. Internet:  jeh@cmkrnl.com, hanrahan@eisner.decus.org, or jeh@crash.cts.com
  46. Uucp:  ...{crash,eisner,uunet}!cmkrnl!jeh
  47.