Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <pageexec@...>
Cc: Ingo Molnar <mingo@...>, Srinivasa DS <srinivasa@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, <ananth@...>, Jim Keniston <jkenisto@...>, <srikar@...>, SystemTAP <systemtap@...>, Andi Kleen <andi@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, H. Peter Anvin <hpa@...>, Jeremy Fitzhardinge <jeremy@...>, Arjan van de Ven <arjan@...>
Date: Thursday, March 6, 2008 - 1:25 pm

* pageexec@freemail.hu (pageexec@freemail.hu) wrote:

I just want to ask for confirmation about two things :

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 ?

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.

If any of these two are not true, then we should add a test for

if (kernel_text_address(addr)) {

around the vmap() allocation and fallback on 

} else
  vaddr = addr;

in the cases where text_poke is called to modify module code.

Mathieu


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86 - Enhance DEBUG_RODATA support - alternatives, Mathieu Desnoyers, (Thu Mar 6, 9:48 am)
Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives, Mathieu Desnoyers, (Thu Mar 6, 1:25 pm)
Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives, Mathieu Desnoyers, (Thu Mar 6, 10:18 am)