Are you sure something this dangerous is really necessary? For one thing,
you’ll probably never get certification for the driver (I’ve been assured
that Microsoft really, really disapproves of this technique).
How do you plan to synchronize access to this shared memory? Note that it
probably involves a kernel call (whoops, slow! Or probably no faster than,
say, DeviceIoControl, ReadFile or WriteFile). How, exactly, do you plan to
“signal” the application that data is ready? IoCompleteRequest works very
well for this. SetEvent less so. And you are still at the mercy of the
scheduler (it is amazing how many programmers think that doing SetEvent
means “the thread will run immediately” when what SetEvent means is “this
thread is now feasible for scheduling”)
Actually, *why* do you say that IOCTL is “slow”? Are you accounting for the
scheduler, for example? What is going to happen when your user thread is
not running because it has either been preempted or has lost its timeslice?
Are you talking about actual kernel overhead, or scheduler delays, or can
you tell? Note that you may be creating a solution that in fact does not
solve the problem you are seeing, just gives you a warm fuzzy feeling that
it looks like some solution you once used in some other context in some
other operating system.
You are asking how to implement a solution without stating the problem you
are trying to solve. There is a perfectly fine bidirectional communication
mechanism between the kernel space and the user space: the IRP. Nice thing
is, you don’t have to add additional synchronization mechanisms to make it
work!
Or is this another example of an embedded realtime programmer trying to make
Windows work like an embedded OS? Every time I get this question in class,
it’s from someone whose background involves an OS that has either “RT”
somewhere in its acronymic name or has an acronymic name that ends in “OS”.
It usually runs without either mapped memory or the concept of user space.
joe
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Raghwendra Kshatriya
Sent: Thursday, December 18, 2008 12:28 AM
To: Windows File Systems Devs Interest List
Subject: {Disarmed} RE: [ntfsd] Query regarding shared memory
Here the objective of doing so is faster data communication between driver
(KERNEL MODE) and win32 application (USER MODE). Currently this we are doing
using IOCTL which is slow and one sided from Win32 —> to—> Driver. Using
share memory I want to update that memory in driver and simply wants to
signal win32 application to read that data.
Raghwendra
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Skywing
Sent: Wednesday, December 17, 2008 10:06 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Query regarding shared memory
Why do you believe that this is necessary? It is almost always not, and it
is extremely easy to introduce subtle security and stability bugs that may
not show up right away with conventional (driver verifier) testing.
- S
From: Suganya Nataraj
Sent: Wednesday, December 17, 2008 03:27
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Query regarding shared memory
Hi Tony,
I need to create a shared memory which will be utilized by
both win32 application and kernal level.
Any changes or inputs given at oneside(either win32 or
kernel level) through shared memory, i should be able to get it at other
side.
So how could I create shared memory and how could I
communicate between the two levels…
http:</http:>
Regards,
http:</http:> Suganya Nataraj | E-Security|Tech Mahindra
Chandivali, Andheri (E), Mumbai-72.
http:</http:> Landline :+91 22 66882000 | Extn : 8092
http:</http:> Mobile: +91 9930244229
http:</http:> MailScanner has detected a possible fraud
attempt from “www.funonthenet.in” claiming to be Email:
xxxxx@techmahindra.com
http:</http:> MailScanner has detected a possible fraud
attempt from “www.funonthenet.in” claiming to be www.techmahindra.com
—
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
============================================================================
================================================
Disclaimer:
This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may
review the policy at http://www.techmahindra.com/Disclaimer.html externally
and http://tim.techmahindra.com/Disclaimer.html internally within Tech
Mahindra.
============================================================================
================================================
—
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
–
This message has been scanned for viruses and
dangerous content by http:</http:> MailScanner, and is
believed to be clean.
============================================================================
================================================
Disclaimer:
This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may
review the policy at http://www.techmahindra.com/Disclaimer.html externally
and http://tim.techmahindra.com/Disclaimer.html internally within Tech
Mahindra.
============================================================================
================================================