Page MenuHomeFreeBSD

exterr: split category into multiple sources
ClosedPublic

Authored by brooks on Jul 14 2026, 8:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 8, 6:32 PM
Unknown Object (File)
Sat, Aug 8, 5:28 PM
Unknown Object (File)
Sat, Aug 8, 5:24 PM
Unknown Object (File)
Wed, Aug 5, 10:03 PM
Unknown Object (File)
Wed, Aug 5, 10:03 PM
Unknown Object (File)
Wed, Aug 5, 9:19 PM
Unknown Object (File)
Wed, Aug 5, 8:49 PM
Unknown Object (File)
Mon, Aug 3, 2:26 PM
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.Mon, Jul 20, 4:01 PM