freebsd-dev/sys/amd64/linux
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
..
linux_dummy.c linuxolator: implement memfd_create syscall 2020-06-29 03:09:14 +00:00
linux_genassym.c
linux_locore.asm
linux_machdep.c Add linux_madvise(2) instead of having Linux apps call the native 2020-06-20 18:29:22 +00:00
linux_proto.h Regen. 2020-06-27 14:43:29 +00:00
linux_ptrace.c
linux_support.s
linux_syscall.h Regen after r362440. 2020-06-20 18:31:02 +00:00
linux_syscalls.c Regen after r362440. 2020-06-20 18:31:02 +00:00
linux_sysent.c Regen. 2020-06-27 14:43:29 +00:00
linux_systrace_args.c Regen. 2020-06-27 14:43:29 +00:00
linux_sysvec.c Handle getcpu() calls in vsyscall emulation on amd64. 2020-05-31 18:20:20 +00:00
linux_vdso.lds.s
linux.h Centralize compatability translation macros. 2020-04-14 20:30:48 +00:00
Makefile sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
syscalls.conf
syscalls.master Add proper types for linux message queue syscalls; mostly taken 2020-06-27 14:42:08 +00:00