Page MenuHomeFreeBSD

Restrict definition of CTL_P1003_1B_MAXID to the kernel

Authored by asomers on Jul 26 2020, 4:55 PM.



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

rS FreeBSD src repository - subversion
Lint OK
No Unit 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