minix/minix/lib/libc/sys
David van Moolenbroek 27852ebe53 UDS: full rewrite
This new implementation of the UDS service is built on top of the
libsockevent library.  It thereby inherits all the advantages that
libsockevent brings.  However, the fundamental restructuring
required for that change also paved the way for resolution of a
number of other important open issues with the old UDS code.  Most
importantly, the rewrite brings the behavior of the service much
closer to POSIX compliance and NetBSD compatibility.  These are the
most important changes:

- due to the use of libsockevent, UDS now supports multiple suspending
  calls per socket and a large number of standard socket flags and
  options;
- socket address matching is now based on <device,inode> lookups
  instead of canonized path names, and socket addresses are no longer
  altered either due to canonization or at connect time;
- the socket state machine is now well defined, most importantly
  resolving the erroneous reset-on-EOF semantics of the old UDS, but
  also allowing socket reuse;
- sockets are now connected before being accepted instead of being
  held in connecting state, unless the LOCAL_CONNWAIT option is set
  on either the connecting or the listening socket;
- connect(2) on datagram sockets is now supported (needed by syslog),
  and proper datagram socket disconnect notification is provided;
- the receive queue now supports segmentation, associating ancillary
  data (in-flight file descriptors and credentials) with each segment
  instead of being kept fully separately; this is a POSIX requirement
  (and needed by tmux);
- as part of the segmentation support, the receive queue can now hold
  as many packets as can fit, instead of one;
- in addition to the flags supported by libsockevent, the MSG_PEEK,
  MSG_WAITALL, MSG_CMSG_CLOEXEC, MSG_TRUNC, and MSG_CTRUNC send and
  receive flags are now supported;
- the SO_PASSCRED and SO_PEERCRED socket options are replaced by
  LOCAL_CREDS and LOCAL_PEEREID respectively, now following NetBSD
  semantics and allowing use of NetBSD libc's getpeereid(3);
- memory usage is reduced by about 250 KB due to centralized in-flight
  file descriptor tracking, with a limit of OPEN_MAX total rather than
  of OPEN_MAX per socket;
- memory usage is reduced by another ~50 KB due to removal of state
  redundancy, despite the fact that socket path names may now be up to
  253 bytes rather than the previous 104 bytes;
- compared to the old UDS, there is now very little direct indexing on
  the static array of sockets, thus allowing dynamic allocation of
  sockets more easily in the future;
- the UDS service now has RMIB support for the net.local sysctl tree,
  implementing preliminary support for NetBSD netstat(1).

