Page MenuHomeFreeBSD

Make KENV_MVALLEN tunable
ClosedPublic

Authored by sjg on Jun 13 2020, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 11, 9:06 AM
Unknown Object (File)
Mon, May 11, 12:59 AM
Unknown Object (File)
Mon, May 11, 12:35 AM
Unknown Object (File)
Mon, May 11, 12:35 AM
Unknown Object (File)
Sun, May 10, 9:10 AM
Unknown Object (File)
Mon, Apr 27, 11:58 AM
Unknown Object (File)
Apr 17 2026, 8:12 PM
Unknown Object (File)
Apr 16 2026, 4:41 PM
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