Article View: vmsnet.internals
Article #461Re: Why does this code crash with ACCVIO?
From: jeh
Date: Sun, 13 Dec 1992 04:39
Date: Sun, 13 Dec 1992 04:39
36 lines
2094 bytes
2094 bytes
In article <00964FAA.F91C1440.10804@trex.oscs.montana.edu>, "Michael L. Hitch" <osymh%trex.oscs.montana.edu@MTSUNIX1.BITNET> writes:
> =>
> => > I can manually deposit values at
> => > location pointed to by dest/r0 (using debugger 'deposit *dest=...'),
> => > so it is not a invalid address.
> =>
> => But now for the interesting !
> =>
> => The above test do NOT test what you think it tests at all !
> =>
> => The debugger is capable of depositing values in NOWRT psects !
> ....
> => This little feature has been around for all the VMS versions I have
> => used and can be quite usefull.
> =>
> => I once got the explanation that it is due to the fact, that the NOWRT
> => psect actually means user-mode:readonly and the debugger runs in
> => supervisor-mode !
The debugger does not run in supervisor mode.
NOWRT psects normally cause pages to be protected "UR", which means user (or
any inner mode) read, nobody write.
The debugger can write into such pages the same way your program can: Use the
$SETPRT system service to change the protection mask on the pages of interest
to UW, do your writes, then change them back to UR.
You can do this to any pages mapped by your process as long as they're owned by
user mode, are not shareable (non-CRF) pages defined by a global section, and
several other restrictions (see the System Services Reference Manual).
--- Jamie Hanrahan, Kernel Mode Consulting, San Diego CA
Chair, Programming and Internals Working Group, U.S. DECUS VMS Systems SIG
Internet: jeh@cmkrnl.com, hanrahan@eisner.decus.org, or jeh@crash.cts.com
Uucp: ...{crash,eisner,uunet}!cmkrnl!jeh
Technical Details
Message-ID:
<1992Dec12.203945.960@cmkrnl.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!wupost!usc!elroy.jpl.nasa.gov!decwrl!infopiz!cmkrnl!jehReferences:
<00964FAA.F91C1440.10804@trex.oscs.montana.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!wupost!usc!elroy.jpl.nasa.gov!decwrl!infopiz!cmkrnl!jeh Newsgroups: vmsnet.internals Subject: Re: Why does this code crash with ACCVIO? Message-ID: <1992Dec12.203945.960@cmkrnl.com> From: jeh@cmkrnl.com Date: 12 Dec 92 20:39:45 PST References: <00964FAA.F91C1440.10804@trex.oscs.montana.edu> Organization: Kernel Mode Consulting, San Diego, CA Lines: 36