summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-05-13 22:45:12 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-05-13 22:45:12 +0000
commit0813bddc089dc1133696d2a9692366523cfa4015 (patch)
tree243d3845592d5261188bcdf116f9979bdc311805 /sys/kern/init_main.c
parentd4d555e924e183fd9573e15c39d88d4bdd146f4d (diff)
Add option NO_PROPOLICE, which explicitely disables the use of the propolice
stack protection when building kernels. Intended to be used on installation media, with tight space constraints - currently, only added where SMALL_KERNEL was already defined. Not thoroughly tested, but requested by deraadt.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 6124b421e33..cdd9d4f0917 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.103 2003/05/13 06:11:11 tedu Exp $ */
+/* $OpenBSD: init_main.c,v 1.104 2003/05/13 22:45:11 miod Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -127,7 +127,9 @@ int boothowto;
struct timeval boottime;
struct timeval runtime;
+#if !defined(NO_PROPOLICE)
long __guard[8];
+#endif
/* XXX return int so gcc -Werror won't complain */
int main(void *);
@@ -180,7 +182,9 @@ main(framep)
quad_t lim;
int s, i;
register_t rval[2];
+#if !defined(NO_PROPOLICE)
int *guard = (int *)&__guard[0];
+#endif
extern struct pdevinit pdevinit[];
extern void scheduler_start(void);
extern void disk_init(void);
@@ -368,8 +372,10 @@ main(framep)
kmstartup();
#endif
+#if !defined(NO_PROPOLICE)
for (i = 0; i < sizeof(__guard) / 4; i++)
guard[i] = arc4random();
+#endif
/* Start the scheduler */
scheduler_start();