Page MenuHomeFreeBSD

Make KENV_MVALLEN tunable
ClosedPublic

Authored by sjg on Jun 13 2020, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 2 2024, 8:25 AM
Unknown Object (File)
Nov 22 2024, 6:44 AM
Unknown Object (File)
Oct 24 2024, 2:57 AM
Unknown Object (File)
Sep 16 2024, 12:55 PM
Unknown Object (File)
Sep 5 2024, 8:25 PM
Unknown Object (File)
Sep 2 2024, 6:27 AM
Unknown Object (File)
Jun 14 2024, 4:30 AM
Unknown Object (File)
May 14 2024, 5:43 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