phunix/etc/system.conf
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

530 lines
8.5 KiB
Plaintext

#
# Boot system services in the boot image
#
service rs
{
uid 0;
ipc ALL; # ALL ipc targets allowed
system ALL; # ALL kernel calls allowed
vm # Extra VM calls allowed:
RS_SET_PRIV # 37
RS_UPDATE # 41
RS_MEMCTL # 42
PROCCTL # 45
RS_PREPARE # 48
;
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr SELF; # Signal manager is SELF
scheduler KERNEL; # Scheduler is KERNEL
priority 4; # priority queue 4
quantum 500; # default server quantum
};
service ds
{
uid 0;
ipc ALL_SYS; # All system ipc targets allowed
system ALL; # ALL kernel calls allowed
vm BASIC; # Only basic VM calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL
priority 4; # priority queue 4
quantum 500; # default server quantum
};
service vm
{
uid 0;
ipc ALL; # ALL ipc targets allowed
system ALL; # ALL kernel calls allowed
vm NONE; # No VM calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL
priority 2; # priority queue 2
quantum 500; # default server quantum
};
service pm
{
uid 0;
ipc ALL; # ALL ipc targets allowed
system ALL; # ALL kernel calls allowed
vm # Extra VM calls allowed:
EXIT # 00
FORK # 01
EXEC_NEWMEM # 03
WILLEXIT # 05
GETRUSAGE # 47
;
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL
priority 4; # priority queue 4
quantum 500; # default server quantum
};
service sched
{
uid 0;
ipc ALL_SYS; # All system ipc targets allowed
system ALL; # ALL kernel calls allowed
vm BASIC; # Only basic VM calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL
priority 4; # priority queue 4
quantum 500; # default server quantum
};
service vfs
{
uid 0;
ipc ALL; # ALL ipc targets allowed
system # Extra kernel calls allowed:
KILL # 06
UMAP # 14
VIRCOPY # 15
MEMSET
;
vm PROCCTL
VFS_MMAP
VFS_REPLY
;
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL
priority 5; # priority queue 5
quantum 500; # default server quantum
};
service mfs
{
ipc ALL_SYS; # All system ipc targets allowed
system BASIC; # Only basic kernel calls allowed
vm MAPCACHEPAGE SETCACHEPAGE FORGETCACHEPAGE CLEARCACHE;
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler sched; # Scheduler is sched
priority 5; # priority queue 5
quantum 500; # default server quantum
};
service ntfs-3g
{
uid SELF; # Use uid of user starting service
ipc ALL_SYS; # All system ipc targets allowed
system BASIC; # Only basic kernel calls allowed
vm BASIC; # Only basic VM calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler sched; # Scheduler is sched
priority 5; # priority queue 5
quantum 500; # default server quantum
};
service ext2
{
ipc ALL_SYS; # All system ipc targets allowed
system BASIC; # Only basic kernel calls allowed
vm MAPCACHEPAGE SETCACHEPAGE FORGETCACHEPAGE CLEARCACHE;
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler sched; # Scheduler is sched
priority 5; # priority queue 5
quantum 500; # default server quantum
};
service pfs
{
ipc ALL_SYS; # All system ipc targets allowed
system BASIC; # Only basic kernel calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler sched; # Scheduler is sched
priority 5; # priority queue 5
quantum 500; # default server quantum
};
service tty
{
uid 0;
ipc ALL_SYS; # All system ipc targets allowed
system # Extra kernel calls allowed:
KILL # 06
UMAP # 14
VIRCOPY # 15
PHYSCOPY # 16
IRQCTL # 19
DEVIO # 21
SDEVIO # 22
VDEVIO # 23
ABORT # 27
IOPENABLE # 28
READBIOS # 35
;
vm BASIC; # Only basic VM calls allowed
io ALL; # ALL I/O ranges allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL (prevents console stalls)
priority 1; # priority queue 1
quantum 50; # default driver quantum
};
service memory
{
uid 0;
ipc ALL_SYS; # All system ipc targets allowed
system # Extra kernel calls allowed:
UMAP # 14
VIRCOPY # 15
PHYSCOPY # 16
IRQCTL # 19
DEVIO # 21
SDEVIO # 22
VDEVIO # 23
IOPENABLE # 28
;
vm BASIC; # Only basic VM calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQ allowed
sigmgr rs; # Signal manager is RS
scheduler KERNEL; # Scheduler is KERNEL
priority 3; # priority queue 3
quantum 50; # default driver quantum
};
service log
{
ipc SYSTEM vfs rs vm;
priority 2;
};
service mib
{
system
VIRCOPY # 15
;
ipc ALL;
uid 0;
};
service init
{
uid 0;
ipc # ipc targets allowed:
pm vfs rs vm
;
system NONE; # No kernel calls allowed
vm BASIC; # Only basic VM calls allowed
io NONE; # No I/O range allowed
irq NONE; # No IRQs allowed
sigmgr pm; # Signal manager is PM
};
#
# Dynamically started system services
#
service floppy
{
irq 6;
io 3f0:8
0:10 # DMA controller
81 # Also DMA
;
system
UMAP # 14
IRQCTL # 19
DEVIO # 21
VDEVIO # 23
;
};
service readclock.drv
{
ipc ALL;
io 70:2;
system
PRIVCTL # 4
UMAP # 14
VIRCOPY # 15
DEVIO # 21
READBIOS # 35
;
uid 0;
};
service is
{
vm
INFO
;
uid 0;
};
service acpi
{
io ALL;
system
PRIVCTL # 4
DEVIO # 21
;
uid 0;
};
service pci
{
io cf8:8 # PCI bus controller
4d0:2 # PIIX
;
system
PRIVCTL # 4
DEVIO # 21
;
uid 0;
};
service ahci
{
system
UMAP # 14
VUMAP # 18
IRQCTL # 19
;
pci class
1/6/1 # Mass storage / SATA / AHCI
;
};
service virtio_blk
{
system
UMAP
VUMAP
IRQCTL
DEVIO
;
pci device 1af4:1001;
};
service at_wini
{
io 1f0:8 # Controller 0
3f6 # Also controller 0
170:8 # Controller 1
376 # Also controller 1
;
irq
14 # Controller 0
15 # Controller 1
;
system
UMAP # 14
IRQCTL # 19
DEVIO # 21
SDEVIO # 22
VDEVIO # 23
;
pci class # Match these PCI classes:
1/1 # Mass storage / IDE
;
pci device # In addition, match these devices:
1106:3149 # VIA VT6420 RAID (1/4)
1095:3512/1095:6512 # Silicon Image SATA RAID (1/4)
1095:3114/1095:3114 # Silicon Image SATA RAID (1/80)
;
};
service procfs
{
system
VIRCOPY # 15
;
vm
INFO
SETCACHEPAGE
CLEARCACHE
;
uid 0;
};
service isofs
{
system
UMAP # 14
;
vm MAPCACHEPAGE
SETCACHEPAGE
CLEARCACHE
;
uid 0;
};
service hgfs
{
ipc
SYSTEM pm vfs rs vm
;
vm
SETCACHEPAGE
CLEARCACHE
;
};
service filter
{
ipc
SYSTEM pm vfs rs ds vm
at_wini
;
control
at_wini
;
};
service input
{
ipc SYSTEM pm vfs rs ds tty vm;
priority 1;
};
service pckbd
{
system
IRQCTL # 19
DEVIO # 21
;
io 60:8; # Keyboard, keyboard command/status
irq
1 # Keyboard
12 # Auxiliary input (mouse)
;
ipc SYSTEM pm rs ds vm input;
priority 1;
};
service devman
{
uid 0;
vm
SETCACHEPAGE
CLEARCACHE
;
};
service mmc
{
system
PRIVCTL # 4
IRQCTL # 19
;
# Interrupts allowed
irq
64
83
; # IRQs allowed
priority 4; # priority queue 4
};
service fb
{
system
UMAP # 14
DEVIO # 21
PRIVCTL # 4
;
ipc
SYSTEM pm rs ds vm vfs cat24c256 tda19988
;
};
service cat24c256
{
ipc SYSTEM RS DS i2c;
};
service tda19988
{
ipc SYSTEM RS DS i2c;
};
service tps65217
{
uid 0; # needed for doing reboot()
system IRQCTL PRIVCTL;
irq 7; # NNMI pin on BeagleBone / BeagleBone Black
ipc SYSTEM RS DS PM i2c;
};
service tps65950
{
ipc SYSTEM RS DS i2c readclock.drv;
};
service fbd
{
ipc
SYSTEM vfs rs ds vm
ahci
at_wini
;
};
service vnd
{
ipc
SYSTEM vfs rs vm
;
uid 0; # only for copyfd(2)
};
service pty
{
system
KILL # 06
;
ipc
SYSTEM vfs rs vm
;
};
service ptyfs
{
ipc
SYSTEM pm vfs rs pty ds vm
;
};
service edfictl
{
ipc ALL;
};
service emmc
{
system
PRIVCTL
IRQCTL
PADCONF
;
irq
28 # MMCSD1INT
;
};