Determining if PagedPool or NonPagedPool

This may be such a silly question …

Is there a way to test if an address (range of addresses) is
a) in paged pool
b) in nonpaged pool
?

Ralph Shnelvar


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Programatically or while debugging ?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ralph Shnelvar
Sent: Wednesday, November 14, 2001 2:44 PM
To: File Systems Developers
Subject: [ntfsd] Determining if PagedPool or NonPagedPool

This may be such a silly question …

Is there a way to test if an address (range of addresses) is
a) in paged pool
b) in nonpaged pool
?

Ralph Shnelvar


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dear Pavel:

Well, uh, both. :slight_smile:

It would be nice to be able to do something like
ASSERT(isNonPaged(p));

Ralph

On Wed, 14 Nov 2001 18:53:34 +0100, you wrote:

Programatically or while debugging ?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ralph Shnelvar
Sent: Wednesday, November 14, 2001 2:44 PM
To: File Systems Developers
Subject: [ntfsd] Determining if PagedPool or NonPagedPool

This may be such a silly question …

Is there a way to test if an address (range of addresses) is
a) in paged pool
b) in nonpaged pool
?

Ralph Shnelvar


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@dos32.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t believe that this is a trivial task.
Some guessing from the address you see in the debugger
is not so hard, but do it programatically isn’t easy.

But some approximation can be done if the address you want
to check comes from either non-paged or paged pool, but not
from other place. Then you can allocate two block from the two
pools and note their addresses. Then free those blocks and try
to calculate some value in the middle. Below is some kind of
pool and above is the other one. But as I noted previously -
this is something useful for limited usage and should not be
considered as correct definitively.

Maybe this helps you or someone who has already solved it
will come with some better method.

Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ralph Shnelvar
Sent: Wednesday, November 14, 2001 7:14 PM
To: File Systems Developers
Subject: [ntfsd] RE: Determining if PagedPool or NonPagedPool

Dear Pavel:

Well, uh, both. :slight_smile:

It would be nice to be able to do something like
ASSERT(isNonPaged(p));

Ralph

On Wed, 14 Nov 2001 18:53:34 +0100, you wrote:

Programatically or while debugging ?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ralph Shnelvar
Sent: Wednesday, November 14, 2001 2:44 PM
To: File Systems Developers
Subject: [ntfsd] Determining if PagedPool or NonPagedPool

This may be such a silly question …

Is there a way to test if an address (range of addresses) is
a) in paged pool
b) in nonpaged pool
?

Ralph Shnelvar


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@dos32.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I’m curious as to why you need this, and why using the verifier to
ensure your code is doing
the right thing is not sufficient.

-----Original Message-----
From: Ralph Shnelvar [mailto:xxxxx@dos32.com]
Sent: Wednesday, November 14, 2001 10:14 AM
To: File Systems Developers
Subject: [ntfsd] RE: Determining if PagedPool or NonPagedPool

Dear Pavel:

Well, uh, both. :slight_smile:

It would be nice to be able to do something like
ASSERT(isNonPaged(p));

Ralph

On Wed, 14 Nov 2001 18:53:34 +0100, you wrote:

Programatically or while debugging ?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ralph Shnelvar
Sent: Wednesday, November 14, 2001 2:44 PM
To: File Systems Developers
Subject: [ntfsd] Determining if PagedPool or NonPagedPool

This may be such a silly question …

Is there a way to test if an address (range of addresses) is
a) in paged pool
b) in nonpaged pool
?

Ralph Shnelvar


You are currently subscribed to ntfsd as: xxxxx@compelson.com To
unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@dos32.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

There are system variables:

MmPagedPoolStart, MmPagedPoolEnd, MmNonPagedPoolStart,
MmNonPagedPoolExpansionStart, MnNonPagedPoolEnd,
MmSystemCacheStart, MmSystemCacheEnd, MmSystemCacheEnd, …

So you can use them from debuger.

And my question …
Is there any way to use these (and others) system variables from
driver? I haven’t seen any export of them in NTOSKRNL, .LIB file
nor .H from DDK or IFS.

Thanks Ondra.


Nov? vyhled?va? pro ?esk? internet www.webfast.cz - prost? najde …


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dear Ravisankar Pudipeddi:

On Wed, 14 Nov 2001 12:40:54 -0800, you wrote:

I’m curious as to why you need this, and why using the verifier

Verifier??? Do you mean the checked build?

If not, where is the verifier documented?

Ralph Shnelvar

to
ensure your code is doing
the right thing is not sufficient.

Ralph Shnelvar

-----Original Message-----
From: Ralph Shnelvar [mailto:xxxxx@dos32.com]
Sent: Wednesday, November 14, 2001 10:14 AM
To: File Systems Developers
Subject: [ntfsd] RE: Determining if PagedPool or NonPagedPool

Dear Pavel:

Well, uh, both. :slight_smile:

It would be nice to be able to do something like
ASSERT(isNonPaged(p));

Ralph

On Wed, 14 Nov 2001 18:53:34 +0100, you wrote:

>Programatically or while debugging ?
>
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com]On Behalf Of Ralph Shnelvar
>Sent: Wednesday, November 14, 2001 2:44 PM
>To: File Systems Developers
>Subject: [ntfsd] Determining if PagedPool or NonPagedPool
>
>
>This may be such a silly question …
>
>Is there a way to test if an address (range of addresses) is
> a) in paged pool
> b) in nonpaged pool
>?
>
>Ralph Shnelvar
>
>—
>You are currently subscribed to ntfsd as: xxxxx@compelson.com To
>unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@dos32.com
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@dos32.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> If not, where is the verifier documented?

Verifier.EXE in your w2k distro. It does not require checked builds.
Conceptually it is the continuation of GFLAGS utility in NT4 - it switches on some debug modes in the kernel.

Documentation is:
DDK -> Driver Writer’s Guide -> Testing Drivers -> Driver Verifier.

Max


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>>I’m curious as to why you need this, and why using the verifier

Verifier??? Do you mean the checked build?

If not, where is the verifier documented?

Ralph Shnelvar

Raph,
the verifier is included with the DDK. It turns on even more checking of what your driver/filter is up to. It’s an invaluable tool!

Andy.


FREE Personalized E-mail at Mail.com

http://www.mail.com/?sr=signup

Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free!

http://www.net2phone.com/cgi-bin/link.cgi?143


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dear Andy:

On Thu, 15 Nov 2001 14:12:27 +0000, you wrote:

>>I’m curious as to why you need this, and why using the verifier

>Verifier??? Do you mean the checked build?

>If not, where is the verifier documented?

>Ralph Shnelvar

Raph,
the verifier is included with the DDK. It turns on even more checking of what your driver/filter is up to. It’s an invaluable tool!

Found it and ran it.

The random crash I have been experiencing went away. Sigh.

Andy.

Ralph Shnelvar


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com