Skip to content

Commit f3a0c23

Browse files
samitolvanenpalmer-dabbelt
authored andcommitted
riscv: Add ftrace_stub_graph
Commit 883bbbf ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()") added a separate ftrace_stub_graph function for CFI_CLANG. Add the stub to fix FUNCTION_GRAPH_TRACER compatibility with CFI. Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20230710183544.999540-11-samitolvanen@google.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 5f59c68 commit f3a0c23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/riscv/kernel/mcount.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ SYM_TYPED_FUNC_START(ftrace_stub)
5757
SYM_FUNC_END(ftrace_stub)
5858

5959
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
60+
SYM_TYPED_FUNC_START(ftrace_stub_graph)
61+
ret
62+
SYM_FUNC_END(ftrace_stub_graph)
63+
6064
ENTRY(return_to_handler)
6165
/*
6266
* On implementing the frame point test, the ideal way is to compare the

0 commit comments

Comments
 (0)