RE: SPAM-LOW: Re:making handles not inheritable?

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) ?

Ciao,
poltrone


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stonestreetone.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

“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 :wink:

ciao,
poltrone

poltrone wrote:

“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 :wink:

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.

>

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:

poltrone

poltrone wrote:

>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 :slight_smile:

Burk.