I've been some hours trying to guess how to do this:
unsigned long pages;
pages = __get_free_pages (1, GFP_KERNEL);
mprotect (pages, 2*PAGE_SIZE, PROT_NONE);
Simply, you can't. Or at best, it'll be difficult, especially because
the kernel maps the bulk of it's address space using large 4MB (or
larger on some architectures) page mappings, also many ports have
special optimizations for the kernel pages or the kernel pages have
not page tables at all and the translation is hard coded in the TLB
miss handlers for high performance.
Later,
David S. Miller
davem@dm.cobaltmicro.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html