Re: [PATCH v2 3/3] livepatch: Cleanup module page permission changes
From: Rusty Russell
Date: Sun Nov 08 2015 - 18:01:50 EST
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> writes:
> On Fri, Nov 06, 2015 at 02:42:46PM +0100, Petr Mladek wrote:
>> naming schemes. What about adding into the public API?
>>
>> set_module_ro()
>> set_module_rw()
>>
>> It should modify everything: init, core, text, and data but only
>> the ro/rw flags.
>
> Even that naming is not without its problems. For example,
> set_module_ro() is false advertising -- it wouldn't change *all* module
> memory to be read-only. (It wouldn't touch the r/w data areas.)
>
> But I don't really care what the interfaces are called. It's really
> Rusty's call. I just stuck to the existing naming convention in the
> module code with the set/unset ro_nx stuff.
I'm looking at the ro/nx stuff now, and it seems like a mess. For
example, set_all_modules_text_rw() and set_all_modules_text_ro() use
mod->core_text_size instead of mod->core_ro_size. Which is probably
what they want (ftrace doesn't care about rodata) but pretty damn
confusing.
So I'll extend your cleanup. Expect a patch for testing RSN...
Thanks,
Rusty.
--
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/