freebsd-dev/sys/compat
Kyle Evans 5403f186a7 linuxolator: implement memfd_create syscall
This effectively mirrors our libc implementation, but with minor fudging --
name needs to be copied in from userspace, so we just copy it straight into
stack-allocated memfd_name into the correct position rather than allocating
memory that needs to be cleaned up.

The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS, have
also been implemented now that we support them.

Note that this implementation is still not quite at feature parity w.r.t.
the actual Linux version; some caveats, from my foggy memory:

- Need to implement SHM_GROW_ON_WRITE, default for memfd (in progress)
- LTP wants the memfd name exposed to fdescfs
- Linux allows open() of an fdescfs fd with O_TRUNC to truncate after dup.
  (?)

Interested parties can install and run LTP from ports (devel/linux-ltp) to
confirm any fixes.

PR:		240874
Reviewed by:	kib, trasz
Differential Revision:	https://reviews.freebsd.org/D21845
2020-06-29 03:09:14 +00:00
..
cloudabi vfs: track sequential reads and writes separately 2020-06-21 08:51:24 +00:00
cloudabi32 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
cloudabi64 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
freebsd32 Refactor ptrace() ABI compatibility. 2020-06-09 16:43:23 +00:00
ia32 Retire procfs-based process debugging. 2020-04-01 19:22:09 +00:00
lindebugfs LinuxKPI: Finalize move of lindebugfs from ports to base. 2019-05-19 15:44:21 +00:00
linprocfs fd: move vnodes out of filedesc into a dedicated structure 2020-03-01 21:53:46 +00:00
linsysfs Create a "drm" subdirectory for drm devices in linsysfs. Recent versions of 2019-09-23 12:27:55 +00:00
linux linuxolator: implement memfd_create syscall 2020-06-29 03:09:14 +00:00
linuxkpi/common Remove some redundant assignments and computations. 2020-06-28 21:34:38 +00:00
ndis Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netbsd sys/compat: further adoption of SPDX licensing ID tags. 2017-11-27 15:13:23 +00:00
x86bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00