]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/bpf: Add macros for calling external functions
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 19 May 2025 22:30:05 +0000 (23:30 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 22 May 2025 15:40:56 +0000 (08:40 -0700)
commit9053ba042fc7c0e718566932288cc88b3bb2dbe1
tree8fee56a2408a473edf5d89be6327dcd60be72690
parentf7562001c8b854390899b53d06ba4202c89339e6
s390/bpf: Add macros for calling external functions

After the V!=R rework (commit c98d2ecae08f ("s390/mm: Uncouple physical
vs virtual address spaces")), kernel and BPF programs are allocated
within a 4G region, making it possible to use relative addressing to
directly use kernel functions from BPF code.

Add two new macros for calling kernel functions from BPF code:
EMIT6_PCREL_RILB_PTR() and EMIT6_PCREL_RILC_PTR(). Factor out parts
of the existing macros that are helpful for implementing the new ones.

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