NetBSD/sys/kern
pgoyette 462d797f59 In sysv_sem.c, defer establishment of exithook so we can initialize the
module code from module_init() rather than waiting until after calling
exec_init().  Use a RUN_ONCE routine at entry to each sys_sem* syscall
to establish the exithook, and no longer KASSERT that the hook has
been set before removing it.  (A manually loaded module can be unloaded
before any syscalls have been invoked.)

Remove the conditional calls to the various xxx_init() routines from
init_main.c - we now rely on module_init() to handle initialization.

Let each sub-component's xxx_init() routine handle its own sysctl
sub-tree initialization;  this removes another set of #ifdef ugliness.

Tested both built-in and loadable versions and verified that atf
test kernel/t_sysv passes.
2015-11-06 02:26:42 +00:00
..
bufq_disksort.c
bufq_fcfs.c
bufq_priocscan.c Mark a diagnostic only variable 2014-01-28 12:50:54 +00:00
bufq_readprio.c
cnmagic.c
core_elf32.c If we are writing PN_XNUM or more phdrs, include one section header and 2014-04-02 17:19:49 +00:00
core_elf64.c
core_netbsd.c Re-instate the zero length sections in elf core dumps (they probably help 2014-01-07 07:59:03 +00:00
exec_aout.c Remove spurious . 2014-03-07 01:55:01 +00:00
exec_ecoff.c c99 initializers for struct execsw 2014-03-07 01:33:43 +00:00
exec_elf32.c 1) On 64bit systems, don't add the 32bit execsw[] to the global exec array. 2014-07-22 08:18:33 +00:00
exec_elf64.c 1) On 64bit systems, don't add the 32bit execsw[] to the global exec array. 2014-07-22 08:18:33 +00:00
exec_elf.c Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries. 2015-11-01 17:44:41 +00:00
exec_script.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
exec_subr.c Revamp the way processes are PaX'ed in the kernel. Sent on tech-kern@ two 2015-09-26 16:12:24 +00:00
files.kern Build conf/param.c normally. 2015-09-03 01:09:38 +00:00
genlintstub.awk
init_main.c In sysv_sem.c, defer establishment of exithook so we can initialize the 2015-11-06 02:26:42 +00:00
init_sysctl_base.c Move a bunch of sysctl nodes from init_sysctl (kitchen sink sysctl file) 2015-08-25 14:52:31 +00:00
init_sysctl.c Move a bunch of sysctl nodes from init_sysctl (kitchen sink sysctl file) 2015-08-25 14:52:31 +00:00
init_sysent.c Regen 2015-10-10 03:30:17 +00:00
kern_acct.c
kern_auth.c Expose struct kauth_cred for the benefit of the debugger. I can't convince gcc 2015-10-06 22:13:39 +00:00
kern_cctr.c
kern_cfglock.c
kern_clock.c opt_ntp.h is no longer used in kern_clock.c 2015-04-22 16:46:58 +00:00
kern_condvar.c o Don't include sys/sched.h. Scheduler-related operation is done by 2015-08-07 06:22:12 +00:00
kern_core.c Fix a read-beyond-end string read. 2014-04-22 19:01:47 +00:00
kern_cpu.c Don't decrement the number of offline cpus if we fail to shut down one. 2015-08-29 12:24:00 +00:00
kern_ctf.c src is too big these days to tolerate superfluous apostrophes. It's 2014-10-18 08:33:23 +00:00
kern_descrip.c 1. mask fflags so we don't tack on whateve oflags were passed from userland 2015-08-03 04:55:15 +00:00
kern_drvctl.c include ioconf.h instead of locally declaring the prototype of the attach 2015-08-20 09:45:45 +00:00
kern_event.c put the exit code of the process in data, like FreeBSD does. 2015-03-02 19:24:53 +00:00
kern_exec.c Reset the PaX flags, make sure ep_emul_arg is NULL, and add a comment. 2015-10-22 11:48:02 +00:00
kern_exit.c Update value of p_stat before we release the proc_lock. Thanks to 2015-10-13 06:47:21 +00:00
kern_fileassoc.c table can't be NULL here. 2014-07-10 15:00:28 +00:00
kern_fork.c Change SDT (Statically Defined Tracing) probes to use link sets so that it 2015-10-02 16:54:15 +00:00
kern_history.c if NUSB == 0, don't look for usbhist. 2015-10-29 18:40:19 +00:00
kern_hook.c convert vmem, signals, powerhooks from CIRCLEQ -> TAILQ. 2013-11-22 21:04:11 +00:00
kern_idle.c
kern_ksyms_buf.c Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack 2015-08-30 01:46:02 +00:00
kern_ksyms.c Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack 2015-08-30 01:46:02 +00:00
kern_kthread.c Remove the unused and all-but-unusable kthread_destroy(). Also makes 2015-04-21 11:10:29 +00:00
kern_ktrace_vfs.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
kern_ktrace.c Replace callout_stop with callout_halt 2014-11-21 09:40:10 +00:00
kern_lock.c Trailing whitespace 2015-04-11 15:24:25 +00:00
kern_lwp.c Change SDT (Statically Defined Tracing) probes to use link sets so that it 2015-10-02 16:54:15 +00:00
kern_malloc.c Don't include <uvm/uvm_extern.h> 2015-02-06 18:21:29 +00:00
kern_module_vfs.c print kernel module path only in kernels which support paths 2014-12-02 13:00:38 +00:00
kern_module.c Remove extraneous ')' from previous. 2015-11-03 03:33:43 +00:00
kern_mutex_obj.c
kern_mutex.c typo 2015-05-25 21:02:37 +00:00
kern_ntptime.c Unused inits (harmless). 2015-07-24 13:02:52 +00:00
kern_pax.c PR/50312: Robert Elz: Unconditionally include <sys/exec.h> to fix compilation 2015-10-09 02:00:59 +00:00
kern_physio.c Don't check if constant-sized KM_SLEEP allocations succeeded. 2015-04-21 10:54:52 +00:00
kern_pmf.c Remove this MALLOC_DEFINE (M_PMF unused). 2015-02-13 13:26:50 +00:00
kern_proc.c implementation of KERN_PROC_PATHNAME, some refactoring for KERN_PROC. 2015-09-24 14:33:01 +00:00
kern_prot.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
kern_ras.c
kern_rate.c
kern_resource.c src is too big these days to tolerate superfluous apostrophes. It's 2014-10-18 08:33:23 +00:00
kern_rndpool.c Turn a kassert into a more appropriately placed ctassert. 2015-04-21 04:41:36 +00:00
kern_rndq.c when querying randomness sources from position 'start' then skip 'start' 2015-08-29 10:00:19 +00:00
kern_rndsink.c Save some space: use one condvar for all rndsinks. Not a hot spot. 2015-04-21 04:24:16 +00:00
kern_runq.c provide curthread for dtrace 2015-10-07 00:32:34 +00:00
kern_rwlock_obj.c
kern_rwlock.c Consistently use KPREEMPT_*() here. 2014-11-28 08:27:27 +00:00
kern_sdt.c Change SDT (Statically Defined Tracing) probes to use link sets so that it 2015-10-02 16:54:15 +00:00
kern_sig.c When delivering a signal, it's possible that the process's state in 2015-10-13 07:00:59 +00:00
kern_sleepq.c Don't next structure and enum definitions. 2014-09-05 05:57:21 +00:00
kern_softint.c softint: implement softint_schedule_cpu() to trigger software interrupts 2014-05-25 15:42:01 +00:00
kern_ssp.c
kern_stub.c fix interrupt_* stubs. reported by skrll@n.o 2015-08-28 07:18:39 +00:00
kern_subr.c Let MD code provide boot disk information as spec string that can be 2014-11-22 11:04:57 +00:00
kern_synch.c When clearing out the scheduler queues during system shutdown, we move 2015-10-13 00:25:51 +00:00
kern_syscall.c Use the generated list of auto-loadable syscalls rather than our own 2015-05-09 05:56:36 +00:00
kern_sysctl.c Fix typx in comment 2015-10-23 01:58:43 +00:00
kern_tc.c
kern_time.c CID/1325753: remove extra return. 2015-10-06 15:03:34 +00:00
kern_timeout.c don't compare user and kernel addresses 2015-02-09 20:46:55 +00:00
kern_todr.c <sys/rnd.h> -> <sys/rndsource.h> in kern_todr.c. 2015-04-13 16:36:54 +00:00
kern_turnstile.c
kern_uidinfo.c
kern_uuid.c Get arguments in the right order for copyout. (Oops!) 2014-10-05 10:00:03 +00:00
kern_veriexec.c Remove uvm_extern.h and exec.h (unused). 2015-08-04 12:44:04 +00:00
kern_xxx.c introduce a new way of handling SYSCALL_DEBUG messages -- send them to 2015-10-29 00:27:08 +00:00
kgdb_stub.c Wait for the next character forever as kgdb wants. 2015-06-26 14:26:38 +00:00
Make.tags.inc
Makefile Adjust for systrace based on the FreeBSD code: 2015-03-07 16:38:07 +00:00
makesyscalls.sh create an array of altsyscallnames, which are the syscall names that the 2015-09-24 14:30:52 +00:00
sched_4bsd.c 'miliseconds' -> 'milliseconds'. 2014-06-24 10:08:45 +00:00
sched_m2.c 'miliseconds' -> 'milliseconds'. 2014-06-24 10:08:45 +00:00
subr_autoconf.c Convert remaining MI <sys/rnd.h> stragglers. Many MD ones left. 2015-04-13 16:46:33 +00:00
subr_blist.c Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
subr_bufq.c Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
subr_callback.c
subr_copy.c #ifdef DIAGNOSTIC panic -> KASSERT 2015-04-21 13:17:25 +00:00
subr_cprng.c More rnd.h user cleanup. 2015-04-13 22:43:41 +00:00
subr_cpufreq.c Unlock correct mutex in an error path. 2014-02-12 20:20:15 +00:00
subr_debug.c
subr_device.c The use of root_device is not limited to vfs, so don't supply it in 2015-03-09 15:35:11 +00:00
subr_devsw.c Don't next structure and enum definitions. 2014-09-05 05:57:21 +00:00
subr_disk_mbr.c
subr_disk_open.c get the wedge info first if it exists, because this will support larger sizes. 2014-12-31 19:50:14 +00:00
subr_disk.c in bounds_check_with_*, reject negative block numbers and avoid 2015-05-14 17:31:24 +00:00
subr_evcnt.c Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
subr_exec_fd.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
subr_extent.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_hash.c hashinit: replace loop with a formula. 2014-05-29 21:15:55 +00:00
subr_humanize.c
subr_interrupt.c Add kernel code to support intrctl(8). 2015-08-17 06:16:02 +00:00
subr_iostat.c src is too big these days to tolerate superfluous apostrophes. It's 2014-10-18 08:33:23 +00:00
subr_ipi.c Implement ipi_trigger_multi(9); requested by cherry@. 2015-01-18 23:16:35 +00:00
subr_kcpuset.c Constify kcpuset_countset() and cpu_index() parameters. 2014-05-19 20:39:23 +00:00
subr_kmem.c Several changes and improvements in KMEM_GUARD: 2015-07-27 09:24:28 +00:00
subr_kobj_vfs.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_kobj.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_lockdebug.c Add _KERNEL_OPT 2015-09-29 01:44:57 +00:00
subr_log.c Don't log kern.msgbuf* sysctls. it's rather pointless, nobody can 2015-05-20 11:18:36 +00:00
subr_lwp_specificdata.c Mark a diagnostic-only variable 2013-10-25 16:09:29 +00:00
subr_once.c
subr_optstr.c
subr_pcq.c Use membar_datadep_consumer where code inspection reveals it necessary. 2015-01-08 23:39:57 +00:00
subr_pcu.c pcu: replace xcall(9) used for messaging with ipi(9). This provides 2014-05-25 14:53:55 +00:00
subr_percpu.c Consistently use kpreempt_*() outside scheduler path. 2014-11-27 15:00:00 +00:00
subr_physmap.c
subr_pool.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_prf.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_prof.c don't cast void * in c. 2014-07-10 21:13:52 +00:00
subr_pserialize.c Typo in comment. 2015-06-12 19:18:30 +00:00
subr_specificdata.c
subr_spldebug.c
subr_syscall_stats.c Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
subr_tftproot.c change nfs_boot_sendrecv to take sockaddr_in * instead of mbuf * 2015-05-21 02:04:22 +00:00
subr_time.c
subr_userconf.c Remove local getsn and use cngetsn. 2013-12-23 15:34:16 +00:00
subr_vmem.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_workqueue.c
subr_xcall.c Fix previous, use the correct value for softint_establish (SOFTINT_SERIAL). 2013-11-26 21:13:05 +00:00
sys_aio.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
sys_descrip.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
sys_generic.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
sys_lwp.c Unused inits (harmless). 2015-07-24 13:02:52 +00:00
sys_module.c Export module flags to userland 2015-11-04 04:28:58 +00:00
sys_mqueue.c CID 1308958: Fix reversed arguments in copyin(9) 2015-06-29 15:44:45 +00:00
sys_pipe.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
sys_pmc.c fix unused 2014-01-25 21:11:20 +00:00
sys_process.c Support PIOD_READ_AUXV so that gdb can handle PIE binaries. From OpenBSD. 2015-07-02 03:47:54 +00:00
sys_pset.c Don't forget to unlock the LWP. 2015-07-30 08:11:44 +00:00
sys_sched.c Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
sys_select.c Remove pollsock(). Since it took only a single socket, it was essentially 2014-04-25 15:52:45 +00:00
sys_sig.c Change SDT (Statically Defined Tracing) probes to use link sets so that it 2015-10-02 16:54:15 +00:00
sys_socket.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
sys_syscall.c regen 2015-03-07 16:38:49 +00:00
syscalls_autoload.c Regen 2015-10-10 03:30:17 +00:00
syscalls.c Regen 2015-10-10 03:30:17 +00:00
syscalls.conf <sys/mount.h> is necessary only with !RUMP_CLIENT, so include it only 2015-08-24 16:05:46 +00:00
syscalls.master Correctly mark syscalls 301, 302, 303 so that they will autoload the 2015-10-10 03:27:30 +00:00
systrace_args.c Regen 2015-10-10 03:30:17 +00:00
sysv_ipc.c In sysv_sem.c, defer establishment of exithook so we can initialize the 2015-11-06 02:26:42 +00:00
sysv_msg.c In sysv_sem.c, defer establishment of exithook so we can initialize the 2015-11-06 02:26:42 +00:00
sysv_sem.c In sysv_sem.c, defer establishment of exithook so we can initialize the 2015-11-06 02:26:42 +00:00
sysv_shm.c In sysv_sem.c, defer establishment of exithook so we can initialize the 2015-11-06 02:26:42 +00:00
tty_bsdpty.c Kernel portion of the multiple ptyfs mount support. Protocol changed 2014-04-04 18:11:58 +00:00
tty_conf.c Define TTY_ALLOW_PRIVATE in tty.c, tty_pty.c, and tty_conf.c. 2014-05-22 16:28:06 +00:00
tty_ptm.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
tty_pty.c include ioconf.h instead of locally declaring the prototype of the attach 2015-08-20 09:45:45 +00:00
tty_subr.c
tty_tty.c Add d_discard to all struct cdevsw instances I could find. 2014-07-25 08:10:31 +00:00
tty.c Add console-related ioctls. 2015-10-22 17:36:33 +00:00
uipc_accf.c Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
uipc_domain.c - add diagnostic check for sa_len 2014-12-02 19:45:58 +00:00
uipc_mbuf2.c
uipc_mbuf.c sprinkle _KERNEL_OPT 2015-08-24 22:21:26 +00:00
uipc_proto.c Add struct pr_usrreqs with a pr_generic function and prepare for the 2014-05-18 14:46:15 +00:00
uipc_sem.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
uipc_socket2.c sprinkle _KERNEL_OPT 2015-08-24 22:21:26 +00:00
uipc_socket.c Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
uipc_syscalls.c Don't overwrite the user iov pointer in sendmmsg. Make the send and receive 2015-11-01 17:23:36 +00:00
uipc_usrreq.c make connect syscall use sockaddr_big and modify pr_{send,connect} 2015-05-02 17:18:03 +00:00
vfs_bio.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
vfs_cache.c Change SDT (Statically Defined Tracing) probes to use link sets so that it 2015-10-02 16:54:15 +00:00
vfs_cwd.c
vfs_dirhash.c Don't next structure and enum definitions. 2014-09-05 05:57:21 +00:00
vfs_getcwd.c Change vnode operation lookup to return the resulting vnode *vpp unlocked. 2014-02-07 15:29:20 +00:00
vfs_hooks.c
vfs_init.c Remove miscfs/syncfs and 2015-05-06 15:57:07 +00:00
vfs_lockf.c
vfs_lookup.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
vfs_mount.c Redo Rev. 1.30: Change vfs_vnode_iterator_next() to skip reclaiming 2015-08-19 08:40:02 +00:00
vfs_quotactl.c Revert the following changes: 2014-06-28 22:27:50 +00:00
vfs_subr.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
vfs_syscalls.c Fix inverted KASSERT 2015-10-28 14:05:04 +00:00
vfs_trans.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
vfs_vnode.c Operations getnewvnode() and ungetnewvnode() have been replaced with vcache. 2015-07-12 08:11:27 +00:00
vfs_vnops.c Remove useless semicolon reported by Henning Petersen in PR#49634. 2015-02-04 07:09:37 +00:00
vfs_wapbl.c Refactor disk address calculation from physical block numbers in 2015-08-09 07:40:59 +00:00
vfs_xattr.c Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get 2014-09-05 09:20:59 +00:00
vnode_if.c regen for good measure (no functional change) 2015-04-20 23:11:27 +00:00
vnode_if.sh Support for vnode operation versioning. Allow a new keyword "VERSION" 2014-01-13 12:07:55 +00:00
vnode_if.src Fix comment in vnode_if.src to reflect change to VOP_LINK. 2015-04-20 23:08:07 +00:00