Messages in this thread | | | Date | Tue, 11 Mar 2008 13:17:14 +0100 | From | Andi Kleen <> | Subject | Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives |
| |
> First, that calling this text_poke implementation to modify text in a > module won't fail. Is virt_to_page(addr) ok if addr is in a vmalloc'ed > area ?
virt_to_page only works on direct mapping addresses, not vmalloc. > > Second, that calling virt_to_page(addr + PAGE_SIZE) won't have > undesirable side-effects if addr happens to be in the last page of an > allocated range. It should be ok for the core kernel text, because it is > followed by the kernel rodata, but I am not certain for modules.
On non vmemmap/none flatmem kernels it could fail yes. But vmalloc/module_alloc is not guaranteed to be continuous so you cannot do that anyways.
-Andi
| |