diff options
author | Song Liu <song@kernel.org> | 2022-05-21 02:57:52 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-05-24 00:07:38 +0300 |
commit | aadd1b678ebef81cc3ed23663253ae3749cdc673 (patch) | |
tree | e6a9f6c007ba96432618045ab5baa4741405409d /arch/x86/include | |
parent | d88bb5eed04ce50cc20e7f9282977841728be798 (diff) | |
download | linux-aadd1b678ebef81cc3ed23663253ae3749cdc673.tar.xz |
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')
-rw-r--r-- | arch/x86/include/asm/text-patching.h | 1 |
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); |