Page MenuHomeFreeBSD

Make KENV_MVALLEN tunable
ClosedPublic

Authored by sjg on Jun 13 2020, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 17, 2:10 PM
Unknown Object (File)
Tue, Jun 10, 3:20 AM
Unknown Object (File)
Apr 20 2025, 12:23 PM
Unknown Object (File)
Apr 20 2025, 7:25 AM
Unknown Object (File)
Apr 20 2025, 3:43 AM
Unknown Object (File)
Apr 20 2025, 3:35 AM
Unknown Object (File)
Apr 20 2025, 3:10 AM
Unknown Object (File)
Mar 29 2025, 12:49 AM
Subscribers

Details

Reviewers
stevek
kevans
Summary

When doing secure boot, loader wants to export loader.ve.hashed
the value of which typically exceeds KENV_MVALLEN.

Replace use of KENV_MVALLEN with tunable kenv_mvallen.

Add getenv_string_buffer() for the case where a stack buffer cannot be
created and use uma_zone_t kenv_zone for suitably sized buffers.

Obtained from: Abhishek Kulkarni <abkulkarni@juniper.net>
Sponsored by: Juniper Networks

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31686
Build 29258: arc lint + arc unit

Event Timeline

sjg requested review of this revision.Jun 13 2020, 5:18 PM
sjg signed these changes with MFA.Jun 13 2020, 5:28 PM
sjg added reviewers: stevek, kevans.

This looks good to me.

I do wonder about the scenario (pre-existing): if some module were to kern_getenv() before the dynamic kenv was prepped and attempted to freeenv() after it was ready, we'd do the wrong thing. That's perhaps an unlikely scenario, though; the dynamic environment is established pretty early in boot, just after SI_SUB_KMEM).

This revision is now accepted and ready to land.Jun 16 2020, 4:55 PM