Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Suggestion for prekern: warning messages



			Hi port-amd64@,

I’d like to have opinions on a few changes I am preparing for the prekern. (Patch attached)

Basically I would like to modify print_state() to accept more contexts than just ok/fail, and sprinkle a few more warning messages:
- when no hardware entropy instruction is supported
- when the entropy file was corrupted (instead of panic, rationale: none may have been found or specified)
- when no entropy file could be loaded

I introduced a yellow “[*]" symbol for this purpose (alternative suggestions welcome).

In my tests with QEMU (5.2.0 from pkgsrc 2021Q1 on macOS Catalina amd64) no CPU entropy instruction was detected (RDRAND and RDSEED are supported). Without an entropy file, I guess it only leaves the time of boot in order to guess the seed for KASLR, which is not ideal.

On another note, it might make sense to fully clear the screen before drawing the logo; otherwise the output is mangled with that of boot(8) when switching the console to e.g. a serial port for the kernel.

Another feature I have in mind is to detect the choice of console and support serial consoles in prekern. I guess it would make it easier to debug.

Attachment: patch-prekern_warnings.diff
Description: Binary data


Cheers!
--
khorben

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index