diff options
author | 2011-03-12 03:52:26 +0000 | |
---|---|---|
committer | 2011-03-12 03:52:26 +0000 | |
commit | d65abc75b862f0705c20ac844422b51ed2773f06 (patch) | |
tree | 598aad365e292f8eebb92637daa830730a7ca949 /sys/arch/i386/include/sysarch.h | |
parent | Bad bad Claudio. Fix an evil bug that caused nbr addr_tree corruption. (diff) | |
download | wireguard-openbsd-d65abc75b862f0705c20ac844422b51ed2773f06.tar.xz wireguard-openbsd-d65abc75b862f0705c20ac844422b51ed2773f06.zip |
Provide distinct segments for the %fs and %gs selectors to use by
default, with per-rthread base offsets and with sysarch() functions,
I386_{GET,SET}_{FS,GS}BASE, for fetching and setting those base
offsets. This is necessary for both rthread and Linux compat support.
suggestions from kettenis@, prodding from pirofti@ and deraadt@
Diffstat (limited to 'sys/arch/i386/include/sysarch.h')
-rw-r--r-- | sys/arch/i386/include/sysarch.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/i386/include/sysarch.h b/sys/arch/i386/include/sysarch.h index cae749a2b53..1115026c63d 100644 --- a/sys/arch/i386/include/sysarch.h +++ b/sys/arch/i386/include/sysarch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sysarch.h,v 1.5 2004/09/15 18:46:50 deraadt Exp $ */ +/* $OpenBSD: sysarch.h,v 1.6 2011/03/12 03:52:26 guenther Exp $ */ /* $NetBSD: sysarch.h,v 1.8 1996/01/08 13:51:44 mycroft Exp $ */ #ifndef _I386_SYSARCH_H_ @@ -13,6 +13,10 @@ #define I386_GET_IOPERM 3 #define I386_SET_IOPERM 4 #define I386_VM86 5 +#define I386_GET_FSBASE 6 +#define I386_SET_FSBASE 7 +#define I386_GET_GSBASE 8 +#define I386_SET_GSBASE 9 struct i386_get_ldt_args { int start; @@ -44,6 +48,10 @@ int i386_set_ldt(int, union descriptor *, int); int i386_iopl(int); int i386_get_ioperm(u_long *); int i386_set_ioperm(u_long *); +int i386_get_fsbase(void **); +int i386_set_fsbase(void *); +int i386_get_gsbase(void **); +int i386_set_gsbase(void *); int sysarch(int, void *); #endif |