linux-stable/include
KP Singh 9e4e01dfd3 bpf: lsm: Implement attach, detach and execution
JITed BPF programs are dynamically attached to the LSM hooks
using BPF trampolines. The trampoline prologue generates code to handle
conversion of the signature of the hook to the appropriate BPF context.

The allocated trampoline programs are attached to the nop functions
initialized as LSM hooks.

BPF_PROG_TYPE_LSM programs must have a GPL compatible license and
and need CAP_SYS_ADMIN (required for loading eBPF programs).

Upon attachment:

* A BPF fexit trampoline is used for LSM hooks with a void return type.
* A BPF fmod_ret trampoline is used for LSM hooks which return an
  int. The attached programs can override the return value of the
  bpf LSM hook to indicate a MAC Policy decision.

Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Florent Revest <revest@google.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: James Morris <jamorris@linux.microsoft.com>
Link: https://lore.kernel.org/bpf/20200329004356.27286-5-kpsingh@chromium.org
2020-03-30 01:34:00 +02:00
..
acpi ACPI fixes for 5.6-rc4 2020-02-28 09:02:18 -08:00
asm-generic bpf: Support llvm-objcopy for vmlinux BTF 2020-03-19 12:32:38 +01:00
clocksource
crypto crypto: x86/curve25519 - support assemblers with no adx support 2020-03-05 18:28:09 +11:00
drm drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks 2020-03-12 19:07:24 -04:00
dt-bindings ARM: SoC: late updates 2020-02-08 14:17:27 -08:00
keys
kunit
kvm
linux bpf: lsm: Implement attach, detach and execution 2020-03-30 01:34:00 +02:00
math-emu
media
misc
net bpf, net: Fix build issue when net ns not configured 2020-03-30 01:16:50 +02:00
pcmcia
ras
rdma
scsi scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-14 17:13:54 -05:00
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-12 22:34:48 -07:00
sound ASoC: Fixes for v5.6 2020-03-07 07:24:36 +01:00
target
trace bpf: Reliably preserve btf_trace_xxx types 2020-03-02 16:49:55 -08:00
uapi bpf: Introduce BPF_PROG_TYPE_LSM 2020-03-30 01:34:00 +02:00
vdso
video
xen xen/xenbus: fix locking 2020-03-05 09:42:23 -06:00