OpenCloudOS-Kernel/include
Stanislav Fomichev 9113d7e48e bpf: expose bpf_{g,s}etsockopt to lsm cgroup
I don't see how to make it nice without introducing btf id lists
for the hooks where these helpers are allowed. Some LSM hooks
work on the locked sockets, some are triggering early and
don't grab any locks, so have two lists for now:

1. LSM hooks which trigger under socket lock - minority of the hooks,
   but ideal case for us, we can expose existing BTF-based helpers
2. LSM hooks which trigger without socket lock, but they trigger
   early in the socket creation path where it should be safe to
   do setsockopt without any locks
3. The rest are prohibited. I'm thinking that this use-case might
   be a good gateway to sleeping lsm cgroup hooks in the future.
   We can either expose lock/unlock operations (and add tracking
   to the verifier) or have another set of bpf_setsockopt
   wrapper that grab the locks and might sleep.

Reviewed-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20220628174314.1216643-7-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2022-06-29 13:21:52 -07:00
..
acpi
asm-generic kernel: add platform_has() infrastructure 2022-06-06 08:06:00 +02:00
clocksource
crypto
drm
dt-bindings
keys
kunit
kvm
linux bpf: expose bpf_{g,s}etsockopt to lsm cgroup 2022-06-29 13:21:52 -07:00
math-emu
media
memory
misc
net net: Introduce a new proto_ops ->read_skb() 2022-06-20 14:05:52 +02:00
pcmcia
ras
rdma
scsi
soc net: dsa: felix: update base time of time-aware shaper when adjusting PTP time 2022-06-19 09:53:59 +01:00
sound
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-06-16 20:13:52 -07:00
uapi bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP 2022-06-29 13:21:52 -07:00
ufs
vdso
video
xen arm/xen: Assign xen-grant DMA ops for xen-grant DMA devices 2022-06-06 16:07:30 +02:00