diff options
| author | Hou Tao <[email protected]> | 2022-01-27 08:32:40 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-01-27 21:47:05 +0000 |
| commit | b6ec79518ef0c84d1ed0f76b8af9592a75eb29b6 (patch) | |
| tree | 563e5069e58c36d50ffada0efadcf232fc4b125a /arch/x86/net/bpf_jit_comp.c | |
| parent | Merge branch 'bpf: add __user tagging support in vmlinux BTF' (diff) | |
| download | kernel-b6ec79518ef0c84d1ed0f76b8af9592a75eb29b6.tar.gz kernel-b6ec79518ef0c84d1ed0f76b8af9592a75eb29b6.zip | |
bpf, x86: Remove unnecessary handling of BPF_SUB atomic op
According to the LLVM commit (https://reviews.llvm.org/D72184),
sync_fetch_and_sub() is implemented as a negation followed by
sync_fetch_and_add(), so there will be no BPF_SUB op, thus just
remove it. BPF_SUB is also rejected by the verifier anyway.
Signed-off-by: Hou Tao <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Brendan Jackman <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'arch/x86/net/bpf_jit_comp.c')
| -rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 2b1e266ff95c..36f6fc3e6e69 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -787,7 +787,6 @@ static int emit_atomic(u8 **pprog, u8 atomic_op, /* emit opcode */ switch (atomic_op) { case BPF_ADD: - case BPF_SUB: case BPF_AND: case BPF_OR: case BPF_XOR: |
