Author: asomers
Date: Mon Jul 27 18:57:28 2020
New Revision: 363622
URL: https://svnweb.freebsd.org/changeset/base/363622

Log:
  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.
  
  Reviewed by:  jhb
  MFC after:    Never
  Differential Revision:        https://reviews.freebsd.org/D25816

Modified:
  head/sys/sys/sysctl.h

Modified: head/sys/sys/sysctl.h
==============================================================================
--- head/sys/sys/sysctl.h       Mon Jul 27 18:46:20 2020        (r363621)
+++ head/sys/sys/sysctl.h       Mon Jul 27 18:57:28 2020        (r363622)
@@ -1096,9 +1096,9 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
 #define        CTL_P1003_1B_SIGQUEUE_MAX               24      /* int */
 #define        CTL_P1003_1B_TIMER_MAX                  25      /* int */
 
-#define        CTL_P1003_1B_MAXID              26
-
 #ifdef _KERNEL
+
+#define        CTL_P1003_1B_MAXID              26
 
 /*
  * Declare some common oids.
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to