diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2022-09-04 22:41:15 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-09-07 20:46:08 +0200 |
commit | 6df4ea1ff0ff70798ff1e7eed79f98ccb7b5b0a2 (patch) | |
tree | 23722f9083fbff120e47107807d3bc75baa5d40b /kernel/bpf/syscall.c | |
parent | bpf: Add copy_map_value_long to copy to remote percpu memory (diff) | |
download | linux-6df4ea1ff0ff70798ff1e7eed79f98ccb7b5b0a2.tar.xz linux-6df4ea1ff0ff70798ff1e7eed79f98ccb7b5b0a2.zip |
bpf: Support kptrs in percpu arraymap
Enable support for kptrs in percpu BPF arraymap by wiring up the freeing
of these kptrs from percpu map elements.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220904204145.3089-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r-- | kernel/bpf/syscall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index d35a6aa3aa96..69be1c612daa 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -1049,7 +1049,8 @@ static int map_check_btf(struct bpf_map *map, const struct btf *btf, } if (map->map_type != BPF_MAP_TYPE_HASH && map->map_type != BPF_MAP_TYPE_LRU_HASH && - map->map_type != BPF_MAP_TYPE_ARRAY) { + map->map_type != BPF_MAP_TYPE_ARRAY && + map->map_type != BPF_MAP_TYPE_PERCPU_ARRAY) { ret = -EOPNOTSUPP; goto free_map_tab; } |