NetBSD/sys/kern
knakahara 10f2dc77bc Add init function for mbuf.
some functions use mbuf as stack variable instead of allocating by m_get().
They should use this function(s) to prevent access to uninitialized fields.

Currently, the mbuf stack allocating functions are the following.
    + sys/dev/ic/bwi.c
      - bwi_rxeof()
      - bwi_encap()
    + sys/dev/ic/dp8390.c
      - dp8390_ipkdb_send()
    + sys/dev/pci/if_txp.c
      - txp_download_fw_section()
    + sys/dev/ppbus/if_plip.c
      - lptap()
    + sys/net/bpf.c
      - _pf_mtap2()
      - _pf_mtap_af()
      - _pf_mtap_sl_out()
    + sys/netisdn/i4b_ipr.c
      - ipr_rx_data_rdy()
      - ipr_tx_queue_empty()

Reviewed by kre@n.o and christos@n.o, thanks.
2016-04-20 08:50:43 +00:00
..
bufq_disksort.c
bufq_fcfs.c
bufq_priocscan.c
bufq_readprio.c
cnmagic.c
core_elf32.c
core_elf64.c
core_netbsd.c
exec_aout.c
exec_ecoff.c
exec_elf32.c
exec_elf64.c
exec_elf.c Allow enabling and disabling PaX ASLR debug 2016-03-19 18:56:37 +00:00
exec_script.c
exec_subr.c remove more ifdefs 2016-04-07 12:06:50 +00:00
files.kern Add passive references, intermediate between pserialize and refcount. 2016-04-09 06:21:16 +00:00
genlintstub.awk
init_main.c fix this properly. 2016-03-28 16:45:44 +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 Whether or not the semaphore code is loaded as a module or built-in, its 2015-11-09 01:21:18 +00:00
init_sysent.c regen 2016-04-03 01:22:39 +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
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
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 don't release mutexes you did not enter? Please develop with LOCKDEBUG on! 2015-12-07 20:01:43 +00:00
kern_event.c Split p_xstat (composite wait(2) status code, or signal number depending 2016-04-04 20:47:57 +00:00
kern_exec.c no need to pass the coredump flag to exit1() since it is set and known 2016-04-04 23:07:06 +00:00
kern_exit.c Implement WIFCONTINUED using the linux value instead of the FreeBSD one... 2016-04-06 03:51:26 +00:00
kern_fileassoc.c
kern_fork.c When doing an unlock/relock dance to avoid lock inversion, it's important 2016-01-09 07:52:38 +00:00
kern_history.c Improve ddb(4) show kernhist 2016-04-06 21:56:24 +00:00
kern_hook.c
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 KSYMS_MAX_ID is too small for i386 kernels built with MKDEBUG=yes, 2015-12-27 20:52:25 +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
kern_ktrace.c
kern_lock.c Trailing whitespace 2015-04-11 15:24:25 +00:00
kern_lwp.c no need to pass the coredump flag to exit1() since it is set and known 2016-04-04 23:07:06 +00:00
kern_malloc.c
kern_module_vfs.c Add debug messages to report all attempts to load modules (and their 2016-03-15 02:59:24 +00:00
kern_module.c In module_do_load(), consolidate checking for a pre-existing module, 2016-02-06 22:48:07 +00:00
kern_mutex_obj.c
kern_mutex.c typo 2015-05-25 21:02:37 +00:00
kern_ntptime.c Cast argument to uint64_t first before shifting to avoid UB for 2015-11-23 23:45:44 +00:00
kern_pax.c GC PAX_ASLR_EXEC 2016-04-10 15:41:05 +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 Split p_xstat (composite wait(2) status code, or signal number depending 2016-04-04 20:47:57 +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
kern_rndpool.c Turn a kassert into a more appropriately placed ctassert. 2015-04-21 04:41:36 +00:00
kern_rndq.c Mark skewsrcp as __diagused to unbreak non-DIAGNOSTIC builds. 2016-02-29 01:57:30 +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
kern_sdt.c fix inconsistency about "sdt" provider which was declared but not defined. 2016-04-04 03:53:25 +00:00
kern_sig.c don't create ktrace records if we were not asked. 2016-04-06 03:11:31 +00:00
kern_sleepq.c
kern_softint.c fix the following softint parallel operation problem. 2015-12-24 02:27:14 +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
kern_synch.c Split p_xstat (composite wait(2) status code, or signal number depending 2016-04-04 20:47:57 +00:00
kern_syscall.c KNF - Thanks, christos 2015-11-30 23:34:47 +00:00
kern_sysctl.c Fix typx in comment 2015-10-23 01:58:43 +00:00
kern_tc.c
kern_time.c - GC pts_fired, and fix the comment about MAX_TIMERS 2016-03-08 05:02:55 +00:00
kern_timeout.c fix crash(8) printing of callouts. 2015-11-24 15:48:23 +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
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 fix typo in previous 2016-01-26 23:46:37 +00:00
sched_4bsd.c
sched_m2.c
subr_autoconf.c Simplify. No functional change. 2016-03-28 09:50:40 +00:00
subr_blist.c
subr_bufq.c
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
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 Implement the 'io' provider for DTrace. From riastradh@, with 2016-02-01 05:05:43 +00:00
subr_disk_mbr.c
subr_disk_open.c Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of 2015-12-08 20:36:14 +00:00
subr_disk.c print the disklabel information on error if DIAGNOSTIC. 2016-01-06 00:22:30 +00:00
subr_evcnt.c
subr_exec_fd.c
subr_extent.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_hash.c
subr_humanize.c
subr_interrupt.c Add kernel code to support intrctl(8). 2015-08-17 06:16:02 +00:00
subr_iostat.c
subr_ipi.c
subr_kcpuset.c
subr_kmem.c fix vmem_alloc() to never return an error for VM_SLEEP requests, 2016-02-29 00:34:17 +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
subr_once.c
subr_optstr.c
subr_pcq.c
subr_pcu.c
subr_percpu.c
subr_physmap.c
subr_pool.c fix: "vmstat -C" CpuLayer showed only the last cpu values. 2016-02-05 03:04:52 +00:00
subr_prf.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
subr_prof.c
subr_pserialize.c Typo in comment. 2015-06-12 19:18:30 +00:00
subr_psref.c Split psref_held into internal and public variants. 2016-04-13 08:31:00 +00:00
subr_specificdata.c
subr_spldebug.c
subr_syscall_stats.c
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
subr_vmem.c fix vmem_alloc() to never return an error for VM_SLEEP requests, 2016-02-29 00:34:17 +00:00
subr_workqueue.c
subr_xcall.c
sys_aio.c
sys_descrip.c
sys_generic.c
sys_lwp.c Unused inits (harmless). 2015-07-24 13:02:52 +00:00
sys_module.c Put the code in charge of handling MODCTL_STAT into a separate function. 2015-12-12 14:47:37 +00:00
sys_mqueue.c CID 1308958: Fix reversed arguments in copyin(9) 2015-06-29 15:44:45 +00:00
sys_pipe.c
sys_pmc.c
sys_process.c Split p_xstat (composite wait(2) status code, or signal number depending 2016-04-04 20:47:57 +00:00
sys_pset.c Don't forget to unlock the LWP. 2015-07-30 08:11:44 +00:00
sys_sched.c
sys_select.c
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
sys_syscall.c regen 2015-03-07 16:38:49 +00:00
syscalls_autoload.c regen 2016-04-03 01:22:39 +00:00
syscalls.c regen 2016-04-03 01:22:39 +00:00
syscalls.conf rump needs <sys/idtype.h> 2016-04-03 01:22:18 +00:00
syscalls.master include <sys/idtype.h> 2016-04-03 01:00:26 +00:00
systrace_args.c regen 2016-04-03 01:22:39 +00:00
sysv_ipc.c When unloading the module, clear the address of the kauth_listener 2015-12-05 00:51: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 We never exec(2) with a kernel vmspace, so do not test for that, but instead 2015-11-26 13:15:34 +00:00
tty_bsdpty.c
tty_conf.c
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
tty.c Add console-related ioctls. 2015-10-22 17:36:33 +00:00
uipc_accf.c
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c Add init function for mbuf. 2016-04-20 08:50:43 +00:00
uipc_proto.c
uipc_sem.c Mark kern.posix.semcnt as READONLY - we don't want users changing the 2015-11-09 01:55:03 +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 Add sc_pid to sockcred so that SOCK_DGRAM and LOCAL_CREDS socket option 2016-04-06 19:45:45 +00:00
vfs_bio.c Implement the 'io' provider for DTrace. From riastradh@, with 2016-02-01 05:05:43 +00:00
vfs_cache.c Fix lying comment. 2015-12-05 05:23:35 +00:00
vfs_cwd.c
vfs_dirhash.c
vfs_getcwd.c
vfs_hooks.c
vfs_init.c Remove miscfs/syncfs and 2015-05-06 15:57:07 +00:00
vfs_lockf.c
vfs_lookup.c Fix (finally) the rest of PR 47040. 2016-04-12 04:02:55 +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
vfs_subr.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
vfs_syscalls.c Fix kern/50841: races in sys_lseek. 2015-11-28 15:26:29 +00:00
vfs_trans.c to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
vfs_vnode.c Take the vnode lock before the vnode is marked VI_CHANGING and fed 2015-11-12 11:35:42 +00:00
vfs_vnops.c
vfs_wapbl.c Enable the module's MODULE_CMD_FINI action. It actually works as 2015-11-15 03:09:39 +00:00
vfs_xattr.c
vnode_if.c regen vnode interfaces 2016-01-26 23:30:10 +00:00
vnode_if.sh "rump_private.h" -> <rump-sys/kern.h> 2016-01-26 23:28:06 +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