Hi,
I am calling MmGetSystemAddressForMdl at DISPATCH_LEVEL in an arbitrary
thread context.
The following flags are set in MDL before calling the function:
MDL_PAGES_LOCKED
MDL_WRITE_OPERATION
I am seeing driver is working ok with this.
I would like to know if this correct.
Please give your suggestion.
Thanks
with regards
Prasanna Kumar VV
Please use MmGetSystemAddressForMdlSafe() - the ‘unsafe’ version is
deprecated (that one can bugcheck if NT can’t get enough system PTEs to
map the pages, for instance, instead of failing gracefully)
Yes the above API is safe to be called at DISPATCH_LEVEL if the pages
are locked down
Ravi
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: Prasanna Kumar V V [mailto:xxxxx@tataelxsi.co.in]
Sent: Monday, July 01, 2002 8:48 AM
To: File Systems Developers
Subject: [ntfsd] MmGetSystemAddressForMdl call at DISPATCH_LEVEL
Hi,
I am calling MmGetSystemAddressForMdl at DISPATCH_LEVEL in an arbitrary
thread context. The following flags are set in MDL before calling the
function:
MDL_PAGES_LOCKED
MDL_WRITE_OPERATION
I am seeing driver is working ok with this.
I would like to know if this correct.
Please give your suggestion.
Thanks
with regards
Prasanna Kumar VV
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%
One thing that people forget is that most of us still need to support
NT4, and so cannot use such functions.
Is there ANY difference between the two, actually? (except the PTE
case).
Ravisankar Pudipeddi wrote:
Please use MmGetSystemAddressForMdlSafe() - the ‘unsafe’ version is
deprecated (that one can bugcheck if NT can’t get enough system PTEs to
map the pages, for instance, instead of failing gracefully)
Yes the above API is safe to be called at DISPATCH_LEVEL if the pages
are locked down
–
Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa Registry Monitor - Registry monitoring library for Win32 developers.
Alfa Registry Protector - Registry protection library for Win32 developers.
Both are macros.One is using a call to MmMapLockedPaged , while
MmGetSystemAddressForMdlSafe()
resorts to MmMapLockedPagesSpecifyCache, called with MmCached and
BugcheckOnFailure set to false.
Dan
----- Original Message -----
From: “Dejan Maksimovic”
To: “File Systems Developers”
Sent: Monday, July 01, 2002 8:33 PM
Subject: [ntfsd] RE: MmGetSystemAddressForMdl call at DISPATCH_LEVEL
>
> One thing that people forget is that most of us still need to support
> NT4, and so cannot use such functions.
> Is there ANY difference between the two, actually? (except the PTE
> case).
>
> Ravisankar Pudipeddi wrote:
>
> > Please use MmGetSystemAddressForMdlSafe() - the ‘unsafe’ version is
> > deprecated (that one can bugcheck if NT can’t get enough system PTEs to
> > map the pages, for instance, instead of failing gracefully)
> > Yes the above API is safe to be called at DISPATCH_LEVEL if the pages
> > are locked down
>
> –
> Kind regards, Dejan M. www.alfasp.com
> E-mail: xxxxx@alfasp.com ICQ#: 56570367
> Alfa File Monitor - File monitoring library for Win32 developers.
> Alfa File Protector - File protection and hiding library for Win32
> developers.
> Alfa Registry Monitor - Registry monitoring library for Win32 developers.
> Alfa Registry Protector - Registry protection library for Win32
developers.
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>
Yes, and I meant what the difference is, if any - aside from the bug check
part.
Dan Partelly wrote:
Both are macros.One is using a call to MmMapLockedPaged , while
MmGetSystemAddressForMdlSafe() resorts to MmMapLockedPagesSpecifyCache,
called with MmCached and BugcheckOnFailure set to false.
–
Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa Registry Monitor - Registry monitoring library for Win32 developers.
Alfa Registry Protector - Registry protection library for Win32 developers.
Like none, maybe except for the priority part which can be specified in
MmGetSystemAddressForMdlSafe().
MmMapLockedPages is just a thin wrapper above MmMapLockedPagesSpecifyCache
and calls it with
a HighPagePriority, MmCached, and the bucheck thingie set to true.
So no relevant differences.
----- Original Message -----
From: “Dejan Maksimovic”
To: “File Systems Developers”
Sent: Monday, July 01, 2002 9:53 PM
Subject: [ntfsd] RE: MmGetSystemAddressForMdl call at DISPATCH_LEVEL
>
> Yes, and I meant what the difference is, if any - aside from the bug
check
> part.
>
> Dan Partelly wrote:
>
> > Both are macros.One is using a call to MmMapLockedPaged , while
> > MmGetSystemAddressForMdlSafe() resorts to MmMapLockedPagesSpecifyCache,
> > called with MmCached and BugcheckOnFailure set to false.
> >
>
> –
> Kind regards, Dejan M. www.alfasp.com
> E-mail: xxxxx@alfasp.com ICQ#: 56570367
> Alfa File Monitor - File monitoring library for Win32 developers.
> Alfa File Protector - File protection and hiding library for Win32
developers.
> Alfa Registry Monitor - Registry monitoring library for Win32 developers.
> Alfa Registry Protector - Registry protection library for Win32
developers.
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>
> One thing that people forget is that most of us still need to
support
NT4, and so cannot use such functions.
You can IIRC emulate MmGetSystemAddressForMdlSafe on NT4 by using
MDL_MAPPING_CAN_FAIL flag.
Max
The problem is that the filter that CALL
MmGetSystemAddressForMdlSafe must be built with the 2K/XP DDK and that
will cause it not to function on NT.
“Maxim S. Shatskih” wrote:
> One thing that people forget is that most of us still need to
support
> NT4, and so cannot use such functions.
You can IIRC emulate MmGetSystemAddressForMdlSafe on NT4 by using
MDL_MAPPING_CAN_FAIL flag.
–
Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa Registry Monitor - Registry monitoring library for Win32
developers.
Alfa Registry Protector - Registry protection library for Win32
developers.