linux/kernel/bpf
Roman Gushchin 85fc4b16aa bpf: introduce update_effective_progs()
__cgroup_bpf_attach() and __cgroup_bpf_detach() functions have
a good amount of duplicated code, which is possible to eliminate
by introducing the update_effective_progs() helper function.

The update_effective_progs() calls compute_effective_progs()
and then in case of success it calls activate_effective_progs()
for each descendant cgroup. In case of failure (OOM), it releases
allocated prog arrays and return the error code.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-08-07 14:29:55 +02:00
..
Makefile bpf: introduce cgroup storage maps 2018-08-03 00:47:32 +02:00
arraymap.c bpf: btf: Rename btf_key_id and btf_value_id in bpf_map_info 2018-05-23 12:03:32 +02:00
bpf_lru_list.c
bpf_lru_list.h
btf.c bpf: btf: Fix bitfield extraction for big endian 2018-07-11 22:36:08 +02:00
cgroup.c bpf: introduce update_effective_progs() 2018-08-07 14:29:55 +02:00
core.c bpf: introduce the bpf_get_local_storage() helper function 2018-08-03 00:47:32 +02:00
cpumap.c xdp: introduce xdp_return_frame_rx_napi 2018-05-24 18:36:15 -07:00
devmap.c xdp: XDP_REDIRECT should check IFF_UP and MTU 2018-07-07 15:25:35 -07:00
disasm.c bpf: Remove struct bpf_verifier_env argument from print_bpf_insn 2018-03-23 17:38:57 +01:00
disasm.h bpf: Remove struct bpf_verifier_env argument from print_bpf_insn 2018-03-23 17:38:57 +01:00
hashtab.c bpf: hash map: decrement counter on error 2018-07-03 23:26:28 +02:00
helpers.c bpf: introduce the bpf_get_local_storage() helper function 2018-08-03 00:47:32 +02:00
inode.c bpf: implement dummy fops for bpf objects 2018-06-08 10:58:48 -07:00
local_storage.c bpf: pass a pointer to a cgroup storage using pcpu variable 2018-08-03 00:47:32 +02:00
lpm_trie.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
map_in_map.c bpf: don't allow create maps of cgroup local storages 2018-08-03 00:47:32 +02:00
map_in_map.h
offload.c bpf: offload: allow program and map sharing per-ASIC 2018-07-18 15:10:34 +02:00
percpu_freelist.c bpf: fix lockdep splat 2017-11-15 19:46:32 +09:00
percpu_freelist.h
sockmap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-07-20 23:58:30 -07:00
stackmap.c bpf: avoid -Wmaybe-uninitialized warning 2018-05-28 17:40:59 +02:00
syscall.c bpf: introduce cgroup storage maps 2018-08-03 00:47:32 +02:00
tnum.c bpf/verifier: improve register value range tracking with ARSH 2018-04-29 08:45:53 -07:00
verifier.c bpf: introduce the bpf_get_local_storage() helper function 2018-08-03 00:47:32 +02:00
xskmap.c xsk: clean up SPDX headers 2018-05-18 16:07:02 +02:00