This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives
- From: Andi Kleen <andi at firstfloor dot org>
- To: Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>
- Cc: pageexec at freemail dot hu, Ingo Molnar <mingo at elte dot hu>, Srinivasa DS <srinivasa at in dot ibm dot com>, Andrew Morton <akpm at linux-foundation dot org>, linux-kernel at vger dot kernel dot org, ananth at in dot ibm dot com, Jim Keniston <jkenisto at us dot ibm dot com>, srikar at linux dot vnet dot ibm dot com, SystemTAP <systemtap at sources dot redhat dot com>, Andi Kleen <andi at firstfloor dot org>, Thomas Gleixner <tglx at linutronix dot de>, Ingo Molnar <mingo at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, Jeremy Fitzhardinge <jeremy at goop dot org>, Arjan van de Ven <arjan at infradead dot org>
- Date: Tue, 11 Mar 2008 13:17:14 +0100
- Subject: Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives
- References: <20080306140105.GC28438@elte.hu> <47D014E1.30964.22A9390F@pageexec.freemail.hu> <20080306172509.GA14284@Krystal>
> 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