Messages in this thread | | | Date | Mon, 23 Feb 2009 10:02:13 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 4/6] ftrace, x86: make kernel text writable only for conversions |
| |
* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> 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
| |