* How-to change a pages pte
@ 2006-10-26 6:58 Wink Saville
0 siblings, 0 replies; only message in thread
From: Wink Saville @ 2006-10-26 6:58 UTC (permalink / raw)
To: linux-kernel
Hello,
I've created a simple device driver that maps a single page of kernel memory into user space using the technique described in chapter 15 (pg 431) of Linux Device Drivers 3rd edition. But I've simplified it further, I map only one page at driver initialization time with a call to get_zeroed_page. When vm_open is called I set vm_flags & vm_page_prot to the values I want and when vm_nopage is called I use virt_to_page to return a struct page*. This seems to working fine on my Intel Core 2 Duo running a x86_64 kernel I've built.
My question is how can I change the protection bits (pte) of the kernel's view of the page returned by get_zeroed_page?
In looking at the kernel sources, the code in mm/mprotect.c such as, change_protection, is the closest to what I think I want, but it works with vm_area_struct's not page_struct's.
Regards,
Wink Saville
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-26 6:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-26 6:58 How-to change a pages pte Wink Saville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox