Re: how can the kernel read from a processes pages ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

On Thu, Jul 3, 2008 at 4:18 AM, Arn <cse.syslab@xxxxxxxxx> wrote:
> Hi,
>
> I want to do the following from a kernel module or kernel code :
>
> Read a byte from any page in physical memory. It doesn't matter if
> that page is being used by a process or not.
>
> From an earlier post someone recommended I use ioremap() to map the
> pages (build page tables) into the kernel and then read a byte from
> the page.
>
> I wanted to know if its ok for the kernel to map to a page that is
> being used by a process ?

if that page is in ZONE_NORMAL, i think you don't need to map it,as
it's already mapped AFAIK. you just need to know its address...if the
address is virtual address of certain process, convert it to physical
address first.

The problem arise if it's high mem pages...you need to kmap or
kmap_atomic() it first...

ANd it's OK to read the page content....maybe you need to grab the
page's lock but I am not sure which one...check page_struct.

CMIIW people..

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux