Why would you WANT to do this? You’ll break all sorts of useful things.
What are you trying to accomplish? There is probably a way to do what you
want to do, without breaking lots of important functionality.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of poltrone
Sent: Tuesday, July 26, 2005 5:24 PM
To: Windows System Software Devs Interest List
Subject: SPAM-LOW: Re:[ntdev] making handles not inheritable?
Well,
i think i asked the wrong question. It should have been:
How can i detect, that a handle will be inheritable while processing
IRP_MJ_CREATE (so that i could fail IRP_MJ_CREATE) ?
“Arlie Davis” wrote in message news:xxxxx@ntdev… > Why would you WANT to do this? You’ll break all sorts of useful things. > > What are you trying to accomplish? There is probably a way to do what you > want to do, without breaking lots of important functionality. > > – arlie
I just thought it would be nice to be sure that a ‘MmMapLockedPagesSpecifyCache’ and a ‘MmUnmapLockedPages’ for the same piece of memory are called in the same process context
“Arlie Davis” wrote in message > news:xxxxx@ntdev… > >>Why would you WANT to do this? You’ll break all sorts of useful things. >> >>What are you trying to accomplish? There is probably a way to do what you >>want to do, without breaking lots of important functionality. >> >>– arlie > > > I just thought it would be nice to be sure that a > ‘MmMapLockedPagesSpecifyCache’ > and a ‘MmUnmapLockedPages’ for the same piece of memory are called in the > same process context
Ahem…
IIRC, MmUnmapLockedPages does not need to be called from the same process context. In fact, I think it can be called from DISPATCH_LEVEL.
The MDL references the process context for which it is valid.
IIRC, MmUnmapLockedPages does not need to be called from the same process context. In fact, I think it can be called from DISPATCH_LEVEL.
The MDL references the process context for which it is valid.
Again, this is from memory, I’m not 100% sure.
Burk.
Well, in my previous post i didn’t explecitly mentioned that
i use ‘UserMode’ for the parameter ‘AccessMode’ in the call
to MmMapLockedPagesSpecifyCache. And that leads to the statement
about MmUnmapLockedPages in the DDK:
>Ahem…
>
>IIRC, MmUnmapLockedPages does not need to be called from the same process context. In fact, I think it can be called from DISPATCH_LEVEL.
>
>The MDL references the process context for which it is valid.
>
>Again, this is from memory, I’m not 100% sure.
>
>Burk.
>
Well, in my previous post i didn’t explecitly mentioned that
i use ‘UserMode’ for the parameter ‘AccessMode’ in the call
to MmMapLockedPagesSpecifyCache. And that leads to the statement
about MmUnmapLockedPages in the DDK:
Ok, so you’re actually mapping physical memory to userspace. I wasn’t aware of
that.
Well, you’ve just found another reason why it’s not so cool to do that if you
can avoid it