Port-amd64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Suggestion for prekern: warning messages
Martin Husemann <martin%duskware.de@localhost> wrote:
>But I have a (maybe off topic) question (that I did ask Maxime back then
>but he evaded answering): why do we have a three phase bootstrap for this
>at all? What is it that prekern can do that /boot couldn't? IMHO prekern
>should go away and all its functionality moved to the regular bootloader
>(or where that does not work the kernel).
Going even further off topic, I have been using the following diff for
a while to avoid needing entropy when booting a non ASLR kernel.
Index: pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/pmap.c,v
retrieving revision 1.409
diff -u -r1.409 pmap.c
--- pmap.c 6 Feb 2021 21:24:19 -0000 1.409
+++ pmap.c 15 Apr 2021 12:55:02 -0000
@@ -1646,8 +1646,13 @@
panic("pmap_init_directmap: lastpa incorrect");
}
+#ifdef NO_X86_ASLR
+ randhole = 0;
+ randva = 0;
+#else
entropy_extract(&randhole, sizeof randhole, 0);
entropy_extract(&randva, sizeof randva, 0);
+#endif
startva = slotspace_rand(SLAREA_DMAP, lastpa, NBPD_L2,
randhole, randva);
endva = startva + lastpa;
Home |
Main Index |
Thread Index |
Old Index