minix/minix/lib/libsys
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
..
arch Clean up traces from long-gone sys_int86 interface 2016-07-20 19:00:44 +02:00
alloc_util.c libsys: mark regions allocated for DMA as special 2015-09-16 15:31:55 +00:00
assert.c New sources layout 2014-07-31 16:00:30 +02:00
asynsend.c Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
clock_time.c Kernel: export clock information on kernel page 2015-09-23 12:00:46 +00:00
closenb.c VFS: support for suspending close(2) for sockets 2017-03-09 23:39:50 +00:00
copyfd.c New sources layout 2014-07-31 16:00:30 +02:00
cpuavg.c Kernel: per-process CPU utilization statistics 2016-01-13 20:32:39 +01:00
ds.c New sources layout 2014-07-31 16:00:30 +02:00
env_get_prm.c Resolve more warnings 2015-09-23 12:04:58 +00:00
env_panic.c Retire env.h 2017-02-16 10:22:27 +00:00
env_parse.c Retire env.h 2017-02-16 10:22:27 +00:00
env_prefix.c Retire env.h 2017-02-16 10:22:27 +00:00
fkey_ctl.c New sources layout 2014-07-31 16:00:30 +02:00
gcov.c Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
getepinfo.c PM/libsys: extend getepinfo, add getsockcred(3) 2017-03-09 23:39:55 +00:00
getprocnr.c New sources layout 2014-07-31 16:00:30 +02:00
getsysinfo.c libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
getticks.c Kernel: export clock information on kernel page 2015-09-23 12:00:46 +00:00
getuptime.c MIB: initial tree population 2016-01-13 20:32:44 +01:00
kernel_call.c kernel: Allow kernel calls to return ENOTREADY. 2015-09-16 11:02:31 +00:00
kprintf.c New sources layout 2014-07-31 16:00:30 +02:00
kputc.c New sources layout 2014-07-31 16:00:30 +02:00
kputs.c New sources layout 2014-07-31 16:00:30 +02:00
llvm_gcov.c Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
Makefile UDS: prepare for socket file creation in bind(2) 2017-03-09 23:39:53 +00:00
mapdriver.c RS: add infrastructure for mapping socket drivers 2017-03-09 23:39:49 +00:00
optset.c New sources layout 2014-07-31 16:00:30 +02:00
panic.c kernel: Extend the sys_whoami() interface. 2015-09-16 11:01:36 +00:00
pci_attr_r8.c New sources layout 2014-07-31 16:00:30 +02:00
pci_attr_r16.c New sources layout 2014-07-31 16:00:30 +02:00
pci_attr_r32.c New sources layout 2014-07-31 16:00:30 +02:00
pci_attr_w8.c New sources layout 2014-07-31 16:00:30 +02:00
pci_attr_w16.c New sources layout 2014-07-31 16:00:30 +02:00
pci_attr_w32.c New sources layout 2014-07-31 16:00:30 +02:00
pci_del_acl.c New sources layout 2014-07-31 16:00:30 +02:00
pci_dev_name.c Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
pci_find_dev.c New sources layout 2014-07-31 16:00:30 +02:00
pci_first_dev.c Enable building with MKDEBUG and MKDEBUGLIB 2016-09-10 12:42:45 +02:00
pci_get_bar.c New sources layout 2014-07-31 16:00:30 +02:00
pci_ids.c New sources layout 2014-07-31 16:00:30 +02:00
pci_init.c New sources layout 2014-07-31 16:00:30 +02:00
pci_next_dev.c New sources layout 2014-07-31 16:00:30 +02:00
pci_rescan_bus.c New sources layout 2014-07-31 16:00:30 +02:00
pci_reserve.c New sources layout 2014-07-31 16:00:30 +02:00
pci_set_acl.c New sources layout 2014-07-31 16:00:30 +02:00
pci_slot_name.c New sources layout 2014-07-31 16:00:30 +02:00
pci.h New sources layout 2014-07-31 16:00:30 +02:00
proceventmask.c PM: generic process event publish/subscribe system 2016-01-16 14:04:10 +01:00
rmib.c RMIB: expose full node path; improve restartability 2017-03-09 23:39:55 +00:00
safecopies.c Fix soft faults in FSes resulting in partial I/O 2016-01-16 14:04:21 +01:00
sched_start.c libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
sched_stop.c libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
sef_fi.c SEF: identity transfer only after controlled crash 2016-06-17 18:19:25 +00:00
sef_gcov.c Add LLVM GCOV coverage support 2016-09-24 22:18:31 +00:00
sef_init.c SEF: identity transfer only after controlled crash 2016-06-17 18:19:25 +00:00
sef_liveupdate.c Fix ARM noassert builds -g/-O{s/0/1/2/3} 2016-01-24 18:56:38 +01:00
sef_llvm.c Resolve more warnings 2015-09-23 12:04:58 +00:00
sef_ping.c sef: Naming refactory. 2015-09-16 11:07:18 +00:00
sef_signal.c Resolve more warnings 2015-09-23 12:04:58 +00:00
sef_st.c SEF: query VM about holes during state transfer 2015-09-17 13:43:06 +00:00
sef.c SEF: identity transfer only after controlled crash 2016-06-17 18:19:25 +00:00
shlib_version New sources layout 2014-07-31 16:00:30 +02:00
socketpath.c UDS: full rewrite 2017-03-09 23:39:56 +00:00
sqrt_approx.c New sources layout 2014-07-31 16:00:30 +02:00
srv_fork.c New sources layout 2014-07-31 16:00:30 +02:00
srv_kill.c New sources layout 2014-07-31 16:00:30 +02:00
stacktrace.c libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
sys_abort.c New sources layout 2014-07-31 16:00:30 +02:00
sys_clear.c New sources layout 2014-07-31 16:00:30 +02:00
sys_diagctl.c New sources layout 2014-07-31 16:00:30 +02:00
sys_endsig.c New sources layout 2014-07-31 16:00:30 +02:00
sys_exec.c New sources layout 2014-07-31 16:00:30 +02:00
sys_exit.c New sources layout 2014-07-31 16:00:30 +02:00
sys_fork.c New sources layout 2014-07-31 16:00:30 +02:00
sys_getinfo.c kernel: Extend the sys_whoami() interface. 2015-09-16 11:01:36 +00:00
sys_getsig.c New sources layout 2014-07-31 16:00:30 +02:00
sys_hz.c New sources layout 2014-07-31 16:00:30 +02:00
sys_irqctl.c New sources layout 2014-07-31 16:00:30 +02:00
sys_kill.c New sources layout 2014-07-31 16:00:30 +02:00
sys_mcontext.c New sources layout 2014-07-31 16:00:30 +02:00
sys_memset.c New sources layout 2014-07-31 16:00:30 +02:00
sys_padconf.c New sources layout 2014-07-31 16:00:30 +02:00
sys_physcopy.c New sources layout 2014-07-31 16:00:30 +02:00
sys_privctl.c New sources layout 2014-07-31 16:00:30 +02:00
sys_runctl.c New sources layout 2014-07-31 16:00:30 +02:00
sys_safecopy.c libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
sys_safememset.c New sources layout 2014-07-31 16:00:30 +02:00
sys_schedctl.c New sources layout 2014-07-31 16:00:30 +02:00
sys_schedule.c Kernel: per-state CPU accounting 2016-01-13 20:32:38 +01:00
sys_setalarm.c Various timer improvements 2016-08-05 11:12:44 +00:00
sys_setgrant.c New sources layout 2014-07-31 16:00:30 +02:00
sys_settime.c New sources layout 2014-07-31 16:00:30 +02:00
sys_sigreturn.c New sources layout 2014-07-31 16:00:30 +02:00
sys_sigsend.c New sources layout 2014-07-31 16:00:30 +02:00
sys_sprof.c Basic statistical profiling fixes 2016-01-28 13:09:35 +01:00
sys_statectl.c kernel: Extend the sys_statectl() interface. 2015-09-16 11:01:15 +00:00
sys_stime.c New sources layout 2014-07-31 16:00:30 +02:00
sys_times.c New sources layout 2014-07-31 16:00:30 +02:00
sys_trace.c New sources layout 2014-07-31 16:00:30 +02:00
sys_umap.c New sources layout 2014-07-31 16:00:30 +02:00
sys_update.c kernel: Extend the {sys,vm}_update() interfaces. 2015-09-16 11:01:47 +00:00
sys_vircopy.c libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
sys_vmctl.c New sources layout 2014-07-31 16:00:30 +02:00
sys_vsafecopy.c New sources layout 2014-07-31 16:00:30 +02:00
sys_vtimer.c New sources layout 2014-07-31 16:00:30 +02:00
sys_vumap.c New sources layout 2014-07-31 16:00:30 +02:00
syslib.h New sources layout 2014-07-31 16:00:30 +02:00
sysutil.h libsys: resolve clang warnings 2014-09-30 20:08:54 +00:00
taskcall.c New sources layout 2014-07-31 16:00:30 +02:00
tickdelay.c libsys: make tickdelay(3) more reliable 2015-08-08 16:55:23 +00:00
timers.c Various timer improvements 2016-08-05 11:12:44 +00:00
vm_cache.c libminixfs/VM: fix memory-mapped file corruption 2015-08-13 13:46:46 +00:00
vm_exit.c New sources layout 2014-07-31 16:00:30 +02:00
vm_fork.c New sources layout 2014-07-31 16:00:30 +02:00
vm_getrusage.c Rework getrusage(2) infrastructure 2015-09-28 14:06:59 +00:00
vm_info.c New sources layout 2014-07-31 16:00:30 +02:00
vm_map_phys.c vm: Let SEF know about special mmapped regions. 2015-09-16 15:31:40 +00:00
vm_memctl.c vm: Improve live update support. 2015-09-16 11:06:41 +00:00
vm_prepare.c RS/VM: proper preparation for multi-VM live update 2015-09-17 14:01:06 +00:00
vm_procctl.c New sources layout 2014-07-31 16:00:30 +02:00
vm_set_priv.c New sources layout 2014-07-31 16:00:30 +02:00
vm_update.c kernel: Extend the {sys,vm}_update() interfaces. 2015-09-16 11:01:47 +00:00