diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-12-04 14:43:41 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-12-08 19:23:12 +0100 |
commit | b17c2baa305cccbd16bafa289fd743cc2db77966 (patch) | |
tree | dd6c3b4e52c2f9bb1040c6f84f59244ea7ece435 /arch/x86/lib | |
parent | x86: Prepare asm files for straight-line-speculation (diff) | |
download | linux-b17c2baa305cccbd16bafa289fd743cc2db77966.tar.xz linux-b17c2baa305cccbd16bafa289fd743cc2db77966.zip |
x86: Prepare inline-asm for straight-line-speculation
Replace all ret/retq instructions with ASM_RET in preparation of
making it more than a single instruction.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211204134907.964635458@infradead.org
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/error-inject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/lib/error-inject.c b/arch/x86/lib/error-inject.c index be5b5fb1598b..520897061ee0 100644 --- a/arch/x86/lib/error-inject.c +++ b/arch/x86/lib/error-inject.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 +#include <linux/linkage.h> #include <linux/error-injection.h> #include <linux/kprobes.h> @@ -10,7 +11,7 @@ asm( ".type just_return_func, @function\n" ".globl just_return_func\n" "just_return_func:\n" - " ret\n" + ASM_RET ".size just_return_func, .-just_return_func\n" ); |