]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc64/bpf: fix handling of BPF stack in exception callback
authorHari Bathini <hbathini@linux.ibm.com>
Tue, 3 Mar 2026 18:10:29 +0000 (23:40 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Sat, 7 Mar 2026 10:32:26 +0000 (16:02 +0530)
commit51b8de4b3d27ec12128fa2405e526c527a77ae65
tree3f9ac0224c1515f2443809c32b2c04cffad111c8
parent2d347d10f8e20e28a9eab52edf55079ae1ec0aae
powerpc64/bpf: fix handling of BPF stack in exception callback

Exception callback reuses the stack frame of exception boundary. When
exception boundary and exception callback programs have different BPF
stack depth, the current stack unwind in exception callback will fail.
Adjust the stack frame size of exception callback, in its prologue,
if its BPF stack depth is different from that of exception boundary.

Reported-by: bot+bpf-ci@kernel.org
Closes: https://lore.kernel.org/bpf/2a310e86a59eb4c44c3ac9e5647814469d9c955580c9c0f1b3d9ca4a44717a34@mail.kernel.org/
Fixes: 11d45eee9f42 ("powerpc64/bpf: Additional NVR handling for bpf_throw")
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260303181031.390073-6-hbathini@linux.ibm.com
arch/powerpc/net/bpf_jit_comp64.c