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
Unknown Object (File)
Thu, Mar 28, 4:45 PM
Unknown Object (File)
Jan 14 2024, 2:16 PM
Unknown Object (File)
Dec 23 2023, 3:22 AM
Unknown Object (File)
Dec 21 2023, 7:24 AM
Unknown Object (File)
Nov 9 2023, 4:39 PM
Unknown Object (File)
Oct 31 2023, 2:32 AM
Unknown Object (File)
Oct 26 2023, 8:28 PM
Unknown Object (File)
Oct 8 2023, 3:35 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 Passed
Unit
No Test Coverage
Build Status
Buildable 32557
Build 30028: arc lint + arc unit

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