HardenedBSD/sys/kern
Peter Wemm 88d1b64235 Fix a nasty bug that causes random crashes and lockups particularly on
very busy servers (eg: news, web).  This is an interaction between
embryonic processes that have not yet finished forking, and happen to
cause the kernel VM space to grow, hitting the uninitialised variable.

It was possible for this to strike at any time, depending on the size of
your kernel and load patterns.  One machine had paniced occasionally
when cron launches a job since before the 2.1 release.

If you had "options DIAGNOSTIC", you may have seen references to bogus
addresses like 0xdeadc142 and the like.

This is a minimal change to fix the problem, it will probably be done
better by reordering p_vmspace to be in the startzero section, but it
becomes harder to validate then.

It's been vulnerable since pmap.c rev 1.40 (Jan 9, 1995), so it's been a
cause of problems since well before 2.0.5.  This was when the merged
VM/buffer cache and the dynamic growing kernel VM space were first
committed.  This probably fixes a few of PR's.
1996-05-02 11:38:05 +00:00
..
imgact_aout.c First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
imgact_elf.c Removed unnecessary #includes from <sys/imgact.h> so that it is 1996-05-01 02:43:13 +00:00
imgact_gzip.c First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
imgact_shell.c Killed sections 3 and 4 of my copyright as I don't agree with it (I believe 1996-04-08 01:22:00 +00:00
inflate.c
init_main.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
init_sysent.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
init_sysvec.c Mega-commit for Linux emulator update.. This has been stress tested under 1996-03-02 19:38:20 +00:00
kern_acct.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
kern_clock.c
kern_conf.c
kern_descrip.c Fixed the unit numbers of the devfs `fd' devices. 1996-03-27 19:19:58 +00:00
kern_devconf.c
kern_exec.c Removed unnecessary #includes from <sys/imgact.h> so that it is 1996-05-01 02:43:13 +00:00
kern_exit.c Spell cpu_switch() with an i in a comment. 1996-04-11 20:56:29 +00:00
kern_fork.c Fix a nasty bug that causes random crashes and lockups particularly on 1996-05-02 11:38:05 +00:00
kern_ktrace.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
kern_lkm.c Removed unnecessary #includes from <sys/imgact.h> so that it is 1996-05-01 02:43:13 +00:00
kern_lockf.c
kern_malloc.c First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
kern_mib.c Move the "mib" variables out to their own file. 1996-04-07 13:03:06 +00:00
kern_ntptime.c
kern_physio.c
kern_proc.c Declared pgrpdump() properly. 1996-04-07 16:16:05 +00:00
kern_prot.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
kern_random.c Use rdtsc() function instead of inline essembler. 1996-04-07 18:16:26 +00:00
kern_resource.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
kern_sig.c Removed unnecessary #includes from <sys/imgact.h> so that it is 1996-05-01 02:43:13 +00:00
kern_subr.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
kern_synch.c Don't generate code for the unused function sleep(). 1996-04-07 13:35:58 +00:00
kern_sysctl.c Fix a longstanding bug and a buglet of no significance. 1996-04-13 13:28:54 +00:00
kern_tc.c
kern_time.c Removed never-used #includes of <machine/cpu.h>. Many were apparently 1996-04-07 17:39:28 +00:00
kern_timeout.c
kern_xxx.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
Make.tags.inc Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
Makefile Remove bogus architectures to allow make tags to work. 1996-03-31 18:53:43 +00:00
makesyscalls.sh Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
md5c.c
subr_autoconf.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
subr_clist.c Killed sections 3 and 4 of my copyright as I don't agree with it (I believe 1996-04-08 01:22:00 +00:00
subr_disklabel.c Yet more b_flags fixes. The previous ones broke the clearing of B_DONE 1996-04-19 19:34:19 +00:00
subr_diskmbr.c Removed now-unused #includes of <machine/cpu.h>. They were for bootverbose 1996-04-07 17:32:42 +00:00
subr_diskslice.c Fixed removal of devfs entries for the real slice corresponding to the 1996-04-19 19:22:29 +00:00
subr_dkbad.c Fix a bug that b_flags was getting unnecessarily modified by 1996-03-01 19:01:04 +00:00
subr_log.c Fixed name of /dev/fs/klog (it's not "log"). 1996-03-27 19:45:28 +00:00
subr_param.c First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
subr_prf.c KGDB is dead. It may come back one day if somebody does it. 1996-05-02 09:34:51 +00:00
subr_prof.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
subr_rlist.c In order to fix some concurrency problems with the swap pager early 1996-03-03 21:11:08 +00:00
subr_trap.c Remove a now unnecessary prototype from pmap.c. Also remove now 1996-03-28 05:40:58 +00:00
subr_xxx.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
sys_generic.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
sys_pipe.c Various pipe error return fixes, and a significant typeo fix. From 1996-03-25 01:48:28 +00:00
sys_process.c Because of the way that ptrace() now calls procfs routines to read/write 1996-03-30 15:02:58 +00:00
sys_socket.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
syscalls.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
syscalls.master Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
tty_conf.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
tty_cons.c Removed unused #include. 1996-05-01 03:32:46 +00:00
tty_pty.c Fixed the PF_REMOTE case of ptcwrite(). I broke it in rev.1.22. Output 1996-04-11 18:43:37 +00:00
tty_snoop.c Switched from using devfs_add_devsw() to devfs_add_devswf() 1996-03-28 14:31:42 +00:00
tty_subr.c Killed sections 3 and 4 of my copyright as I don't agree with it (I believe 1996-04-08 01:22:00 +00:00
tty_tb.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
tty_tty.c Switched from using devfs_add_devsw() to devfs_add_devswf() 1996-03-28 14:31:42 +00:00
tty.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
uipc_domain.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
uipc_mbuf.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
uipc_proto.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
uipc_sockbuf.c Changed socket code to use 4.4BSD queue macros. This includes removing 1996-03-11 15:37:44 +00:00
uipc_socket2.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
uipc_socket.c Fix for PR #1146: the "next" pointer must be cached before calling soabort 1996-04-16 03:50:08 +00:00
uipc_syscalls.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
uipc_usrreq.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_bio.c Correct handling of dirty pages in I/O buffers. The case where pages 1996-03-09 06:46:51 +00:00
vfs_cache.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_cluster.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_conf.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_export.c Put the "free vnode isn't" check back in the right place. 1996-03-09 06:43:19 +00:00
vfs_extattr.c
vfs_init.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_lookup.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_mount.c
vfs_subr.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_syscalls.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vfs_vnops.c Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vnode_if.pl
vnode_if.sh Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00
vnode_if.src Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all 1996-03-11 20:02:06 +00:00