Page MenuHomeFreeBSD

Make KENV_MVALLEN tunable
ClosedPublic

Authored by sjg on Jun 13 2020, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 2:39 AM
Unknown Object (File)
Sat, Apr 13, 9:07 PM
Unknown Object (File)
Tue, Apr 9, 1:38 AM
Unknown Object (File)
Wed, Mar 27, 7:08 PM
Unknown Object (File)
Dec 26 2023, 9:08 AM
Unknown Object (File)
Nov 3 2023, 12:32 PM
Unknown Object (File)
Nov 3 2023, 11:18 AM
Unknown Object (File)
Sep 19 2023, 12:07 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