summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-09-05 14:13:35 +0000
committerbde <bde@FreeBSD.org>1998-09-05 14:13:35 +0000
commit668b45f6c603a28f3e5d672c89e9226189d44fc9 (patch)
treeea953b9c71a0ce4442c6607352f8464f002d52d3 /sys
parent4630814c8bc51e668f785289086657fbd5e775f2 (diff)
downloadFreeBSD-src-668b45f6c603a28f3e5d672c89e9226189d44fc9.zip
FreeBSD-src-668b45f6c603a28f3e5d672c89e9226189d44fc9.tar.gz
Sysctl nodes are written to, so don't put them in the text section.
Our write protection of the kernel text on i386's doesn't actually work in many cases: - use of the 4MB page completely breaks it. - CR0_WP isn't set until just before init is started, so the kernel text is not write protected during kernel initialization.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/sysctl.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 750d1f2..3ea498a 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)sysctl.h 8.1 (Berkeley) 6/2/93
- * $Id: sysctl.h,v 1.62 1998/08/24 08:39:37 dfr Exp $
+ * $Id: sysctl.h,v 1.63 1998/09/05 12:42:56 bde Exp $
*/
#ifndef _SYS_SYSCTL_H_
@@ -134,16 +134,16 @@ int sysctl_handle_opaque SYSCTL_HANDLER_ARGS;
/* This constructs a "raw" MIB oid. */
#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
- static const struct sysctl_oid sysctl__##parent##_##name = { \
+ static struct sysctl_oid sysctl__##parent##_##name = { \
nbr, kind, a1, a2, #name, handler, fmt }; \
- TEXT_SET(sysctl_##parent, sysctl__##parent##_##name)
+ DATA_SET(sysctl_##parent, sysctl__##parent##_##name)
/* This constructs a node from which other oids can hang. */
#define SYSCTL_NODE(parent, nbr, name, access, handler, descr) \
extern struct linker_set sysctl_##parent##_##name; \
SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|access, \
(void*)&sysctl_##parent##_##name, 0, handler, "N", descr); \
- TEXT_SET(sysctl_##parent##_##name, sysctl__##parent##_##name)
+ DATA_SET(sysctl_##parent##_##name, sysctl__##parent##_##name)
/* Oid for a string. len can be 0 to indicate '\0' termination. */
#define SYSCTL_STRING(parent, nbr, name, access, arg, len, descr) \
OpenPOWER on IntegriCloud