summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-03-28 00:49:14 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-03-28 00:49:14 +0000
commit58d3179258bacbf670c6109272a1441e9802e70e (patch)
tree482d6d68699068fbc0427ac9b9fd0a66e397279a /sys/arch/i386/include
parentfadb80427f4372e43bf4afde3acf20b21a6a5045 (diff)
Add a sysctl to option USER_LDT, to control its behaviour, which will be
disabled by default. Enable with sysctl -w machdep.userldt=1 This will allow people to use the few ports that require this functionality to work without requiring the user to recompile a kernel. The option USER_LDT remains in order to not increase size on the installation media. It is now enabled in GENERIC. Per espie@'s idea, but my diff was much simpler than his; ok deraadt@
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/cpu.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 373902d18ed..20d694e7e24 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.45 2003/01/16 04:16:00 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.46 2003/03/28 00:49:13 miod Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -197,6 +197,7 @@ int math_emulate(struct trapframe *);
#ifdef USER_LDT
/* sys_machdep.h */
+extern int user_ldt_enable;
void i386_user_cleanup(struct pcb *);
int i386_get_ldt(struct proc *, void *, register_t *);
int i386_set_ldt(struct proc *, void *, register_t *);
@@ -238,7 +239,8 @@ void setconf(void);
#define CPU_APMWARN 9 /* APM battery warning percentage */
#define CPU_KBDRESET 10 /* keyboard reset under pcvt */
#define CPU_APMHALT 11 /* halt -p hack */
-#define CPU_MAXID 12 /* number of valid machdep ids */
+#define CPU_USERLDT 12
+#define CPU_MAXID 13 /* number of valid machdep ids */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
@@ -253,6 +255,7 @@ void setconf(void);
{ "apmwarn", CTLTYPE_INT }, \
{ "kbdreset", CTLTYPE_INT }, \
{ "apmhalt", CTLTYPE_INT }, \
+ { "userldt", CTLTYPE_INT }, \
}
#endif /* !_I386_CPU_H_ */