Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf, x86: Fix objtool warning for timed may_goto

Kernel test robot reported "call without frame pointer save/setup"
warning in objtool. This will make stack traces unreliable on
CONFIG_UNWINDER_FRAME_POINTER=y, however it works on
CONFIG_UNWINDER_ORC=y. Fix this by creating a stack frame for the
function.

Fixes: 2fb761823ead ("bpf, x86: Add x86 JIT support for timed may_goto")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503071350.QOhsHVaW-lkp@intel.com/
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250315013039.1625048-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Kumar Kartikeya Dwivedi and committed by
Alexei Starovoitov
812f7702 bb2243f4

+14 -3
+14 -3
arch/x86/net/bpf_timed_may_goto.S
··· 11 11 SYM_FUNC_START(arch_bpf_timed_may_goto) 12 12 ANNOTATE_NOENDBR 13 13 14 + /* 15 + * r10 passes us stack depth, load the pointer to count and timestamp 16 + * into r10 by adding it to BPF frame pointer. 17 + */ 18 + leaq (%rbp, %r10, 1), %r10 19 + 20 + /* Setup frame. */ 21 + pushq %rbp 22 + movq %rsp, %rbp 23 + 14 24 /* Save r0-r5. */ 15 25 pushq %rax 16 26 pushq %rdi ··· 30 20 pushq %r8 31 21 32 22 /* 33 - * r10 passes us stack depth, load the pointer to count and timestamp as 34 - * first argument to the call below. 23 + * r10 has the pointer to count and timestamp, pass it as first 24 + * argument. 35 25 */ 36 - leaq (%rbp, %r10, 1), %rdi 26 + movq %r10, %rdi 37 27 38 28 /* Emit call depth accounting for call below. */ 39 29 CALL_DEPTH_ACCOUNT ··· 50 40 popq %rdi 51 41 popq %rax 52 42 43 + leave 53 44 RET 54 45 SYM_FUNC_END(arch_bpf_timed_may_goto)