Page MenuHomeFreeBSD

namei: Treat non-tied KLDs as if they had INVARIANTS enabled
ClosedPublic

Authored by gallatin on Mar 17 2022, 2:45 PM.
Tags
None
Referenced Files
F132717956: D34588.id103947.diff
Sun, Oct 19, 7:45 AM
F132717930: D34588.id.diff
Sun, Oct 19, 7:45 AM
F132717922: D34588.id103952.diff
Sun, Oct 19, 7:45 AM
F132717918: D34588.id103994.diff
Sun, Oct 19, 7:45 AM
F132653503: D34588.diff
Sat, Oct 18, 7:04 PM
Unknown Object (File)
Tue, Oct 14, 10:06 AM
Unknown Object (File)
Sat, Oct 11, 12:41 PM
Unknown Object (File)
Sun, Oct 5, 4:43 AM
Subscribers

Details

Summary

When working with a vendor to debug their kernel module, I found that a non-tied kld will panic due to "namei: bad debugflags " on a kernel compiled with INVARIANTS because non-tied KLDs do not pick up the initialization that is done in NDINIT_DBG/NDREINIT_DBG().

Fix this by making this initialization happen for non- KLD_TIED as well as INVARIANTS

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

this needs a comment what the hack is for, as in how come this is not picked up automatically

  • Added a comment to why we enable debug stuff here as per mjg's request
This revision is now accepted and ready to land.Mar 17 2022, 5:34 PM