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
This commit is contained in:
committed by
Borislav Petkov
parent
f94909ceb1
commit
b17c2baa30
@@ -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"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user