s390/bpf: Centralize frame offset calculations
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 24 Jun 2025 12:04:27 +0000 (14:04 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 1 Jul 2025 19:36:51 +0000 (12:36 -0700)
commitb2268d550d20ff860bddfe3a91b1aec00414689a
tree2da3b728fbad933d5fd6365918affff550692042
parentc4b1be928ea05add0e0f9334e5bc44932395782e
s390/bpf: Centralize frame offset calculations

The calculation of the distance from %r15 to the caller-allocated
portion of the stack frame is copy-pasted into multiple places in the
JIT code.

Move it to bpf_jit_prog() and save the result into bpf_jit::frame_off,
so that the other parts of the JIT can use it.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20250624121501.50536-2-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/s390/net/bpf_jit_comp.c