public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Kernel page table and module text
@ 2005-04-18  6:20 Allison
  2005-04-18  6:31 ` Chris Wedgwood
  0 siblings, 1 reply; 7+ messages in thread
From: Allison @ 2005-04-18  6:20 UTC (permalink / raw)
  To: linux-kernel

Hi,

Since module is loaded in non-contiguous memory, there has to be an
entry in the kernel page table for all modules that are loaded on the
system. I am trying to find entries corresponding to my module text in
the page tables.

I am not clear about how the kernel page table is organized after the
system switches to protected mode.

I printed out the page starting with swapper_pg_dir . But I do not
find the addresses for all the modules loaded in the system.

Do I still need to read the pg0 and pg1 pages ?

If somebody can explain how to traverse the kernel page tables, that
would be very helpful.

thanks,
Allison

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: Kernel page table and module text
@ 2005-04-18 16:17 Aleksey Gorelov
  0 siblings, 0 replies; 7+ messages in thread
From: Aleksey Gorelov @ 2005-04-18 16:17 UTC (permalink / raw)
  To: Allison, linux-kernel

>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org 
>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Allison
>Sent: Sunday, April 17, 2005 11:21 PM
>To: linux-kernel@vger.kernel.org
>Subject: Kernel page table and module text
>
>Hi,
>
>Since module is loaded in non-contiguous memory, there has to be an
>entry in the kernel page table for all modules that are loaded on the
>system. I am trying to find entries corresponding to my module text in
>the page tables.
>
>I am not clear about how the kernel page table is organized after the
>system switches to protected mode.
>
>I printed out the page starting with swapper_pg_dir . But I do not
>find the addresses for all the modules loaded in the system.
>
>Do I still need to read the pg0 and pg1 pages ?
>
>If somebody can explain how to traverse the kernel page tables, that
>would be very helpful.
>
>thanks,
>Allison
>-
>To unsubscribe from this list: send the line "unsubscribe 
>linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>

You can find some details here: 
http://www.csn.ul.ie/~mel/projects/vm/guide/pdf/understand.pdf

But whatever your purpose is, I doubt you would want to use PTEs.

Aleks.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Kernel page table and module text
@ 2005-04-19 19:09 Allison
  2005-04-20  0:16 ` Dave Airlie
  0 siblings, 1 reply; 7+ messages in thread
From: Allison @ 2005-04-19 19:09 UTC (permalink / raw)
  To: linux-kernel

I want to do the following.

I want to find where each module is loaded in memory by traversing the
module list . Once I have the address and the size of the module, I
want to read the bytes in memory of the module and hash it to check
it's integrity.

How do I,
1. Traverse the module list and find it's address
2. Read the kernel page table to find the physical address of the
module location

thanks,
Allison


Allison wrote:
> Hi,
> 
> Since module is loaded in non-contiguous memory, there has to be an
> entry in the kernel page table for all modules that are loaded on the
> system. I am trying to find entries corresponding to my module text in
> the page tables.
> 
> I am not clear about how the kernel page table is organized after the
> system switches to protected mode.
> 
> I printed out the page starting with swapper_pg_dir . But I do not
> find the addresses for all the modules loaded in the system.
> 
> Do I still need to read the pg0 and pg1 pages ?
> 
> If somebody can explain how to traverse the kernel page tables, that
> would be very helpful.
> 
> thanks,
> Allison
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <3V6qt-2ve-9@gated-at.bofh.it>]

end of thread, other threads:[~2005-04-21  0:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18  6:20 Kernel page table and module text Allison
2005-04-18  6:31 ` Chris Wedgwood
  -- strict thread matches above, loose matches on Subject: below --
2005-04-18 16:17 Aleksey Gorelov
2005-04-19 19:09 Allison
2005-04-20  0:16 ` Dave Airlie
     [not found] <3V6qt-2ve-9@gated-at.bofh.it>
2005-04-20 17:37 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-21  0:54   ` Dave Airlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox