]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 18 Oct 2022 11:49:21 +0000 (13:49 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 20 Oct 2022 15:10:27 +0000 (17:10 +0200)
commit883bbbffa5a4ffd1915f8b42934dab81b7f87226
tree6d650ad1ce9df229da9d3786bfc26d38c4f9466f
parentb5f1fc3184405ab955db1b86d41d8b744d07c12d
ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()

Different function signatures means they needs to be different
functions; otherwise CFI gets upset.

As triggered by the ftrace boot tests:

  [] CFI failure at ftrace_return_to_handler+0xac/0x16c (target: ftrace_stub+0x0/0x14; expected type: 0x0a5d5347)

Fixes: 3c516f89e17e ("x86: Add support for CONFIG_CFI_CLANG")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lkml.kernel.org/r/Y06dg4e1xF6JTdQq@hirez.programming.kicks-ass.net
arch/arm64/kernel/entry-ftrace.S
arch/x86/kernel/ftrace_64.S
include/asm-generic/vmlinux.lds.h