]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/alternatives: Rename 'text_poke_loc_init()' to 'text_poke_int3_loc_init()'
authorIngo Molnar <mingo@kernel.org>
Fri, 11 Apr 2025 05:40:29 +0000 (07:40 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 11 Apr 2025 09:01:33 +0000 (11:01 +0200)
This name is actively confusing as well, because the simple text_poke*()
APIs use MM-switching based code patching, while text_poke_loc_init()
is part of the INT3 based text_poke_int3_*() machinery that is an
additional layer of functionality on top of regular text_poke*() functionality.

Rename it to text_poke_int3_loc_init() to make it clear which layer
it belongs to.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250411054105.2341982-18-mingo@kernel.org
arch/x86/kernel/alternative.c

index 6865296920d59956d999d3fd07b1c789830e49aa..ebfd364f947a6a67a05527be35eab86e1f96bd41 100644 (file)
@@ -2762,7 +2762,7 @@ static void smp_text_poke_batch_process(struct text_poke_loc *tp, unsigned int n
        }
 }
 
-static void text_poke_loc_init(struct text_poke_loc *tp, void *addr,
+static void text_poke_int3_loc_init(struct text_poke_loc *tp, void *addr,
                               const void *opcode, size_t len, const void *emulate)
 {
        struct insn insn;
@@ -2878,7 +2878,7 @@ void __ref smp_text_poke_batch_add(void *addr, const void *opcode, size_t len, c
        smp_text_poke_batch_flush(addr);
 
        tp = &tp_vec[tp_vec_nr++];
-       text_poke_loc_init(tp, addr, opcode, len, emulate);
+       text_poke_int3_loc_init(tp, addr, opcode, len, emulate);
 }
 
 /**
@@ -2896,6 +2896,6 @@ void __ref smp_text_poke_single(void *addr, const void *opcode, size_t len, cons
 {
        struct text_poke_loc tp;
 
-       text_poke_loc_init(&tp, addr, opcode, len, emulate);
+       text_poke_int3_loc_init(&tp, addr, opcode, len, emulate);
        smp_text_poke_batch_process(&tp, 1);
 }