diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-05-13 06:11:12 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-05-13 06:11:12 +0000 |
commit | 22a330f3fea3925c8b1a1cc59340c512e70867c0 (patch) | |
tree | 7cea4db8c5db09b19857bd961213e957db963b79 /sys/kern/init_main.c | |
parent | 1cdbc3d18683a389c54ce61ec105d75fe6ffa5ef (diff) |
support for propolice in the kernel.
some style input itojun@ tdeval@ toby@
tested, mostly by deraadt, on i386, macppc, vax, sparc64
ok deraadt@ miod@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index ab8b820d19a..6124b421e33 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.102 2003/05/09 00:49:46 art Exp $ */ +/* $OpenBSD: init_main.c,v 1.103 2003/05/13 06:11:11 tedu Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -80,6 +80,8 @@ #include <sys/syscall.h> #include <sys/syscallargs.h> +#include <dev/rndvar.h> + #include <ufs/ufs/quota.h> #include <machine/cpu.h> @@ -125,6 +127,8 @@ int boothowto; struct timeval boottime; struct timeval runtime; +long __guard[8]; + /* XXX return int so gcc -Werror won't complain */ int main(void *); void check_console(struct proc *); @@ -176,6 +180,7 @@ main(framep) quad_t lim; int s, i; register_t rval[2]; + int *guard = (int *)&__guard[0]; extern struct pdevinit pdevinit[]; extern void scheduler_start(void); extern void disk_init(void); @@ -363,6 +368,9 @@ main(framep) kmstartup(); #endif + for (i = 0; i < sizeof(__guard) / 4; i++) + guard[i] = arc4random(); + /* Start the scheduler */ scheduler_start(); |