[PATCH 0/2] bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames

Josh Poimboeuf posted 2 patches 2 weeks, 3 days ago
There is a newer version of this series
arch/x86/kernel/unwind_orc.c | 39 +++++++++++++++++++++++++-----------
arch/x86/net/bpf_jit_comp.c  | 10 +++++++++
include/linux/bpf.h          |  3 +++
kernel/bpf/core.c            | 16 +++++++++++++++
4 files changed, 56 insertions(+), 12 deletions(-)
[PATCH 0/2] bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames
Posted by Josh Poimboeuf 2 weeks, 3 days ago
Fix livepatch stalls which may be seen when a task is blocked with BPF
JIT on its kernel stack.

Josh Poimboeuf (2):
  bpf: Add bpf_has_frame_pointer()
  x86/unwind/orc: Support reliable unwinding through BPF stack frames

 arch/x86/kernel/unwind_orc.c | 39 +++++++++++++++++++++++++-----------
 arch/x86/net/bpf_jit_comp.c  | 10 +++++++++
 include/linux/bpf.h          |  3 +++
 kernel/bpf/core.c            | 16 +++++++++++++++
 4 files changed, 56 insertions(+), 12 deletions(-)

-- 
2.51.1
Re: [External] [PATCH 0/2] bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames
Posted by Andrey Grodzovsky 2 weeks, 2 days ago
On 12/2/25 13:19, Josh Poimboeuf wrote:
> Fix livepatch stalls which may be seen when a task is blocked with BPF
> JIT on its kernel stack.
> 
> Josh Poimboeuf (2):
>    bpf: Add bpf_has_frame_pointer()
>    x86/unwind/orc: Support reliable unwinding through BPF stack frames
> 
>   arch/x86/kernel/unwind_orc.c | 39 +++++++++++++++++++++++++-----------
>   arch/x86/net/bpf_jit_comp.c  | 10 +++++++++
>   include/linux/bpf.h          |  3 +++
>   kernel/bpf/core.c            | 16 +++++++++++++++
>   4 files changed, 56 insertions(+), 12 deletions(-)
> 


Acked-and-tested-by: Andrey Grodzovsky<andrey.grodzovsky@crowdstrike.com>

Question - This looks to be x86 specific issue since ORC unwinding is 
x86 specific and as such this has no impact on ARM, correct ?

Andrey
Re: [External] [PATCH 0/2] bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames
Posted by Josh Poimboeuf 2 weeks, 2 days ago
On Tue, Dec 02, 2025 at 03:56:26PM -0500, Andrey Grodzovsky wrote:
> On 12/2/25 13:19, Josh Poimboeuf wrote:
> > Fix livepatch stalls which may be seen when a task is blocked with BPF
> > JIT on its kernel stack.
> > 
> > Josh Poimboeuf (2):
> >    bpf: Add bpf_has_frame_pointer()
> >    x86/unwind/orc: Support reliable unwinding through BPF stack frames
> > 
> >   arch/x86/kernel/unwind_orc.c | 39 +++++++++++++++++++++++++-----------
> >   arch/x86/net/bpf_jit_comp.c  | 10 +++++++++
> >   include/linux/bpf.h          |  3 +++
> >   kernel/bpf/core.c            | 16 +++++++++++++++
> >   4 files changed, 56 insertions(+), 12 deletions(-)
> > 
> 
> 
> Acked-and-tested-by: Andrey Grodzovsky<andrey.grodzovsky@crowdstrike.com>
> 
> Question - This looks to be x86 specific issue since ORC unwinding is x86
> specific and as such this has no impact on ARM, correct ?

Correct, though if ARM ever switches to sframe for in-kernel unwinding,
it might also want to use this interface.

-- 
Josh