1
0
Fork 0
alistair23-linux/include
Andrey Ignatov 7b146cebe3 bpf: Sysctl hook
Containerized applications may run as root and it may create problems
for whole host. Specifically such applications may change a sysctl and
affect applications in other containers.

Furthermore in existing infrastructure it may not be possible to just
completely disable writing to sysctl, instead such a process should be
gradual with ability to log what sysctl are being changed by a
container, investigate, limit the set of writable sysctl to currently
used ones (so that new ones can not be changed) and eventually reduce
this set to zero.

The patch introduces new program type BPF_PROG_TYPE_CGROUP_SYSCTL and
attach type BPF_CGROUP_SYSCTL to solve these problems on cgroup basis.

New program type has access to following minimal context:
	struct bpf_sysctl {
		__u32	write;
	};

Where @write indicates whether sysctl is being read (= 0) or written (=
1).

Helpers to access sysctl name and value will be introduced separately.

BPF_CGROUP_SYSCTL attach point is added to sysctl code right before
passing control to ctl_table->proc_handler so that BPF program can
either allow or deny access to sysctl.

Suggested-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-04-12 13:54:58 -07:00
..
acpi ACPI: use different default debug value than ACPICA 2019-03-25 10:45:59 +01:00
asm-generic syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
clocksource
crypto
drm drm i915, amdgpu, qxl and etnaviv fixes 2019-03-15 13:58:35 -07:00
dt-bindings dt-bindings: reset: meson-g12a: Add missing USB2 PHY resets 2019-03-25 16:22:10 +01:00
keys KEYS: trusted: fix -Wvarags warning 2019-04-08 15:58:54 -07:00
kvm ARM: some cleanups, direct physical timer assignment, cache sanitization 2019-03-15 15:00:28 -07:00
linux bpf: Sysctl hook 2019-04-12 13:54:58 -07:00
math-emu
media
memory
misc auxdisplay: charlcd: Introduce charlcd_free() helper 2019-03-17 08:48:16 +01:00
net sctp: Pass sk_buff_head explicitly to sctp_ulpq_tail_event(). 2019-04-11 21:33:31 -07:00
pcmcia
ras
rdma
scsi
soc IOMMU Updates for Linux v5.1 2019-03-10 12:29:52 -07:00
sound sound fixes for 5.1-rc1 2019-03-15 14:05:00 -07:00
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-08 23:39:36 -07:00
uapi bpf: Sysctl hook 2019-04-12 13:54:58 -07:00
video media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
xen