Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   riastradh
Date:           Wed Dec 18 21:46:03 UTC 2019

Modified Files:
        src/sys/arch/evbarm/fdt: fdt_machdep.c
        src/sys/stand/efiboot: boot.c efiboot.h efifdt.c efifdt.h exec.c
            version

Log Message:
Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed.  It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed.  Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.10 -r1.11 src/sys/stand/efiboot/efiboot.h
cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/efifdt.c
cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efifdt.h
cvs rdiff -u -r1.11 -r1.12 src/sys/stand/efiboot/exec.c
cvs rdiff -u -r1.13 -r1.14 src/sys/stand/efiboot/version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index