Subject: How to access kernel memory?

From: han han <[email-masked]>
Date: Tue, 18 Sep 2001 07:35:04 -0700 (PDT)

Hi, All,

I allocated a block of memory in the kernel space. But
I don't know how to directly access kernel space from
user space. Anyone can help me?

Thanks in advance.

piggie

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

---

From: Zhang Fuxin <[email-masked]>
Date: Tue, 18 Sep 2001 22:52:41 +0800

hi,han han，
   There are several ways.For example:
   1.You can create a character device , implement its mmap function
to map the memory block you allcated.This can be done in a little
kernel module.There are some sample code before.
   2.via /dev/mem,/dev/kmem etc

>user space. Anyone can help me?

Regards
            Zhang Fuxin
            [email-masked]

---

From: Zhang Fuxin <[email-masked]>
Date: Tue, 18 Sep 2001 23:9:53 +0800

hi,Siders, Keith，
   Hehe,I can think of some usage of 'hot-patched': virus or security
daemon,binary code enhancement or some kind of transform,auto parallelize...:)
   But all this could be done through /dev/mem,in theory.

在 2001-09-18 09:59:00 you wrote：
>I have just the opposite requirement. I need to allow any running process
>and its threads to be "hot-patched" with executable code. I know you're
>thinking "why?". I can't tell you that. I can only say  it's a firm
>requirement, and I could use some helpful ideas.
>
>Keith 
>
>-> -----Original Message-----
>-> From: Zhang Fuxin [mailto:[email-masked]]
>-> Sent: Tuesday, September 18, 2001 9:53 AM
>-> To: han han
>-> Cc: [email-masked]
>-> Subject: Re: How to access kernel memory?
>-> 
>-> 
>-> hi,han han，
>->    There are several ways.For example:
>->    1.You can create a character device , implement its mmap function
>-> to map the memory block you allcated.This can be done in a little
>-> kernel module.There are some sample code before.
>->    2.via /dev/mem,/dev/kmem etc
>->    
>-> 
>-> 
>-> 
>-> 在 2001-09-18 07:35:00 you wrote：
>-> >Hi, All,
>-> >
>-> >I allocated a block of memory in the kernel space. But
>-> >I don't know how to directly access kernel space from
>-> >user space. Anyone can help me?
>-> >
>-> >Thanks in advance.
>-> >
>-> >piggie
>-> >
>-> >
>-> >__________________________________________________
>-> >Terrorist Attacks on U.S. - How can you help?
>-> >Donate cash, emergency relief information
>-> >http://dailynews.yahoo.com/fc/US/Emergency_Information/
>-> 
>-> Regards
>->             Zhang Fuxin
>->             [email-masked]
>-> 

Regards
            Zhang Fuxin
            [email-masked]

---

From: han han <[email-masked]>
Date: Tue, 18 Sep 2001 08:15:48 -0700 (PDT)

>    2.via /dev/mem,/dev/kmem etc

If allocating a block memory in the user space. I can
use functions like "map_user_kiobuf()" to lock it in
the physical memory and access it in the kernel space.
Does there exist corresponding methods to give my
application ability to directly access it without
using any kinds of mem/character devices?

> 
> 
> 
> 
> ÔÚ 2001-09-18 07:35:00 you wrote£º
> >Hi, All,
> >

---

From: "Siders, Keith" <[email-masked]>
Date: Tue, 18 Sep 2001 10:15:35 -0500

Thanks. Except for the virus, that sums up the intent. "That's not a bug;
it's a feature...";-)

-> -----Original Message-----
-> From: Zhang Fuxin [mailto:[email-masked]]
-> Sent: Monday, September 17, 2001 1:01 PM
-> To: Siders, Keith
-> Cc: [email-masked]
-> Subject: Re: RE: How to access kernel memory?
-> 
-> 
-> hi,Siders, Keith，
->    Hehe,I can think of some usage of 'hot-patched': virus or security
-> daemon,binary code enhancement or some kind of 
-> transform,auto parallelize...:)
->    But all this could be done through /dev/mem,in theory.
->