summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2003-05-13 06:11:11 +0000
committertedu <tedu@openbsd.org>2003-05-13 06:11:11 +0000
commitb559c218f554b5c4bb28eddd11190bf22dfc6848 (patch)
tree58d89da9ea7c7dc5d3277ca5171b25b9ca211198 /sys/kern/init_main.c
parentturn layer fs back on. nullfs at least is very solid, and union isn't too (diff)
downloadwireguard-openbsd-b559c218f554b5c4bb28eddd11190bf22dfc6848.tar.xz
wireguard-openbsd-b559c218f554b5c4bb28eddd11190bf22dfc6848.zip
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.c10
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();