opnsense-src/sys/kern
Ed Schouten 8328babdd0 Make pipes in CloudABI work.
Summary:
Pipes in CloudABI are unidirectional. The reason for this is that
CloudABI attempts to provide a uniform runtime environment across
different flavours of UNIX.

Instead of implementing a custom pipe that is unidirectional, we can
simply reuse Capsicum permission bits to support this. This is nice,
because CloudABI already attempts to restrict permission bits to
correspond with the operations that apply to a certain file descriptor.

Replace kern_pipe() and kern_pipe2() by a single kern_pipe() that takes
a pair of filecaps. These filecaps are passed to the newly introduced
falloc_caps() function that creates the descriptors with rights in
place.

Test Plan:
CloudABI pipes seem to be created with proper rights in place:

https://github.com/NuxiNL/cloudlibc/blob/master/src/libc/unistd/pipe_test.c#L44

Reviewers: jilles, mjg

Reviewed By: mjg

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D3236
2015-07-29 17:18:27 +00:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_binmisc.c
imgact_elf.c
imgact_elf32.c
imgact_elf64.c
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c
init_sysent.c
kern_acct.c
kern_alq.c
kern_clock.c
kern_clocksource.c
kern_condvar.c
kern_conf.c
kern_cons.c
kern_context.c
kern_cpu.c
kern_cpuset.c
kern_ctf.c
kern_descrip.c Introduce falloc_caps() to create descriptors with capabilties in place. 2015-07-29 17:16:53 +00:00
kern_dtrace.c
kern_dump.c
kern_environment.c
kern_et.c
kern_event.c
kern_exec.c The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
kern_exit.c
kern_fail.c
kern_ffclock.c
kern_fork.c
kern_gzio.c
kern_hhook.c
kern_idle.c
kern_intr.c
kern_jail.c
kern_khelp.c
kern_kthread.c
kern_ktr.c
kern_ktrace.c
kern_linker.c
kern_lock.c
kern_lockf.c
kern_lockstat.c
kern_loginclass.c
kern_malloc.c
kern_mbuf.c
kern_mib.c
kern_module.c
kern_mtxpool.c
kern_mutex.c
kern_ntptime.c
kern_numa.c
kern_osd.c
kern_physio.c
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c
kern_procctl.c
kern_prot.c
kern_racct.c
kern_rangelock.c
kern_rctl.c
kern_resource.c
kern_rmlock.c Build debug version of rmlock's methods only when LOCK_DEBUG > 0. 2015-07-26 10:53:32 +00:00
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_sharedpage.c
kern_shutdown.c - Make 'struct buf *buf' private to vfs_bio.c. Having a global variable 2015-07-29 02:26:57 +00:00
kern_sig.c
kern_switch.c
kern_sx.c
kern_synch.c
kern_syscalls.c
kern_sysctl.c
kern_tc.c
kern_thr.c
kern_thread.c
kern_time.c
kern_timeout.c
kern_umtx.c
kern_uuid.c
kern_xxx.c
ksched.c
link_elf.c
link_elf_obj.c
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c
sched_ule.c
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c
subr_bufring.c
subr_bus.c
subr_bus_dma.c
subr_busdma_bufalloc.c
subr_capability.c
subr_clock.c
subr_counter.c
subr_devstat.c
subr_disk.c
subr_dummy_vdso_tc.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_hash.c
subr_hints.c
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c - Make 'struct buf *buf' private to vfs_bio.c. Having a global variable 2015-07-29 02:26:57 +00:00
subr_pcpu.c
subr_pctrie.c
subr_power.c
subr_prf.c
subr_prof.c
subr_rman.c
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sfbuf.c
subr_sglist.c
subr_sleepqueue.c
subr_smp.c The smp_rendezvous_cpus() function should ensure that all accesses 2015-07-21 22:56:46 +00:00
subr_stack.c
subr_syscall.c
subr_taskqueue.c
subr_terminal.c
subr_trap.c
subr_turnstile.c
subr_uio.c
subr_unit.c
subr_vmem.c
subr_witness.c o Revert the other functional half of r239864, i. e. the merge of r134227 2015-07-24 15:13:21 +00:00
sys_capability.c
sys_generic.c
sys_pipe.c Make pipes in CloudABI work. 2015-07-29 17:18:27 +00:00
sys_procdesc.c
sys_process.c
sys_socket.c
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c
uipc_accf.c
uipc_debug.c
uipc_domain.c
uipc_mbuf.c
uipc_mbuf2.c
uipc_mbufhash.c
uipc_mqueue.c
uipc_sem.c Call ksem_get() with initialized 'rights'. 2015-07-23 23:18:03 +00:00
uipc_shm.c
uipc_sockbuf.c
uipc_socket.c Make shutdown() return ENOTCONN as required by POSIX, part deux. 2015-07-27 13:17:57 +00:00
uipc_syscalls.c Make shutdown() return ENOTCONN as required by POSIX, part deux. 2015-07-27 13:17:57 +00:00
uipc_usrreq.c
vfs_acl.c
vfs_aio.c
vfs_bio.c Move bufshutdown() out of the #ifdef INVARIANTS block. 2015-07-29 09:57:34 +00:00
vfs_cache.c
vfs_cluster.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
vfs_default.c
vfs_export.c
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c
vfs_mount.c
vfs_mountroot.c
vfs_subr.c
vfs_syscalls.c
vfs_vnops.c
vnode_if.src