aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2022-05-20 16:57:52 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-05-23 23:07:38 +0200
commitaadd1b678ebef81cc3ed23663253ae3749cdc673 (patch)
treee6a9f6c007ba96432618045ab5baa4741405409d /arch/x86/include/asm
parentd88bb5eed04ce50cc20e7f9282977841728be798 (diff)
x86/alternative: Introduce text_poke_set
Introduce a memset like API for text_poke. This will be used to fill the unused RX memory with illegal instructions. Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/bpf/20220520235758.1858153-3-song@kernel.org
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/text-patching.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h
index d20ab0921480..1cc15528ce29 100644
--- a/arch/x86/include/asm/text-patching.h
+++ b/arch/x86/include/asm/text-patching.h
@@ -45,6 +45,7 @@ extern void *text_poke(void *addr, const void *opcode, size_t len);
extern void text_poke_sync(void);
extern void *text_poke_kgdb(void *addr, const void *opcode, size_t len);
extern void *text_poke_copy(void *addr, const void *opcode, size_t len);
+extern void *text_poke_set(void *addr, int c, size_t len);
extern int poke_int3_handler(struct pt_regs *regs);
extern void text_poke_bp(void *addr, const void *opcode, size_t len, const void *emulate);