random data. But a new source of entropy arrived a few months ago
-- KARL generates highly disturbed images for some kernels (well,
not for bsd.rd)
This assumes the tail of text (just before etext[]) is readable.
We are trying to use a portable symbol name, and also avoid reading
a locore0 which has been unmapped...
ok mortimer
-/* $OpenBSD: rnd.c,v 1.197 2018/02/08 10:01:12 mortimer Exp $ */
+/* $OpenBSD: rnd.c,v 1.198 2018/02/09 03:01:24 deraadt Exp $ */
/*
* Copyright (c) 2011 Theo de Raadt.
void
random_start(void)
{
+ extern char etext[];
+
#if !defined(NO_PROPOLICE)
extern long __guard_local;
if (msgbufp->msg_magic == MSG_MAGIC)
add_entropy_words((u_int32_t *)msgbufp->msg_bufc,
msgbufp->msg_bufs / sizeof(u_int32_t));
+ add_entropy_words((u_int32_t *)etext - 32*1024,
+ 8192/sizeof(u_int32_t));
dequeue_randomness(NULL);
arc4_init(NULL);