aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorChenbo Feng <[email protected]>2017-10-18 20:00:22 +0000
committerDavid S. Miller <[email protected]>2017-10-20 12:32:59 +0000
commit6e71b04a82248ccf13a94b85cbc674a9fefe53f5 (patch)
tree45cab2ff677b04d921a2813738dc1ada8c07eaec /security/selinux/hooks.c
parentnet-tun: fix panics at dismantle time (diff)
downloadkernel-6e71b04a82248ccf13a94b85cbc674a9fefe53f5.tar.gz
kernel-6e71b04a82248ccf13a94b85cbc674a9fefe53f5.zip
bpf: Add file mode configuration into bpf maps
Introduce the map read/write flags to the eBPF syscalls that returns the map fd. The flags is used to set up the file mode when construct a new file descriptor for bpf maps. To not break the backward capability, the f_flags is set to O_RDWR if the flag passed by syscall is 0. Otherwise it should be O_RDONLY or O_WRONLY. When the userspace want to modify or read the map content, it will check the file mode to see if it is allowed to make the change. Signed-off-by: Chenbo Feng <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions