HardenedBSD/sys/kern
Konstantin Belousov 98168a6e6c kqueue: drain kqueue taskqueue if syscall tickled it
Otherwise return from the syscall and next syscall, which could be
kevent(2) on the kqueue that should be notified, races with the kqueue
taskqueue thread, and potentially misses the wakeup.  This is reliably
visible when kevent(2) only peeks into events using zeroed timeout.

PR:	258310
Reported by:	arichardson, Jan Kokemüller <jan.kokemueller@gmail.com>
Reviewed by:	arichardson, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D31858
2021-09-07 02:43:34 +03:00
..
bus_if.m
clock_if.m
cpufreq_if.m
device_if.m
firmw.S
genassym.sh
genoffset.c
genoffset.sh
imgact_aout.c
imgact_binmisc.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
imgact_shell.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 Re-implement virtual console (constty). 2021-09-03 22:18:51 -04:00
kern_context.c
kern_cpu.c
kern_cpuset.c
kern_ctf.c
kern_descrip.c fsetown: Avoid process group lock recursion 2021-08-28 15:50:44 -04:00
kern_dtrace.c
kern_dump.c
kern_environment.c
kern_et.c
kern_event.c kqueue: drain kqueue taskqueue if syscall tickled it 2021-09-07 02:43:34 +03:00
kern_exec.c Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
kern_exit.c
kern_fail.c
kern_ffclock.c
kern_fork.c
kern_hhook.c
kern_idle.c
kern_intr.c
kern_jail.c
kern_kcov.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 Introduce m_get3() 2021-08-18 08:48:27 +02:00
kern_mib.c
kern_module.c
kern_mtxpool.c
kern_mutex.c callout(9): Allow spin locks use with callout_init_mtx(). 2021-09-02 21:16:46 -04:00
kern_ntptime.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
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_sendfile.c
kern_sharedpage.c
kern_shutdown.c
kern_sig.c sigtimedwait: Use a unique wait channel for sleeping 2021-08-16 15:11:15 -04:00
kern_switch.c
kern_sx.c
kern_synch.c Add _sleep to TSLOG 2021-09-05 12:50:15 -07:00
kern_syscalls.c
kern_sysctl.c
kern_tc.c
kern_thr.c
kern_thread.c
kern_time.c itimer: Serialize access to the p_itimers array 2021-08-31 16:38:05 -04:00
kern_timeout.c callout(9): Allow spin locks use with callout_init_mtx(). 2021-09-02 21:16:46 -04:00
kern_tslog.c
kern_ubsan.c
kern_umtx.c
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c
link_elf.c
linker_if.m
Make.tags.inc
Makefile syscalls.master: switch to CAPENABLED flags 2021-09-01 21:58:16 +01:00
md4c.c
md5c.c
msi_if.m
p1003_1b.c
pic_if.m
posix4_mib.c
sched_4bsd.c
sched_ule.c
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_asan.c
subr_atomic64.c
subr_autoconf.c Add run_interrupt_driven_config_hooks to TSLOG 2021-09-05 12:45:29 -07:00
subr_blist.c
subr_boot.c
subr_bufring.c
subr_bus_dma.c
subr_bus.c
subr_busdma_bufalloc.c
subr_capability.c
subr_clock.c
subr_compressor.c
subr_counter.c
subr_coverage.c
subr_csan.c
subr_devmap.c
subr_devstat.c
subr_disk.c
subr_dummy_vdso_tc.c
subr_early.c
subr_epoch.c
subr_eventhandler.c
subr_fattime.c
subr_filter.c
subr_firmware.c
subr_gtaskqueue.c
subr_hash.c
subr_hints.c
subr_intr.c
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c
subr_mchain.c
subr_module.c
subr_msan.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c
subr_pctrie.c
subr_physmem.c
subr_pidctrl.c
subr_power.c
subr_prf.c Unify console output. 2021-09-03 23:13:42 -04:00
subr_prng.c
subr_prof.c
subr_rangeset.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
subr_smr.c
subr_stack.c
subr_stats.c
subr_syscall.c
subr_taskqueue.c callout(9): Allow spin locks use with callout_init_mtx(). 2021-09-02 21:16:46 -04:00
subr_terminal.c
subr_trap.c kqueue: drain kqueue taskqueue if syscall tickled it 2021-09-07 02:43:34 +03:00
subr_turnstile.c
subr_uio.c
subr_unit.c
subr_vmem.c vmem: disable debug.vmem_check by default 2021-09-02 18:28:45 +00:00
subr_witness.c witness: remove ifnet_rw 2021-08-18 08:51:26 +02:00
sys_capability.c
sys_eventfd.c
sys_generic.c
sys_getrandom.c
sys_pipe.c pipe_paircreate(): do not leak pipepair memory on error 2021-08-16 17:08:44 +03:00
sys_procdesc.c
sys_process.c Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
sys_socket.c
syscalls.c
syscalls.master syscalls.master: correct formatting issues 2021-09-01 21:58:22 +01:00
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c
tty.c Re-implement virtual console (constty). 2021-09-03 22:18:51 -04:00
uipc_accf.c
uipc_debug.c
uipc_domain.c uipc: avoid circular pr_{slow,fast}timos 2021-08-18 12:46:54 -05:00
uipc_ktls.c ktls: Support asynchronous dispatch of AEAD ciphers. 2021-08-30 13:11:52 -07:00
uipc_mbuf2.c
uipc_mbuf.c
uipc_mbufhash.c
uipc_mqueue.c
uipc_sem.c
uipc_shm.c fspacectl(2): Changes on rmsr.r_offset's minimum value returned 2021-08-26 00:03:37 +08:00
uipc_sockbuf.c
uipc_socket.c
uipc_syscalls.c connect: Use soconnectat() unconditionally in kern_connect() 2021-08-27 08:32:07 -04:00
uipc_usrreq.c
vfs_acl.c
vfs_aio.c lio_listio(2): Allow LIO_READV and LIO_WRITEV. 2021-08-22 23:00:42 +12:00
vfs_bio.c
vfs_cache.c cache: retire cache_fast_revlookup sysctl 2021-08-23 15:31:44 +02:00
vfs_cluster.c cluster_write(): do not access buffer after it is released 2021-09-02 21:36:33 +03:00
vfs_default.c vfs_default: Change vop_stddeallocate() from static to global 2021-08-27 18:25:44 -07:00
vfs_export.c
vfs_extattr.c
vfs_hash.c vfs_hash_rehash(): require the vnode to be exclusively locked 2021-08-27 18:39:45 +03:00
vfs_init.c
vfs_lookup.c vfs: s/__unused/__diagused in crossmp_* 2021-08-23 15:23:42 +02:00
vfs_mount.c vfs: drop dedicated sysinit for mountlist_mtx 2021-08-26 20:52:03 +02:00
vfs_mountroot.c
vfs_subr.c
vfs_syscalls.c fstatat(2): handle non-vnode file descriptors for AT_EMPTY_PATH 2021-08-14 00:17:18 +03:00
vfs_vnops.c vfs: Use file_cred for VOP_DEALLOCATE in vn_deallocate if non-NULL 2021-09-01 20:19:08 +08:00
vnode_if.src