[PATCH 36/41] x86/alternatives: Remove the mixed-patching restriction on text_poke_int3()
From: Ingo Molnar
Date: Thu Mar 27 2025 - 17:04:23 EST
At this point text_poke_int3(addr, opcode, len, emulate) is equivalent to:
text_poke_int3_queue(addr, opcode, len, emulate);
text_poke_int3_finish();
So remove the restriction on mixing single-instruction patching
with multi-instruction patching.
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/kernel/alternative.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index e1cc3e109feb..2807d35c7676 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -2893,9 +2893,6 @@ void __ref text_poke_int3_queue(void *addr, const void *opcode, size_t len, cons
*/
void __ref text_poke_int3(void *addr, const void *opcode, size_t len, const void *emulate)
{
- /* Batch-patching should not be mixed with single-patching: */
- WARN_ON_ONCE(tp_array.nr_entries != 0);
-
text_poke_int3_loc_add(addr, opcode, len, emulate);
text_poke_int3_finish();
--
2.45.2