Page MenuHomeFreeBSD

Restrict definition of CTL_P1003_1B_MAXID to the kernel
ClosedPublic

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

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

asomers created this revision.Sun, Jul 26, 4:55 PM
asomers requested review of this revision.Sun, Jul 26, 4:55 PM
jhb accepted this revision.Mon, Jul 27, 6:50 PM

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.Mon, Jul 27, 6:50 PM
This revision was automatically updated to reflect the committed changes.