URL:
  <https://savannah.gnu.org/bugs/?64918>

                 Summary: Provide random entropy for the OpenBSD kernel
                   Group: GNU GRUB
               Submitter: yuichiro
               Submitted: Wed 22 Nov 2023 06:47:42 AM UTC
                Category: Booting
                Severity: Major
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 2.02
                 Release: 
         Discussion Lock: Any
         Reproducibility: Every Time
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 22 Nov 2023 06:47:42 AM UTC By: Yuichiro Naito <yuichiro>
The OpenBSD kernel expects that the loader fills random entropy in the
“.openbsd.randomdata” section. The OpenBSD loader generates pseudo-random
data in the following code.

https://github.com/openbsd/src/blob/master/sys/lib/libsa/loadfile_elf.c#L100-L108

I added almost the same logic to Grub2. It filled random bytes generated by
encrypted data from the random key and initial vector. And I fixed the
“pmtimer_tsc_get_random_bit” function to use the second bit, next to LSB.
Because my PC (core i7-6700) always returns even TSC value. So the LSB of the
TSC value is always 0. It won’t be the random bit.

My patch suppresses the OpenBSD kernel warning message,
“warning: no entropy supplied by boot loader”.







    _______________________________________________________
File Attachments:


-------------------------------------------------------
Date: Wed 22 Nov 2023 06:47:42 AM UTC  Name: openbsd_randomdata.patch  Size:
6KiB   By: yuichiro

<http://savannah.gnu.org/bugs/download.php?file_id=55346>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64918>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/


Reply via email to