Hi All,
Is it possible to memory map a file in context of a kernel thread.
If yes , then are there any limitations on it.
The context being we need to handle large bitmaps upto 30MB in kernel mode
& write the bitmap to a file.
Thanks & regards.
-Vipul.
Hi,
Yes, it’s possible in the context of the system process(threads created in
kernel).
You just need to create a section in kernel with the pair
ZwCreateSection/ZwMapViewOfSection .
After you have mapped the section you can close the createsection’s handle
since you no longer need it. You can map all the file without worrying for
its length.
See doc to that functions because they are a little complex.
Regards
From: vipul jain
>Reply-To: “Windows File Systems Devs Interest List”
>To: “Windows File Systems Devs Interest List”
>Subject: [ntfsd] mmap a file in kernel mode
>Date: Thu, 17 Nov 2005 18:46:28 +0530
>
>Hi All,
>Is it possible to memory map a file in context of a kernel thread.
>If yes , then are there any limitations on it.
>The context being we need to handle large bitmaps upto 30MB in kernel mode
>& write the bitmap to a file.
>
>Thanks & regards.
>-Vipul.
>
>—
>Questions? First check the IFS FAQ at
>https://www.osronline.com/article.cfm?id=17
>
>You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
>To unsubscribe send a blank email to xxxxx@lists.osr.com
_________________________________________________________________
MSN Messenger 7.5 is now out. Download it for FREE here.
http://messenger.msn.co.uk
Vipul
Just one caution for you… if the file is large enough, for some value of
large enough, which might not be at all large, you might find that there
isnt a long enough contiguous range of virtual addresses in the system
virtual address space to map one view for the entire file.
Cheers
Lyndon
“ken Jelvis” wrote in message news:xxxxx@ntfsd…
> Hi,
> Yes, it’s possible in the context of the system process(threads created in
> kernel).
> You just need to create a section in kernel with the pair
> ZwCreateSection/ZwMapViewOfSection .
> After you have mapped the section you can close the createsection’s handle
> since you no longer need it. You can map all the file without worrying
> for its length.
> See doc to that functions because they are a little complex.
> Regards
>
>>From: vipul jain
>>Reply-To: “Windows File Systems Devs Interest List”
>>To: “Windows File Systems Devs Interest List”
>>Subject: [ntfsd] mmap a file in kernel mode
>>Date: Thu, 17 Nov 2005 18:46:28 +0530
>>
>>Hi All,
>>Is it possible to memory map a file in context of a kernel thread.
>>If yes , then are there any limitations on it.
>>The context being we need to handle large bitmaps upto 30MB in kernel mode
>>& write the bitmap to a file.
>>
>>Thanks & regards.
>>-Vipul.
>>
>>—
>>Questions? First check the IFS FAQ at
>>https://www.osronline.com/article.cfm?id=17
>>
>>You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> _________________________________________________________________
> MSN Messenger 7.5 is now out. Download it for FREE here.
> http://messenger.msn.co.uk
>
>
>
Of course, what you can do is to map the file to the ‘lower’ 2GB of the
system VA space, there isn’t much there. You are limited to accessing it in
the context of the system process though.
Pete
Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
Sent: Thursday, November 17, 2005 7:26 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] mmap a file in kernel mode
Vipul
Just one caution for you… if the file is large enough, for some value of
large enough, which might not be at all large, you might find that there
isnt a long enough contiguous range of virtual addresses in the system
virtual address space to map one view for the entire file.
Cheers
Lyndon
“ken Jelvis” wrote in message news:xxxxx@ntfsd…
> Hi,
> Yes, it’s possible in the context of the system process(threads created in
> kernel).
> You just need to create a section in kernel with the pair
> ZwCreateSection/ZwMapViewOfSection .
> After you have mapped the section you can close the createsection’s handle
> since you no longer need it. You can map all the file without worrying
> for its length.
> See doc to that functions because they are a little complex.
> Regards
>
>>From: vipul jain
>>Reply-To: “Windows File Systems Devs Interest List”
>>To: “Windows File Systems Devs Interest List”
>>Subject: [ntfsd] mmap a file in kernel mode
>>Date: Thu, 17 Nov 2005 18:46:28 +0530
>>
>>Hi All,
>>Is it possible to memory map a file in context of a kernel thread.
>>If yes , then are there any limitations on it.
>>The context being we need to handle large bitmaps upto 30MB in kernel mode
>>& write the bitmap to a file.
>>
>>Thanks & regards.
>>-Vipul.
>>
>>—
>>Questions? First check the IFS FAQ at
>>https://www.osronline.com/article.cfm?id=17
>>
>>You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> _________________________________________________________________
> MSN Messenger 7.5 is now out. Download it for FREE here.
> http://messenger.msn.co.uk
>
>
>
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com