Re: ZwCreateSection
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Fri, 23 Dec 2005 11:46:42 -0500
How are you going to synchronize writes between kernel and user space? Even
if only the application does the writting, how are you going to notify the
driver about the writes? Maybe a better question is why do you think this
is needed? In the last 10+ years of writing Windows NT/2000/XP/2003/Vista
kernel code, I have only seen one use that could be justified for this
technique, all the others (and there were a lot) became faster and more
reliable by using IRP's.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"killme" <killme@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F1F81FB5-D9E3-4410-ACF6-148A4C83E58B@xxxxxxxxxxxxxxxx
> Hi All,
>
> I used ZwCreateSection() to create a section object in a kernel mode
> driver and tried to open the section object using CreateFileMapping() in
> windows. The problem is that both the driver as well as application will
> be
> updating the shared memory. So, when I tried to open the shared memory
> with
> FILE_MAP_WRITE specified in OpenFileMapping(), it returns win32 error code
> 5
> (access denied). It succeeds with the FILE_MAP_READ access. If I use
> ZwClose() in the driver to close the section handle, I am able to use in
> the
> user-mode application.
> Is there any way I can specify in the kernel mode driver to make it
> possible to the user mode application too to write to the shared memory? I
> may be missing some flags in ZwCreateSection() or ZwMapViewOfSection() or
> InitializeObjectAttributes()? Besides writing to same memory from
> user-mode
> and kernel-mode in such scenario can result in any problem ( I suspect)?
>
>
.
- Prev by Date: Re: Filtering disk IO when Windows hibernates
- Next by Date: Re: Pdo creation problem
- Previous by thread: Filtering disk IO when Windows hibernates
- Next by thread: Re: ZwCreateSection
- Index(es):
Relevant Pages
|