How do you probe for validity of a memory buffer from Paged or Nonpaged
pool? Something like we have in Win32 API IsBadReadPtr, IsBadWritePtr?
Something like that.
Thanks,
Naveen K Kohli
How do you probe for validity of a memory buffer from Paged or Nonpaged
pool? Something like we have in Win32 API IsBadReadPtr, IsBadWritePtr?
Something like that.
Thanks,
Naveen K Kohli
If the buffer you wish to probe is a point to user-mode (<2GB) memory,
you can safely access the memory within a __try/__except block after
calling ProbeForRead/ProbeForWrite. An invalid buffer (or >2GB pointer)
will cause an exception to be thrown. If the buffer is kernel-mode
memory, you're out of luck, because attempting to access invalid
kernel-mode memory may result in a bugcheck, which of course cannot be
caught. The NT philosophy is that kernel-mode is a trusted environment
and thus you should trust any buffer pointers that you receive from
other drivers.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Kohli, Naveen
Sent: Wednesday, June 11, 2003 1:27 PM
To: File Systems Developers
Subject: [ntfsd] How to probe for validity of buffer from Paged or
NOn-paged pool
How do you probe for validity of a memory buffer from Paged or Nonpaged
pool? Something like we have in Win32 API IsBadReadPtr, IsBadWritePtr?
Something like that.
You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com