Re: Getting Kernel Shared section object name in Appln

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,
I am also doing the same task of allocating the memory in kernel and using
that memory in my application.
The above task has been done by using section objects.

In application , your CreateFileMapping is failing! And that is true also.
It should fail as the memory object has already been created in the driver .

So instead use, OpenFileMapping directly without using CreateFileMapping.



"Chin" <chintin@xxxxxxxxx> wrote in message
news:1157950136.857426.78040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi ,
I need to allocate memory in kernel mode , fill it and then user mode
application has to read from it.

I have created a named section object in kernel space with the name
"\\device\\sharedmemory" using ZwCreateSection function.


But the problem is when I use the function "CreateFileMapping", with
"\\device\\sharedmemory" as its last argument, in user mode application

, it fails to open the section object already created in the kernel
mode.


If I give different name than "\\device\\sharedmemory" in
ZwCreateSection in kernel mode driver, then ZwCreateSection function
fails.


I am not able to figure out the problem .


How to access the kernel mode memory from user mode.


Please help.


Thanking You



.



Relevant Pages

  • 2.6.33 dies on modprobe
    ... The kernel starts up fine and mounts the root-filesystem, ... Freeing unused kernel memory: 408k freed ... # CPUFreq processor drivers ...
    (Linux-Kernel)
  • Re: [PATCH] intel-agp.c: Fix crash when accessing nonexistent GTT entries in i915
    ... has info that 256K is for GTT bar, so max video memory size is 256M. ... IGD DVMT/FIXED MEMORY: 32 MB ... Access kernel.org in iceweasel and the X server will crash. ... Sometimes, the kernel freezes. ...
    (Linux-Kernel)
  • Re: s2disk hang update
    ... This looks like we have run out of memory while creating a new kernel thread ... because the I/O doesn't work at this point). ... Keep 1 MB of memory free so that device drivers can allocate some pages in ...
    (Linux-Kernel)
  • [UNIX] Linux Kernel do_brk() Vulnerablility (Explained)
    ... Get your security news from a reliable source. ... A critical security bug has been found in the Linux kernel 2.4.22 (and ... earlier) memory management subsystem. ... for the code working at the lowest privilege level. ...
    (Securiteam)
  • kernel panic - not syncing: out of memory and no killable processes
    ... Kernel panic - not syncing: Out of memory and no killable processes... ... Re-tune the scheduler latency defaults to decrease worst-case latencies ... # Device Drivers ...
    (Linux-Kernel)