summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorBorislav Petkov (AMD) <bp@alien8.de>2024-01-30 13:59:38 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2024-04-09 19:08:11 +0300
commitf796c75837623058db1ff93252b9f1681306b83d (patch)
tree8c66dac0c85884b6b09b4d160d1e5d7f29528476 /arch/x86/include
parentee8962082a4413dba1a1b3d3d23490c5221f3b8a (diff)
downloadlinux-f796c75837623058db1ff93252b9f1681306b83d.tar.xz
x86/alternatives: Use a temporary buffer when optimizing NOPs
Instead of optimizing NOPs in-place, use a temporary buffer like the usual alternatives patching flow does. This obviates the need to grab locks when patching, see 6778977590da ("x86/alternatives: Disable interrupts and sync when optimizing NOPs in place") While at it, add nomenclature definitions clarifying and simplifying the naming of function-local variables in the alternatives code. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20240130105941.19707-2-bp@alien8.de
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/text-patching.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h
index 345aafbc1964..6259f1937fe7 100644
--- a/arch/x86/include/asm/text-patching.h
+++ b/arch/x86/include/asm/text-patching.h
@@ -15,7 +15,7 @@
extern void text_poke_early(void *addr, const void *opcode, size_t len);
-extern void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len);
+extern void apply_relocation(u8 *buf, const u8 * const instr, size_t instrlen, u8 *repl, size_t repl_len);
/*
* Clear and restore the kernel write-protection flag on the local CPU.