freebsd-dev/sys/kern
Mateusz Guzik bcd1cf4f03 capsicum: faster cap_rights_contains
Instead of doing a 2 iteration loop (determined at runeimt), take advantage
of the fact that the size is already known.

While here provdie cap_check_inline so that fget_unlocked does not have to
do a function call.

Verified with the capsicum suite /usr/tests.
2020-02-03 17:08:11 +00:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
genoffset.c
genoffset.sh
imgact_aout.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
imgact_binmisc.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
imgact_shell.c
init_main.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
init_sysent.c
kern_acct.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
kern_alq.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_clock.c sleep(9), sleepqueue(9): const'ify wchan pointers 2019-12-24 16:19:33 +00:00
kern_clocksource.c
kern_condvar.c
kern_conf.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_cons.c kern_cons: add a stub kbdinit for configs with no keyboard/console drivers 2019-12-26 15:47:19 +00:00
kern_context.c
kern_cpu.c hwpstate_intel(4): Silence/fix Coverity reports 2020-01-29 03:15:34 +00:00
kern_cpuset.c bitset: rename confusing macro NAND to ANDNOT 2019-12-13 09:32:16 +00:00
kern_ctf.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
kern_descrip.c capsicum: faster cap_rights_contains 2020-02-03 17:08:11 +00:00
kern_dtrace.c
kern_dump.c
kern_environment.c
kern_et.c
kern_event.c
kern_exec.c vfs: replace VOP_MARKATIME with VOP_MMAPPED 2020-02-01 06:46:55 +00:00
kern_exit.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_fail.c Use callout(9) instead of deprecated timeout(9) for fail points. 2019-12-13 19:26:04 +00:00
kern_ffclock.c
kern_fork.c schedlock 1/4 2019-12-15 21:11:15 +00:00
kern_hhook.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_idle.c
kern_intr.c Enter the network epoch for interrupt handlers of INTR_TYPE_NET. 2020-01-23 01:24:47 +00:00
kern_jail.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_kcov.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_khelp.c
kern_kthread.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_ktr.c Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
kern_ktrace.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
kern_linker.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_lock.c lockmgr: don't touch the lock past unlock 2020-01-24 07:42:57 +00:00
kern_lockf.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_lockstat.c
kern_loginclass.c
kern_malloc.c Change malloc_domain() to return the allocation size to the caller. 2020-01-09 15:02:48 +00:00
kern_mbuf.c Use a separate lock for the zone and keg. This provides concurrency 2020-01-04 03:15:34 +00:00
kern_mib.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_module.c
kern_mtxpool.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_mutex.c Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
kern_ntptime.c
kern_osd.c
kern_physio.c
kern_pmc.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_poll.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_priv.c
kern_proc.c Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
kern_procctl.c
kern_prot.c malloc: remove assumptions about MINALLOCSIZE 2020-01-14 02:14:02 +00:00
kern_racct.c
kern_rangelock.c
kern_rctl.c
kern_resource.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_rmlock.c Add rms_try_rlock and rms_wowned. 2020-01-31 08:36:49 +00:00
kern_rwlock.c locks: add default delay struct 2020-01-05 12:48:19 +00:00
kern_sdt.c
kern_sema.c
kern_sendfile.c Consistently use busy and vm_page_valid() rather than touching page bits 2020-01-23 04:54:49 +00:00
kern_sharedpage.c Fix the last few cases that grab without busy or valid. The grab functions must 2019-12-02 22:38:25 +00:00
kern_shutdown.c Add "panicked" boolean which can be tested instead of panicstr 2020-01-12 06:09:10 +00:00
kern_sig.c cache: replace kern___getcwd with vn_getcwd 2020-02-01 20:38:38 +00:00
kern_switch.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_sx.c locks: add default delay struct 2020-01-05 12:48:19 +00:00
kern_synch.c Provide an API for interlocked refcount sleeps. 2020-01-19 18:18:17 +00:00
kern_syscalls.c add a sanity check to the system call registration code 2019-12-11 15:52:29 +00:00
kern_sysctl.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_tc.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_thr.c schedlock 1/4 2019-12-15 21:11:15 +00:00
kern_thread.c vfs: prealloc vnodes in getnewvnode_reserve 2020-01-11 22:58:14 +00:00
kern_time.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_timeout.c Remove the deprecated timeout(9) interface. 2019-12-13 21:03:12 +00:00
kern_tslog.c
kern_ubsan.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_umtx.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
link_elf.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
linker_if.m
Make.tags.inc
Makefile sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
makesyscalls.sh
md4c.c
md5c.c
msi_if.m
p1003_1b.c
pic_if.m
posix4_mib.c
sched_4bsd.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
sched_ule.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_atomic64.c emulated atomic64: disable interrupts as the lock mechanism on !SMP 2020-01-03 18:29:20 +00:00
subr_autoconf.c
subr_blist.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_boot.c
subr_bufring.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_bus_dma.c
subr_bus.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_busdma_bufalloc.c
subr_capability.c capsicum: faster cap_rights_contains 2020-02-03 17:08:11 +00:00
subr_clock.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_compressor.c
subr_counter.c
subr_coverage.c
subr_csan.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_devmap.c Print upper 32 bits in devmap table entries 2019-12-20 03:40:53 +00:00
subr_devstat.c Use atomic for start_count in devstat_start_transaction(). 2019-12-30 03:13:38 +00:00
subr_disk.c
subr_dummy_vdso_tc.c
subr_early.c
subr_epoch.c Change argument order of epoch_call() to more natural, first function, 2020-01-17 06:10:24 +00:00
subr_eventhandler.c
subr_fattime.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_filter.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_firmware.c Factor out check for mounted root file system. 2019-11-28 08:47:36 +00:00
subr_gtaskqueue.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_hash.c
subr_hints.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_intr.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_kdb.c Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
subr_kobj.c
subr_lock.c locks: add default delay struct 2020-01-05 12:48:19 +00:00
subr_log.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c schedlock 1/4 2019-12-15 21:11:15 +00:00
subr_pctrie.c
subr_pidctrl.c
subr_power.c
subr_prf.c Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
subr_prof.c
subr_rangeset.c
subr_rman.c
subr_rtc.c
subr_sbuf.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_scanf.c
subr_sfbuf.c
subr_sglist.c
subr_sleepqueue.c Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
subr_smp.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_smr.c Add two missing fences with comments describing them. These were found by 2020-01-31 22:21:15 +00:00
subr_stack.c
subr_stats.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_syscall.c
subr_taskqueue.c schedlock 1/4 2019-12-15 21:11:15 +00:00
subr_terminal.c
subr_trap.c vfs: prealloc vnodes in getnewvnode_reserve 2020-01-11 22:58:14 +00:00
subr_turnstile.c schedlock 4/4 2019-12-15 21:26:50 +00:00
subr_uio.c
subr_unit.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_vmem.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_witness.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
sys_capability.c capsicum: faster cap_rights_contains 2020-02-03 17:08:11 +00:00
sys_generic.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
sys_getrandom.c Fix a typo in r356667 comment 2020-01-12 23:52:16 +00:00
sys_pipe.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
sys_procdesc.c procdesc: allow to collect status through wait(1) if process is traced 2019-11-25 18:33:21 +00:00
sys_process.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
sys_socket.c
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
sysv_sem.c
sysv_shm.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
tty_compat.c
tty_info.c Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
tty_inq.c
tty_outq.c
tty_pts.c tty_pts: don't rely on tty header pollution for sys/mutex.h 2019-11-29 03:56:01 +00:00
tty_tty.c
tty_ttydisc.c
tty.c vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
uipc_accf.c
uipc_debug.c
uipc_domain.c - Move global network epoch definition to epoch.h, as more different 2020-01-15 03:34:21 +00:00
uipc_ktls.c Make sure the VNET is properly set when calling tcp_drop() from 2020-01-21 11:43:25 +00:00
uipc_mbuf2.c
uipc_mbuf.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
uipc_mbufhash.c
uipc_mqueue.c Make mqueue objects work across a fork again. 2020-01-27 22:36:54 +00:00
uipc_sem.c
uipc_shm.c Don't hold the object lock while calling getpages. 2020-01-19 23:47:32 +00:00
uipc_sockbuf.c sysctl: hide 2.x era compat node 2020-01-02 01:23:43 +00:00
uipc_socket.c
uipc_syscalls.c
uipc_usrreq.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vfs_acl.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vfs_aio.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
vfs_bio.c Fix up various vnode-related asserts which did not dump the used vnode 2020-02-03 14:25:32 +00:00
vfs_cache.c Provide O_SEARCH 2020-02-02 16:34:57 +00:00
vfs_cluster.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vfs_default.c vfs: consistently use size_t for buflen around VOP_VPTOCNP 2020-02-01 20:34:43 +00:00
vfs_export.c
vfs_extattr.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vfs_hash.c vfs: incomplete pass at converting more ints to u_long 2020-01-11 22:56:20 +00:00
vfs_init.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vfs_lookup.c Provide O_SEARCH 2020-02-02 16:34:57 +00:00
vfs_mount.c Add kern_unmount() and use in Linuxulator. No functional changes. 2020-01-24 11:57:55 +00:00
vfs_mountroot.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
vfs_subr.c Provide O_SEARCH 2020-02-02 16:34:57 +00:00
vfs_syscalls.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vfs_vnops.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
vnode_if.src vfs: remove the now empty vop_unlock_post 2020-02-02 09:36:32 +00:00