File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 8
8
#include <asm/segment.h>
9
9
#include <asm/export.h>
10
10
#include <asm/ftrace.h>
11
+ #include <asm/nospec-branch.h>
11
12
12
13
#ifdef CC_USING_FENTRY
13
14
# define function_hook __fentry__
@@ -197,7 +198,8 @@ ftrace_stub:
197
198
movl 0x4 (%ebp ), %edx
198
199
subl $MCOUNT_INSN_SIZE, %eax
199
200
200
- call *ftrace_trace_function
201
+ movl ftrace_trace_function, %ecx
202
+ CALL_NOSPEC %ecx
201
203
202
204
popl %edx
203
205
popl %ecx
@@ -241,5 +243,5 @@ return_to_handler:
241
243
movl %eax , %ecx
242
244
popl %edx
243
245
popl %eax
244
- jmp * %ecx
246
+ JMP_NOSPEC %ecx
245
247
#endif
Original file line number Diff line number Diff line change 7
7
#include <asm/ptrace.h>
8
8
#include <asm/ftrace.h>
9
9
#include <asm/export.h>
10
-
10
+ #include <asm/nospec-branch.h>
11
11
12
12
.code64
13
13
.section .entry.text, "ax"
@@ -286,8 +286,8 @@ trace:
286
286
* ip and parent ip are used and the list function is called when
287
287
* function tracing is enabled.
288
288
*/
289
- call * ftrace_trace_function
290
-
289
+ movq ftrace_trace_function, %r8
290
+ CALL_NOSPEC %r8
291
291
restore_mcount_regs
292
292
293
293
jmp fgraph_trace
@@ -329,5 +329,5 @@ GLOBAL(return_to_handler)
329
329
movq 8 (%rsp ), %rdx
330
330
movq (%rsp ), %rax
331
331
addq $24 , %rsp
332
- jmp * %rdi
332
+ JMP_NOSPEC %rdi
333
333
#endif
You can’t perform that action at this time.
0 commit comments