[18802] in bugtraq
Re: win32/memory locking (Re: Reply to EFS note on Bugtraq)
daemon@ATHENA.MIT.EDU (Keith Ray)
Thu Jan 25 02:57:49 2001
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Message-Id: <980366547.3a6f34d394167@nullify.org>
Date: Wed, 24 Jan 2001 14:02:27 -0600
Reply-To: Keith Ray <aphex@NULLIFY.ORG>
From: Keith Ray <aphex@NULLIFY.ORG>
To: BUGTRAQ@SECURITYFOCUS.COM
In-Reply-To: <Pine.LNX.4.30.0101240908510.813-100000@grail.dhs.org>
Quoting James Perry <jeperry@UWATERLOO.CA>:
> As described on the MSDN site:
> "The AllocateUserPhysicalPages function is used to allocate physical
> memory. Memory allocated by this function must be physically present
> in
> the system. Once allocated, it is locked down and unavailable to the
> rest
> of the virtual memory management system of Windows 2000."
>
> _http://msdn.microsoft.com/library/psdk/winbase/memman_0u5v.htm_
>
> The UserPhysicalPages class of functions appear to be directly related
> to
> kernel calls, so I'd take a guess and say it's probably what you're
> looking for.
>
> - James Perry
AllocateUserPhysicalPages() is only available on Windows 2000. VirtualAlloc()
with the PAGE_NOCACHE flag is available for Windows NT 3.1+ and Windows 95+.
From the MSDN Library:
PAGE_NOCACHE -
Allows no caching of the committed regions of pages. The hardware attributes
for the physical memory should be specified as "no cache." This is not
recommended for general usage. It is useful for device drivers; for example,
mapping a video frame buffer with no caching. This value is a page protection
modifier, and it is only valid when used with one of the page protections other
than PAGE_NOACCESS.
--------------------------------------------------------------------
Keith Ray aphex@nullify.org
http://www.nullify.org
PGP - 0xAE1B3529 - 8227 60E5 BAA5 9461 CAB3 A6F2 4DFE F573 AE1B 3529