Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2020 18:57:28 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363622 - head/sys/sys
Message-ID:  <202007271857.06RIvSS7044934@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007271857.06RIvSS7044934>