summaryrefslogtreecommitdiffstats
path: root/samples/ftrace/ftrace-direct-too.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ftrace/ftrace-direct-too.c')
-rw-r--r--samples/ftrace/ftrace-direct-too.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/samples/ftrace/ftrace-direct-too.c b/samples/ftrace/ftrace-direct-too.c
index c93fb0e95173..6690468c5cc2 100644
--- a/samples/ftrace/ftrace-direct-too.c
+++ b/samples/ftrace/ftrace-direct-too.c
@@ -19,11 +19,14 @@ extern void my_tramp(void *);
#ifdef CONFIG_X86_64
+#include <asm/ibt.h>
+
asm (
" .pushsection .text, \"ax\", @progbits\n"
" .type my_tramp, @function\n"
" .globl my_tramp\n"
" my_tramp:"
+ ASM_ENDBR
" pushq %rbp\n"
" movq %rsp, %rbp\n"
" pushq %rdi\n"