PERFORCE change 164723 for review
Jonathan Anderson
jona at FreeBSD.org
Fri Jun 19 17:27:50 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164723
Change 164723 by jona at jona-trustedbsd-kentvm on 2009/06/19 17:27:18
Allow sandboxed processes to read SMP information (required for libthr)
Affected files ...
.. //depot/projects/trustedbsd/capabilities/src/sys/kern/subr_smp.c#8 edit
Differences ...
==== //depot/projects/trustedbsd/capabilities/src/sys/kern/subr_smp.c#8 (text+ko) ====
@@ -71,12 +71,12 @@
volatile int smp_started;
u_int mp_maxid;
-SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD, NULL, "Kernel SMP");
+SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD|CTLFLAG_CAPRD, NULL, "Kernel SMP");
-SYSCTL_INT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD, &mp_maxid, 0,
+SYSCTL_INT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_maxid, 0,
"Max CPU ID.");
-SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD, &mp_maxcpus, 0,
+SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_maxcpus, 0,
"Max number of CPUs that the system was compiled for.");
int smp_active = 0; /* are the APs allowed to run? */
@@ -84,12 +84,12 @@
"Number of Auxillary Processors (APs) that were successfully started");
int smp_disabled = 0; /* has smp been disabled? */
-SYSCTL_INT(_kern_smp, OID_AUTO, disabled, CTLFLAG_RDTUN, &smp_disabled, 0,
+SYSCTL_INT(_kern_smp, OID_AUTO, disabled, CTLFLAG_RDTUN|CTLFLAG_CAPRD, &smp_disabled, 0,
"SMP has been disabled from the loader");
TUNABLE_INT("kern.smp.disabled", &smp_disabled);
int smp_cpus = 1; /* how many cpu's running */
-SYSCTL_INT(_kern_smp, OID_AUTO, cpus, CTLFLAG_RD, &smp_cpus, 0,
+SYSCTL_INT(_kern_smp, OID_AUTO, cpus, CTLFLAG_RD|CTLFLAG_CAPRD, &smp_cpus, 0,
"Number of CPUs online");
int smp_topology = 0; /* Which topology we're using. */
More information about the p4-projects
mailing list