Page MenuHomeFreeBSD

LinuxKPI: introduce LINUXKPI_DEBUG to enable LinuxKPI debugging
Needs ReviewPublic

Authored by bz on Dec 3 2025, 9:41 PM.
Tags
None
Referenced Files
F166442305: D54060.id178531.diff
Thu, Aug 13, 2:36 PM
F166306919: D54060.id178531.diff
Wed, Aug 12, 7:28 PM
F166305492: D54060.id178531.diff
Wed, Aug 12, 7:13 PM
Unknown Object (File)
Mon, Aug 10, 8:39 AM
Unknown Object (File)
Sun, Aug 9, 5:43 PM
Unknown Object (File)
Sun, Aug 9, 9:43 AM
Unknown Object (File)
Sun, Aug 9, 9:28 AM
Unknown Object (File)
Sun, Aug 9, 9:24 AM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

This allows us to build kernels which will (if the sysctl is enabled
too) to show pr_debug() and pr_devel() output.

Enable it by default for debug kernels.

This option can later also be used for other LinuxKPI parts, like
skbuffs, netdevice, rcu, ... to conditionally compile in debugging
support to further justify its existence beyond an in-code #define.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73412
Build 70295: arc lint + arc unit

Event Timeline

bz requested review of this revision.Dec 3 2025, 9:41 PM
bz planned changes to this revision.Dec 6 2025, 10:55 PM
bz added inline comments.
sys/conf/options
907

opt-Linuxkpi.h should likely also just be added to LINUXKPI_GENSRCS?

Also add opt_linuxkpi.h to LINUXKPI_GENSRCS by default.

bz planned changes to this revision.Feb 4 2026, 1:07 AM

sys/conf/std.nodebug is missing

Add the missing std.nnodebug line.

If this is OK now and could go in then I could make more use of it.

Unless there will be objections I'll put this in by Tuesday evening.

I just found another case this would be useful (turn some LinuxKPI lock debugging on -- instead of having SX_NOWITNESS). Would make ti so much easier to debug a deadlock.

And that is in addition to the pr_debug calls with th sysctl, skbuff DEBUG and other subsystem DBEUG #ifdefs which most could vanish with this....