linux-stable/include
Mickaël Salaün 265885daf3 landlock: Add syscall implementations
These 3 system calls are designed to be used by unprivileged processes
to sandbox themselves:
* landlock_create_ruleset(2): Creates a ruleset and returns its file
  descriptor.
* landlock_add_rule(2): Adds a rule (e.g. file hierarchy access) to a
  ruleset, identified by the dedicated file descriptor.
* landlock_restrict_self(2): Enforces a ruleset on the calling thread
  and its future children (similar to seccomp).  This syscall has the
  same usage restrictions as seccomp(2): the caller must have the
  no_new_privs attribute set or have CAP_SYS_ADMIN in the current user
  namespace.

All these syscalls have a "flags" argument (not currently used) to
enable extensibility.

Here are the motivations for these new syscalls:
* A sandboxed process may not have access to file systems, including
  /dev, /sys or /proc, but it should still be able to add more
  restrictions to itself.
* Neither prctl(2) nor seccomp(2) (which was used in a previous version)
  fit well with the current definition of a Landlock security policy.

All passed structs (attributes) are checked at build time to ensure that
they don't contain holes and that they are aligned the same way for each
architecture.

See the user and kernel documentation for more details (provided by a
following commit):
* Documentation/userspace-api/landlock.rst
* Documentation/security/landlock.rst

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: James Morris <jmorris@namei.org>
Cc: Jann Horn <jannh@google.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Link: https://lore.kernel.org/r/20210422154123.13086-9-mic@digikod.net
Signed-off-by: James Morris <jamorris@linux.microsoft.com>
2021-04-22 12:22:11 -07:00
..
acpi IOMMU Updates for Linux v5.12 2021-02-22 10:31:29 -08:00
asm-generic RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
clocksource
crypto Keyrings miscellany 2021-02-23 16:09:23 -08:00
drm drm/drm_vblank: set the dma-fence timestamp during send_vblank_event 2021-02-24 21:05:54 +05:30
dt-bindings RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
keys
kunit
kvm KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key 2021-03-06 04:18:40 -05:00
linux landlock: Add syscall implementations 2021-04-22 12:22:11 -07:00
math-emu
media media: rc: compile rc-cec.c into rc-core 2021-03-11 11:40:28 +01:00
memory
misc
net net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-02-23 11:29:52 -08:00
pcmcia
ras
rdma RDMA/ipoib: Remove racy Subnet Manager sendonly join checks 2021-02-16 14:42:58 -04:00
scsi scsi: libiscsi: Add helper to calculate max SCSI cmds per session 2021-02-08 22:39:04 -05:00
soc RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
sound ALSA/ASoC/SOF/SoundWire: fix Kconfig issues 2021-03-02 18:30:07 +01:00
target scsi: target: core: Add cmd length set before cmd complete 2021-02-22 22:21:29 -05:00
trace block-5.12-2021-02-27 2021-02-28 11:23:38 -08:00
uapi landlock: Add syscall implementations 2021-04-22 12:22:11 -07:00
vdso
video
xen Xen/gnttab: introduce common INVALID_GRANT_{HANDLE,REF} 2021-03-10 16:39:29 -06:00