Mark,
You need to keep in mind here that just because someone opens “the
paging file” it does not mean that they are opening it AS a paging file.
Thus, your comment that this bit is not set (and therefore your
algorithm doesn’t work for checking the bit) just can’t be true - the
Memory Manager calls a special function to open the paging file and that
function sets the bit.
HOWEVER, before that happens, other programs can (and do) open the
paging file for normal I/O. Crash dumps (for example) are written out
to pagefile.sys and the application that saves away the data contents
opens the file but NOT for use as a paging file.
There is no requirement the file be called pagefile.sys and I believe
you can change this in the registry. BUT you should not need to embed a
name to make this work right.
How about this: you just breakpoint every time the file opened is
called “pagefile.sys” and grab the stack backtrace and the flags field
from the I/O Stack location (where SL_OPEN_PAGING_FILE is set). I
believe you will find that at least one of them shows the bit set.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
Looking forward to seeing you at the Next OSR File Systems Class April
4, 2005 in Boston!
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Friday, April 01, 2005 5:12 PM
To: ntfsd redirect
Subject: [ntfsd] I can’t detect page file at boot time
I have a problem with operations on \pagefile.sys at boot time. Many
FltMgr
calls don’t work on this file, they even cause asserts. I would like to
detect that it is a paging file before trying to do anything with it but
I’m
finding that is impossible no matter what I try in any operation.
In create I am supposed to be able to use FlagOn(
Data->Iopb->Parameters->Create->Options, SL_OPEN_PAGING_FILE) but this
is
not working. The Options value is 0x1000028 and SL_OPEN_PAGING_FILE is
0x02. I’ve looked at lots of other Options and Flags values and none
have
this bit set.
Meanwhile FsRtlIsPagingFile returns FALSE on all calls in all pre and
post
operations.
Can someone please help me? I am out of ideas.
Could I reliably assume that the file object name is always
\pagefile.sys ?
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com