diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-06-15 17:41:42 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-06-24 09:48:55 +0200 |
commit | 7e6b9db27de9f69a705c1a046d45882c768e16c3 (patch) | |
tree | 4d17aca7fd1d19374a41639fede3095b1117bb0e /arch/x86/kernel/jump_label.c | |
parent | fdfd42892f311e2b3695852036e5be23661dc590 (diff) | |
download | linux-stable-7e6b9db27de9f69a705c1a046d45882c768e16c3.tar.gz linux-stable-7e6b9db27de9f69a705c1a046d45882c768e16c3.tar.bz2 linux-stable-7e6b9db27de9f69a705c1a046d45882c768e16c3.zip |
jump_label: make initial NOP patching the special case
Instead of defaulting to patching NOP opcodes at init time, and leaving
it to the architectures to override this if this is not needed, switch
to a model where doing nothing is the default. This is the common case
by far, as only MIPS requires NOP patching at init time. On all other
architectures, the correct encodings are emitted by the compiler and so
no initial patching is needed.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220615154142.1574619-4-ardb@kernel.org
Diffstat (limited to 'arch/x86/kernel/jump_label.c')
-rw-r--r-- | arch/x86/kernel/jump_label.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c index 68f091ba8443..f5b8ef02d172 100644 --- a/arch/x86/kernel/jump_label.c +++ b/arch/x86/kernel/jump_label.c @@ -146,16 +146,3 @@ void arch_jump_label_transform_apply(void) text_poke_finish(); mutex_unlock(&text_mutex); } - -static enum { - JL_STATE_START, - JL_STATE_NO_UPDATE, - JL_STATE_UPDATE, -} jlstate __initdata_or_module = JL_STATE_START; - -__init_or_module void arch_jump_label_transform_static(struct jump_entry *entry, - enum jump_label_type type) -{ - if (jlstate == JL_STATE_UPDATE) - jump_label_transform(entry, type, 1); -} |