Skip to content

s390/bpf: Fix backchain issues in the trampoline

Ilya Leoshkevich bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2s390/bpf: Fix clobbering the caller's backchain in the trampolinearch/s390/net/bpf_jit_comp.c+6 -20 repliesApplied
2/2s390/bpf: Fix unwinding past the trampolinearch/s390/net/bpf_jit_comp.c+14 -30 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf 0/2] s390/bpf: Fix backchain issues in the trampoline

Hi,

Song reported that a patch he wrote was causing kernel panics on s390. The disassembly printed by the kernel indicated that the stored backchain was not a valid pointer; setting a watchpoint in GDB has shown the culprit: the trampoline.

Currently it's implemented without regard for backchain: it clobbers the caller's backchain and causes the issue reported by Song, and also doesn't store its own, making it impossible to unwind past itself.

This series fixes both problems.

Best regards,
Ilya

[1] https://lore.kernel.org/bpf/[email protected]/

Ilya Leoshkevich (2):
s390/bpf: Fix clobbering the caller's backchain in the trampoline s390/bpf: Fix unwinding past the trampoline

 arch/s390/net/bpf_jit_comp.c | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
Signature · 1 line
2.41.0