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 /samples/ftrace | |
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 'samples/ftrace')
-rw-r--r-- | samples/ftrace/ftrace-direct-modify.c | 4 | ||||
-rw-r--r-- | samples/ftrace/ftrace-direct-too.c | 2 | ||||
-rw-r--r-- | samples/ftrace/ftrace-direct.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/samples/ftrace/ftrace-direct-modify.c b/samples/ftrace/ftrace-direct-modify.c index 690e4a9ff333..bc8f0d6cd6f8 100644 --- a/samples/ftrace/ftrace-direct-modify.c +++ b/samples/ftrace/ftrace-direct-modify.c @@ -31,7 +31,7 @@ asm ( " call my_direct_func1\n" " leave\n" " .size my_tramp1, .-my_tramp1\n" -" ret\n" + ASM_RET " .type my_tramp2, @function\n" " .globl my_tramp2\n" " my_tramp2:" @@ -39,7 +39,7 @@ asm ( " movq %rsp, %rbp\n" " call my_direct_func2\n" " leave\n" -" ret\n" + ASM_RET " .size my_tramp2, .-my_tramp2\n" " .popsection\n" ); diff --git a/samples/ftrace/ftrace-direct-too.c b/samples/ftrace/ftrace-direct-too.c index 6e0de725bf22..d1bec1cded58 100644 --- a/samples/ftrace/ftrace-direct-too.c +++ b/samples/ftrace/ftrace-direct-too.c @@ -31,7 +31,7 @@ asm ( " popq %rsi\n" " popq %rdi\n" " leave\n" -" ret\n" + ASM_RET " .size my_tramp, .-my_tramp\n" " .popsection\n" ); diff --git a/samples/ftrace/ftrace-direct.c b/samples/ftrace/ftrace-direct.c index a30aa42ec76a..51312e0ae2b1 100644 --- a/samples/ftrace/ftrace-direct.c +++ b/samples/ftrace/ftrace-direct.c @@ -25,7 +25,7 @@ asm ( " call my_direct_func\n" " popq %rdi\n" " leave\n" -" ret\n" + ASM_RET " .size my_tramp, .-my_tramp\n" " .popsection\n" ); |