Re: [PATCH 4/6] ftrace, x86: make kernel text writable only forconversions
From: Ingo Molnar
Date: Mon Feb 23 2009 - 04:03:35 EST
* Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:
> Can you provide numbers to indicate why it's required to be so
> intrusive in the kernel mappings while doing these
> modifications ? I think opening such time window where
> standard code mapping is writeable globally in config RO_DATA
> kernels could open the door to unexpected side-effects, so
> ideally going through the "backdoor" page mapped by text_poke
> seems safer. Given similar performance, I would tend to use a
> text_poke-like approach.
It's not really an issue - this code is only called during
normal operation if the admin does it.
As far as scare mongering goes a "backdoor" page is in fact more
attackable because it's at a more predictable position and due
to text-poke's slowness the window of vulnerability is longer.
Anyway, this is all pretty theoretical and irrelevant. The
purpose of RODATA is mainly to protect against benign/unintended
sources of kernel text corruption. An attacker, if he can modify
arbitrary kernel text address can already modify other critical
data structures to gain access.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/