bpf: Use correct permission flag for mixed signed bounds arithmetic
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Mar 2021 07:32:59 +0000 (08:32 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 16 Apr 2021 21:51:21 +0000 (23:51 +0200)
commit9601148392520e2e134936e76788fc2a6371e7be
tree4b12106c68f6229ce8292b94ad12e790e4ec756d
parentafd0be7299533bb2e2b09104399d8a467ecbd2c5
bpf: Use correct permission flag for mixed signed bounds arithmetic

We forbid adding unknown scalars with mixed signed bounds due to the
spectre v1 masking mitigation. Hence this also needs bypass_spec_v1
flag instead of allow_ptr_leaks.

Fixes: 2c78ee898d8f ("bpf: Implement CAP_BPF")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c