Page MenuHomeFreeBSD

Restrict definition of CTL_P1003_1B_MAXID to the kernel
ClosedPublic

Authored by asomers on Jul 26 2020, 4:55 PM.
Tags
None
Referenced Files
F160615413: D25816.diff
Fri, Jun 26, 5:56 AM
Unknown Object (File)
Sun, Jun 21, 2:16 PM
Unknown Object (File)
Sat, Jun 20, 8:48 PM
Unknown Object (File)
Wed, Jun 17, 9:30 PM
Unknown Object (File)
May 26 2026, 3:34 PM
Unknown Object (File)
May 26 2026, 8:55 AM
Unknown Object (File)
May 10 2026, 6:17 AM
Unknown Object (File)
May 3 2026, 7:26 PM
Subscribers

Details

Summary

Restrict definition of CTL_P1003_1B_MAXID to the kernel

This constant is only used to size an array within the kernel. There are
probably no legitimate uses in userland. Worse, since the kernel's array
could theoretically change size over time, any use of that symbol in
userland wouldn't be forwards compatible to new kernel versions.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Perhaps move it into posix4_mib.c even? But this is also ok. I looked at the C file hoping we could replace this constant with using nitems() or the like, but the code is not really structured for that.

This revision is now accepted and ready to land.Jul 27 2020, 6:50 PM