[PATCH 07/41] x86/alternatives: Rename 'text_poke_addr' to 'text_poke_int3_addr'
From: Ingo Molnar
Date: Thu Mar 27 2025 - 16:56:07 EST
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/kernel/alternative.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index f4baeeaa6c0c..100b606d7dde 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -2499,7 +2499,7 @@ static __always_inline void put_desc(void)
raw_atomic_dec(refs);
}
-static __always_inline void *text_poke_addr(struct text_poke_loc *tp)
+static __always_inline void *text_poke_int3_addr(struct text_poke_loc *tp)
{
return _stext + tp->rel_addr;
}
@@ -2508,9 +2508,9 @@ static __always_inline int patch_cmp(const void *key, const void *elt)
{
struct text_poke_loc *tp = (struct text_poke_loc *) elt;
- if (key < text_poke_addr(tp))
+ if (key < text_poke_int3_addr(tp))
return -1;
- if (key > text_poke_addr(tp))
+ if (key > text_poke_int3_addr(tp))
return 1;
return 0;
}
@@ -2555,7 +2555,7 @@ noinstr int text_poke_int3_handler(struct pt_regs *regs)
goto out_put;
} else {
tp = desc->vec;
- if (text_poke_addr(tp) != ip)
+ if (text_poke_int3_addr(tp) != ip)
goto out_put;
}
@@ -2660,8 +2660,8 @@ static void text_poke_int3_batch(struct text_poke_loc *tp, unsigned int nr_entri
* First step: add a int3 trap to the address that will be patched.
*/
for (i = 0; i < nr_entries; i++) {
- tp[i].old = *(u8 *)text_poke_addr(&tp[i]);
- text_poke(text_poke_addr(&tp[i]), &int3, INT3_INSN_SIZE);
+ tp[i].old = *(u8 *)text_poke_int3_addr(&tp[i]);
+ text_poke(text_poke_int3_addr(&tp[i]), &int3, INT3_INSN_SIZE);
}
text_poke_sync();
@@ -2677,7 +2677,7 @@ static void text_poke_int3_batch(struct text_poke_loc *tp, unsigned int nr_entri
if (len - INT3_INSN_SIZE > 0) {
memcpy(old + INT3_INSN_SIZE,
- text_poke_addr(&tp[i]) + INT3_INSN_SIZE,
+ text_poke_int3_addr(&tp[i]) + INT3_INSN_SIZE,
len - INT3_INSN_SIZE);
if (len == 6) {
@@ -2686,7 +2686,7 @@ static void text_poke_int3_batch(struct text_poke_loc *tp, unsigned int nr_entri
new = _new;
}
- text_poke(text_poke_addr(&tp[i]) + INT3_INSN_SIZE,
+ text_poke(text_poke_int3_addr(&tp[i]) + INT3_INSN_SIZE,
new + INT3_INSN_SIZE,
len - INT3_INSN_SIZE);
@@ -2717,7 +2717,7 @@ static void text_poke_int3_batch(struct text_poke_loc *tp, unsigned int nr_entri
* The old instruction is recorded so that the event can be
* processed forwards or backwards.
*/
- perf_event_text_poke(text_poke_addr(&tp[i]), old, len, new, len);
+ perf_event_text_poke(text_poke_int3_addr(&tp[i]), old, len, new, len);
}
if (do_sync) {
@@ -2742,7 +2742,7 @@ static void text_poke_int3_batch(struct text_poke_loc *tp, unsigned int nr_entri
if (byte == INT3_INSN_OPCODE)
continue;
- text_poke(text_poke_addr(&tp[i]), &byte, INT3_INSN_SIZE);
+ text_poke(text_poke_int3_addr(&tp[i]), &byte, INT3_INSN_SIZE);
do_sync++;
}
@@ -2857,7 +2857,7 @@ static bool tp_order_fail(void *addr)
return true;
tp = &tp_vec[tp_vec_nr - 1];
- if ((unsigned long)text_poke_addr(tp) > (unsigned long)addr)
+ if ((unsigned long)text_poke_int3_addr(tp) > (unsigned long)addr)
return true;
return false;
--
2.45.2