Change-Id: I4a9b6fe4aaeef0edf2547eee894e6c14403fcb32
2017-03-09 23:39:56 +00:00
..
__getcwd.c New sources layout 2014-07-31 16:00:30 +02:00
__getlogin.c New sources layout 2014-07-31 16:00:30 +02:00
__sysctl.c Add MIB service, sysctl(2) support 2016-01-13 20:32:37 +01:00
_exit.c New sources layout 2014-07-31 16:00:30 +02:00
_mcontext.c New sources layout 2014-07-31 16:00:30 +02:00
_ucontext.c New sources layout 2014-07-31 16:00:30 +02:00
accept.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
access.c New sources layout 2014-07-31 16:00:30 +02:00
adjtime.c New sources layout 2014-07-31 16:00:30 +02:00
bind.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
brk.c New sources layout 2014-07-31 16:00:30 +02:00
chdir.c New sources layout 2014-07-31 16:00:30 +02:00
chmod.c New sources layout 2014-07-31 16:00:30 +02:00
chown.c New sources layout 2014-07-31 16:00:30 +02:00
chroot.c New sources layout 2014-07-31 16:00:30 +02:00
clock_getres.c New sources layout 2014-07-31 16:00:30 +02:00
clock_gettime.c New sources layout 2014-07-31 16:00:30 +02:00
clock_settime.c New sources layout 2014-07-31 16:00:30 +02:00
close.c VFS: support for suspending close(2) for sockets 2017-03-09 23:39:50 +00:00
connect.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
dup.c New sources layout 2014-07-31 16:00:30 +02:00
dup2.c New sources layout 2014-07-31 16:00:30 +02:00
environ.c New sources layout 2014-07-31 16:00:30 +02:00
execve.c New sources layout 2014-07-31 16:00:30 +02:00
fchmod.c New sources layout 2014-07-31 16:00:30 +02:00
fchown.c New sources layout 2014-07-31 16:00:30 +02:00
fcntl.c VFS: add support for F_DUPFD_CLOEXEC 2015-07-20 13:55:10 +00:00
flock.c Import NetBSD flock(1) 2015-09-23 12:03:13 +00:00
fork.c New sources layout 2014-07-31 16:00:30 +02:00
fpathconf.c New sources layout 2014-07-31 16:00:30 +02:00
fstatfs.c New sources layout 2014-07-31 16:00:30 +02:00
fstatvfs.c New sources layout 2014-07-31 16:00:30 +02:00
fsync.c New sources layout 2014-07-31 16:00:30 +02:00
ftruncate.c New sources layout 2014-07-31 16:00:30 +02:00
futimens.c New sources layout 2014-07-31 16:00:30 +02:00
futimes.c New sources layout 2014-07-31 16:00:30 +02:00
gcov_flush_sys.c Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
getdents.c VFS: store process suspension state as union 2016-08-05 11:15:15 +00:00
getegid.c New sources layout 2014-07-31 16:00:30 +02:00
geteuid.c New sources layout 2014-07-31 16:00:30 +02:00
getgid.c New sources layout 2014-07-31 16:00:30 +02:00
getgroups.c New sources layout 2014-07-31 16:00:30 +02:00
getitimer.c New sources layout 2014-07-31 16:00:30 +02:00
getpeername.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
getpgrp.c New sources layout 2014-07-31 16:00:30 +02:00
getpid.c New sources layout 2014-07-31 16:00:30 +02:00
getppid.c New sources layout 2014-07-31 16:00:30 +02:00
getrlimit.c Start using sysctl(3) throughout userland 2016-01-13 20:32:45 +01:00
getrusage.c Rework getrusage(2) infrastructure 2015-09-28 14:06:59 +00:00
getsid.c New sources layout 2014-07-31 16:00:30 +02:00
getsockname.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
getsockopt.c UDS: full rewrite 2017-03-09 23:39:56 +00:00
gettimeofday.c New sources layout 2014-07-31 16:00:30 +02:00
getuid.c New sources layout 2014-07-31 16:00:30 +02:00
getvfsstat.c New sources layout 2014-07-31 16:00:30 +02:00
init.c Abstract away minix_kerninfo access 2015-09-21 15:09:04 +00:00
ioctl.c libc: support for deprecated FIO* ioctl(2) calls 2015-09-23 12:03:06 +00:00
issetugid.c New sources layout 2014-07-31 16:00:30 +02:00
kernel_utils.c Kernel: separate userland ABI on kernel page 2015-09-23 12:01:15 +00:00
kill.c New sources layout 2014-07-31 16:00:30 +02:00
link.c New sources layout 2014-07-31 16:00:30 +02:00
listen.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
loadname.c New sources layout 2014-07-31 16:00:30 +02:00
lseek.c New sources layout 2014-07-31 16:00:30 +02:00
lutimes.c New sources layout 2014-07-31 16:00:30 +02:00
m_closefrom.c New sources layout 2014-07-31 16:00:30 +02:00
Makefile.inc Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
minix_rs.c New sources layout 2014-07-31 16:00:30 +02:00
MISSING_SYSCALLS New sources layout 2014-07-31 16:00:30 +02:00
mkdir.c New sources layout 2014-07-31 16:00:30 +02:00
mkfifo.c New sources layout 2014-07-31 16:00:30 +02:00
mknod.c New sources layout 2014-07-31 16:00:30 +02:00
mmap.c New sources layout 2014-07-31 16:00:30 +02:00
mount.c Rename MINIX service(8) to minix-service(8) 2017-02-22 17:16:21 +00:00
nanosleep.c New sources layout 2014-07-31 16:00:30 +02:00
open.c New sources layout 2014-07-31 16:00:30 +02:00
pathconf.c New sources layout 2014-07-31 16:00:30 +02:00
pipe.c VFS: start off cleanup of pipe2 IPC message 2016-02-22 23:23:02 +00:00
poll.c libc: more poll(3) wrapper fixes 2017-02-16 10:18:26 +00:00
posix_spawn.c libc: make posix_spawn(3) clean up child on failure 2016-12-28 13:05:55 +00:00
pread.c New sources layout 2014-07-31 16:00:30 +02:00
priority.c New sources layout 2014-07-31 16:00:30 +02:00
ptrace.c libc: resolve minix clang warnings 2014-09-30 20:35:56 +00:00
pwrite.c New sources layout 2014-07-31 16:00:30 +02:00
read.c VFS: store process suspension state as union 2016-08-05 11:15:15 +00:00
readlink.c New sources layout 2014-07-31 16:00:30 +02:00
reboot.c New sources layout 2014-07-31 16:00:30 +02:00
recvfrom.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
recvmsg.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
rename.c New sources layout 2014-07-31 16:00:30 +02:00
rmdir.c New sources layout 2014-07-31 16:00:30 +02:00
sbrk.c New sources layout 2014-07-31 16:00:30 +02:00
select.c New sources layout 2014-07-31 16:00:30 +02:00
sem.c IPC server: NetBSD sync, general improvements 2016-01-16 13:58:47 +01:00
sendmsg.c Do not hide the MSG_NOSIGNAL flag 2016-06-18 12:20:48 +00:00
sendto.c Do not hide the MSG_NOSIGNAL flag 2016-06-18 12:20:48 +00:00
setgid.c New sources layout 2014-07-31 16:00:30 +02:00
setgroups.c New sources layout 2014-07-31 16:00:30 +02:00
setitimer.c New sources layout 2014-07-31 16:00:30 +02:00
setpgid.c libc: resolve minix clang warnings 2014-09-30 20:35:56 +00:00
setrlimit.c libc: resolve minix clang warnings 2014-09-30 20:35:56 +00:00
setsid.c New sources layout 2014-07-31 16:00:30 +02:00
setsockopt.c UDS: full rewrite 2017-03-09 23:39:56 +00:00
settimeofday.c New sources layout 2014-07-31 16:00:30 +02:00
setuid.c New sources layout 2014-07-31 16:00:30 +02:00
shmat.c New sources layout 2014-07-31 16:00:30 +02:00
shmctl.c New sources layout 2014-07-31 16:00:30 +02:00
shmget.c New sources layout 2014-07-31 16:00:30 +02:00
shutdown.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
sigaction.c New sources layout 2014-07-31 16:00:30 +02:00
sigpending.c New sources layout 2014-07-31 16:00:30 +02:00
sigprocmask.c New sources layout 2014-07-31 16:00:30 +02:00
sigreturn.c New sources layout 2014-07-31 16:00:30 +02:00
sigsuspend.c New sources layout 2014-07-31 16:00:30 +02:00
sizeup.c libc: resolve minix clang warnings 2014-09-30 20:35:56 +00:00
socket.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
socketpair.c libc: fix local from-source upgrades 2016-03-09 12:11:57 +00:00
sprofile.c libc: resolve minix clang warnings 2014-09-30 20:35:56 +00:00
stack_utils.c Kernel: separate userland ABI on kernel page 2015-09-23 12:01:15 +00:00
stat.c New sources layout 2014-07-31 16:00:30 +02:00
statvfs.c New sources layout 2014-07-31 16:00:30 +02:00
stime.c New sources layout 2014-07-31 16:00:30 +02:00
svrctl.c svrctl(2) update 2014-09-29 16:15:21 +00:00
symlink.c New sources layout 2014-07-31 16:00:30 +02:00
sync.c New sources layout 2014-07-31 16:00:30 +02:00
syscall.c New sources layout 2014-07-31 16:00:30 +02:00
truncate.c New sources layout 2014-07-31 16:00:30 +02:00
umask.c New sources layout 2014-07-31 16:00:30 +02:00
unlink.c New sources layout 2014-07-31 16:00:30 +02:00
utimensat.c New sources layout 2014-07-31 16:00:30 +02:00
utimes.c New sources layout 2014-07-31 16:00:30 +02:00
vectorio.c libc: reorganize vector I/O wrappers 2016-02-22 23:24:47 +00:00
vfork.c New sources layout 2014-07-31 16:00:30 +02:00
wait4.c PM: add support for wait4(2) 2015-09-29 18:15:28 +00:00
write.c VFS: store process suspension state as union 2016-08-05 11:15:15 +00:00