grant bpfloader NET_ADMIN capability
This is required for it to be able to create DEVMAP/DEVMAP_HASH maps.
See kernel source code in kernel/bpf/devmap.c:
static struct bpf_map *dev_map_alloc(union bpf_attr *attr) {
...
if (!capable(CAP_NET_ADMIN)) return ERR_PTR(-EPERM);
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4f3012209186ff0e4bde8807b9032de056367132
This commit is contained in:
parent
e5b8aa240b
commit
265d1310ec
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ on load_bpf_programs
|
|||
exec_start bpfloader
|
||||
|
||||
service bpfloader /system/bin/bpfloader
|
||||
capabilities CHOWN SYS_ADMIN
|
||||
capabilities CHOWN SYS_ADMIN NET_ADMIN
|
||||
#
|
||||
# Set RLIMIT_MEMLOCK to 1GiB for bpfloader
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue