]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/bpf: Introduce pre- and post- probe functions
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 1 Jul 2024 23:40:22 +0000 (01:40 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Jul 2024 16:31:52 +0000 (18:31 +0200)
commit89b933a2013794d8272d432591a2a7a9c41f6351
tree7073dac156d3202e6e105e930a9c992e7ec4fda2
parent9a048587269174f218e8d8d737ebfa628589358f
s390/bpf: Introduce pre- and post- probe functions

Currently probe insns are handled by two "if" statements at the
beginning and at the end of bpf_jit_insn(). The first one needs to be
in sync with the huge insn->code statement that follows it, which was
not a problem so far, since the check is small.

The introduction of arena will make it significantly larger, and it
will no longer be obvious whether it is in sync with the opcode switch.

Move these statements to the new bpf_jit_probe_load_pre() and
bpf_jit_probe_post() functions, and call them only from cases that need
them.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240701234304.14336-5-iii@linux.ibm.com
arch/s390/net/bpf_jit_comp.c