freebsd-dev/sys
Jilles Tjoelker c2e3c52e0d Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.
This change allows creating file descriptors with close-on-exec set in some
situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and
socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file
descriptors (SCM_RIGHTS) atomically close-on-exec.

The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.
MSG_CMSG_CLOEXEC is the first free bit for MSG_*.

The SOCK_* flags are not passed to MAC because this may cause incorrect
failures and can be done later via fcntl() anyway. On the other hand, audit
is expected to cope with the new flags.

For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags
argument.

Reviewed by:	kib
2013-03-19 20:58:17 +00:00
..
amd64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
arm Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
boot Attach the elf section headers to the loaded kernel as metadata, so 2013-03-10 00:43:01 +00:00
bsm - Implement two new system calls: 2013-03-02 21:11:30 +00:00
cam Commit the removal of a whitespace to record the proper commit message 2013-03-19 15:05:21 +00:00
cddl Plug memory leak in dsl_check_snap_cb() 2013-03-19 07:47:51 +00:00
compat Use m_get/m_gethdr instead of compat macros. 2013-03-15 12:55:30 +00:00
conf Sync back vmcontention branch into HEAD: 2013-03-18 00:25:02 +00:00
contrib Simplify TAILQ usage and avoid additional memory allocations. 2013-03-05 08:08:16 +00:00
crypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
ddb Small textdump enhancements. 2012-11-01 04:07:08 +00:00
dev Break out the RX completion path into "FIFO check / refill" and 2013-03-19 19:32:28 +00:00
fs Fix remainder calculation when biosize is not a power of 2 2013-03-19 13:06:11 +00:00
gdb
geom The geom_part provider supports unmapped bio iff the underlying 2013-03-19 14:50:24 +00:00
gnu/fs/reiserfs Garbage collect XFS bits which are now already completely disconnected 2013-03-02 15:33:54 +00:00
i386 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
ia64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
isa
kern Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. 2013-03-19 20:58:17 +00:00
kgssapi Piete.Brooks at cl.cam.ac.uk reported via email a crash which was 2012-12-18 00:25:48 +00:00
libkern Add __aeabi_memset to libkern, implemented using memset, as clang may 2013-03-16 23:11:55 +00:00
mips Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
modules Fix the powerpc64 build. MACHINE_CPUARCH is common for powerpc/powerpc64, 2013-03-19 00:39:02 +00:00
net Fix style and comments. 2013-03-19 05:51:47 +00:00
net80211 Kill this, it's not needed at this point and (hopefully) the parent 2013-03-10 04:38:06 +00:00
netatalk Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netgraph Fix compilation warning. 2013-02-15 07:58:51 +00:00
netinet In m_megapullup() instead of reserving some space at the end of packet, 2013-03-17 07:37:10 +00:00
netinet6 - Use m_getcl() instead of hand allocating. 2013-03-15 13:48:53 +00:00
netipsec Use m_get2() + m_align() instead of hand made key_alloc_mbuf(). Code 2013-03-15 10:20:15 +00:00
netipx Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netnatm Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netpfil Separate the locking macros that are used in the packet flow path 2013-03-19 06:04:17 +00:00
netsmb Call make_dev_credf() rather than using the couple make_dev()/dev_ref(). 2013-03-09 16:58:19 +00:00
nfs Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
nfsclient Fix remainder calculation when biosize is not a power of 2 2013-03-19 13:06:11 +00:00
nfsserver Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
nlm Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
ofed Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
opencrypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
pc98 Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
pci Fix build. 2013-02-21 12:52:18 +00:00
powerpc Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
rpc Revert 195703 and 195821 as this special stop handling in NFS is now 2013-03-13 21:06:03 +00:00
security Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
sparc64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
sys Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. 2013-03-19 20:58:17 +00:00
teken
tools Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
ufs UFS support of the unmapped i/o for the user data buffers. 2013-03-19 15:08:15 +00:00
vm Do not map the swap i/o pbufs if the geom provider for the swap 2013-03-19 14:39:27 +00:00
x86 MFcalloutng: 2013-02-28 13:46:03 +00:00
xdr Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
xen Move the corresponding MTX_SYSINIT() next to their struct mtx declaration 2012-10-26 17:31:35 +00:00
Makefile Remove netncp cscope entry missed in r248097 2013-03-12 14:21:52 +00:00