Re: [PATCH v3 1/3] jump_label: Explicitly disable jump labels in __init code

From: Josh Poimboeuf
Date: Mon Feb 19 2018 - 07:57:16 EST


On Sun, Feb 18, 2018 at 07:17:19PM -0600, Josh Poimboeuf wrote:
> After initmem has been freed, any jump labels in __init code are
> prevented from being written to by the kernel_text_address() check in
> __jump_label_update(). However, this check is quite broad. If
> kernel_text_address() were to return false for any other reason, the
> jump label write would fail silently with no warning.
>
> For jump labels in module init code, entry->code is set to zero to
> indicate that the entry is disabled. Do the same thing for core kernel
> init code. This makes the behavior more consistent, and will also make
> it more straightforward to detect non-init jump label write failures in
> the next patch.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

NACK

0-day reports this doesn't build with CONFIG_MODULES=n:

init/main.o: In function `kernel_init':
>> main.c:(.ref.text+0x98): undefined reference to `jump_label_invalidate_init'

--
Josh