HomeFreeBSD

Fix zapping of static hints and env in init_static_kenv(). Environments

Description

Fix zapping of static hints and env in init_static_kenv(). Environments
are terminated by 2 NULs, but only 1 NUL was zapped. Zapping only 1
NUL just splits the first string into an empty string and a corrupted
string. All other strings in static hints and env remained live early
in the boot when they were supposed to be disabled.

Support calling init_static_kenv() very early in the boot, so as to
use the env very early in the boot. Then the pointer to the loader
env may change after the first call due to enabling paging or otherwise
remapping the pointer. Another call is needed to register the change.
Don't use the previous pointer in this (or any) later call.

Reviewed by: kib

Details

Provenance
bdeAuthored on
Reviewer
kib
Parents
rS343776: Re-apply scp filename matching fix.
Branches
Unknown
Tags
Unknown