diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-11-30 10:52:20 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-12-06 10:02:59 -0800 |
commit | 8062fb12de99b2da33754c6a3be1bfc30d9a35f4 (patch) | |
tree | 5c70426f65a08c9b76c69c95fe98f1e44ef05b5e /kernel/bpf/arraymap.c | |
parent | 4cbb270e115bc197ff2046aeb54cc951666b16ec (diff) | |
download | lwn-8062fb12de99b2da33754c6a3be1bfc30d9a35f4.tar.gz lwn-8062fb12de99b2da33754c6a3be1bfc30d9a35f4.zip |
bpf: consistently use BPF token throughout BPF verifier logic
Remove remaining direct queries to perfmon_capable() and bpf_capable()
in BPF verifier logic and instead use BPF token (if available) to make
decisions about privileges.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231130185229.2688956-9-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 4a4a67956e21..8d365bda9a8b 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -82,7 +82,7 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr) bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; int numa_node = bpf_map_attr_numa_node(attr); u32 elem_size, index_mask, max_entries; - bool bypass_spec_v1 = bpf_bypass_spec_v1(); + bool bypass_spec_v1 = bpf_bypass_spec_v1(NULL); u64 array_size, mask64; struct bpf_array *array; |