[PATCH] arm: don't allow CONFIG_DEBUG_SET_MODULE_RONX if CONFIG_JUMP_LABEL is enabled

Rabin Vincent rabin at rab.in
Tue Apr 1 16:21:01 PDT 2014


2014-04-01 20:36 GMT+02:00 Kees Cook <keescook at chromium.org>:
> On Tue, Apr 1, 2014 at 11:03 AM, Laura Abbott <lauraa at codeaurora.org> wrote:
>> On 4/1/2014 3:04 AM, Alexander Holler wrote:
>>> CONFIG_DEBUG_SET_MODULE_RONX sounds like a nice security feature, but
>>> things might fail late (and unexpected) if module code is set to read-only
>>> while CONFIG_JUMP_LABEL is enabled (e.g. modprobe bridge).
>
> Isn't this a ordering problem? I thought jump labels got set up once,
> and then after that, the memory could be made RO?

The code gets patched every time the jump label is enabled/disabled,
i.e. every time the static_key is turned on/off based on
static_key_slow_{inc/dec}()



More information about the linux-arm-kernel mailing list