Page MenuHomeFreeBSD

exterr: split category into multiple sources
ClosedPublic

Authored by brooks on Jul 14 2026, 8:08 PM.
Tags
None
Referenced Files
F168790756: D58236.diff
Sun, Aug 30, 4:23 AM
Unknown Object (File)
Fri, Aug 28, 5:53 AM
Unknown Object (File)
Thu, Aug 27, 8:45 PM
Unknown Object (File)
Wed, Aug 26, 11:13 AM
Unknown Object (File)
Tue, Aug 25, 8:41 PM
Unknown Object (File)
Tue, Aug 25, 1:07 PM
Unknown Object (File)
Tue, Aug 25, 2:36 AM
Unknown Object (File)
Sat, Aug 22, 6:41 AM
Subscribers

Details

Summary

The static, global index into an array of strings is simple, cheap,
and works for the base kernel, but is unworkable for (potentially
third-party) kernel modules or for arbitrary userspace code. Swipe a
couple of the top bits of category to indicate a source with all-zeros
being the current model (EXTERR_CAT_SRC_KERN_STATIC). Add two
additional sources EXTERR_CAT_SRC_KERN_DYNAMIC and EXTERR_CAT_SRC_USER
with stub implementations.

Sponsored by: Innovate UK

Diff Detail

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

Event Timeline

sys/sys/exterr_cat.h
25

I suggest reserving more than 2 bits there. Otherwise I am fine.

Reserve 4 bits for sources (up from 2)

This revision is now accepted and ready to land.Jul 20 2026, 4:01 PM