Re: [1/2] 2.6.22-rc5: known regressions with patches

Arjan van de Ven
2007-06-20T23:24:52Z

> Kprobes fundamntally disagrees with DEBUG_RODATA, there's no point in
> "working around it". Better just admit it.

that's wrong. KPROBE fundamentally disagrees with TEXT being read only,
which is a 2.6.22 new "feature".. and a buggy one at that.

the real fix would be something like this instead:

--- linux-2.6.22-rc5/arch/x86_64/mm/init.c.org 2007-06-21 04:20:10.000000000 -0700
+++ linux-2.6.22-rc5/arch/x86_64/mm/init.c 2007-06-21 04:21:01.000000000 -0700
@@ -605,6 +605,11 @@ void mark_rodata_ro(void)
if (num_possible_cpus() > 1)
start = (unsigned long)_etext;
#endif
+
+#ifdef CONFIG_KPROBES
+ start = (unsigned long)_etext;
+#endif
+
end = (unsigned long)__end_rodata;
start = (start + PAGE_SIZE - 1) & PAGE_MASK;
end &= PAGE_MASK;