]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Rename BPF_XADD and prepare to encode other atomics in .imm
authorBrendan Jackman <jackmanb@google.com>
Thu, 14 Jan 2021 18:17:44 +0000 (18:17 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 Jan 2021 02:34:29 +0000 (18:34 -0800)
commite33a8ac2716d14de5407f45167cae9c02b60fad5
treeb15d68c17ead28b128791f8e710d9efa2a711267
parent764207f8f3fd8f0b57a2939f44f79097826a33fa
bpf: Rename BPF_XADD and prepare to encode other atomics in .imm

A subsequent patch will add additional atomic operations. These new
operations will use the same opcode field as the existing XADD, with
the immediate discriminating different operations.

In preparation, rename the instruction mode BPF_ATOMIC and start
calling the zero immediate BPF_ADD.

This is possible (doesn't break existing valid BPF progs) because the
immediate field is currently reserved MBZ and BPF_ADD is zero.

All uses are removed from the tree but the BPF_XADD definition is
kept around to avoid breaking builds for people including kernel
headers.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Björn Töpel <bjorn.topel@gmail.com>
Link: https://lore.kernel.org/bpf/20210114181751.768687-5-jackmanb@google.com
35 files changed:
Documentation/networking/filter.rst
arch/arm/net/bpf_jit_32.c
arch/arm64/net/bpf_jit_comp.c
arch/mips/net/ebpf_jit.c
arch/powerpc/net/bpf_jit_comp64.c
arch/riscv/net/bpf_jit_comp32.c
arch/riscv/net/bpf_jit_comp64.c
arch/s390/net/bpf_jit_comp.c
arch/sparc/net/bpf_jit_comp_64.c
arch/x86/net/bpf_jit_comp.c
arch/x86/net/bpf_jit_comp32.c
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/bpf/verifier.c
include/linux/filter.h
include/uapi/linux/bpf.h
kernel/bpf/core.c
kernel/bpf/disasm.c
kernel/bpf/verifier.c
lib/test_bpf.c
samples/bpf/bpf_insn.h
samples/bpf/cookie_uid_helper_example.c
samples/bpf/sock_example.c
samples/bpf/test_cgrp2_attach.c
tools/include/linux/filter.h
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/prog_tests/cgroup_attach_multi.c
tools/testing/selftests/bpf/test_cgroup_storage.c
tools/testing/selftests/bpf/verifier/ctx.c
tools/testing/selftests/bpf/verifier/direct_packet_access.c
tools/testing/selftests/bpf/verifier/leak_ptr.c
tools/testing/selftests/bpf/verifier/meta_access.c
tools/testing/selftests/bpf/verifier/unpriv.c
tools/testing/selftests/bpf/verifier/value_illegal_alu.c
tools/testing/selftests/bpf/verifier/xadd.c