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)
Sun, Dec 1, 4:55 PM
Unknown Object (File)
Nov 1 2024, 9:24 PM
Unknown Object (File)
Nov 1 2024, 9:24 PM
Unknown Object (File)
Nov 1 2024, 9:23 PM
Unknown Object (File)
Nov 1 2024, 9:12 PM
Unknown Object (File)
Sep 23 2024, 7:13 PM
Unknown Object (File)
Sep 23 2024, 7:13 PM
Unknown Object (File)
Sep 23 2024, 7:13 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