freebsd-dev/sys
Peter Wemm bf1e897425 Give a %fs and %gs to userland. Use swapgs to obtain the kernel %GS.base
value on entry and exit.  This isn't as easy as it sounds because when
we recursively trap or interrupt, we have to avoid duplicating the
swapgs instruction or we end up back with the userland %gs.  I implemented
this by testing TF_CS to see if we're coming from supervisor mode
already, and check for returning to supervisor. To avoid a race with
interrupts in the brief period after beginning executing the handler and
before the swapgs, convert all trap gates to interrupt gates, and reenable
interrupts immediately after the swapgs.  I am not happy with this.
There are other possible ways to do this that should be investigated.
(eg: storing the GS.base MSR value in the trapframe)

Add some sysarch functions to let the userland code get to this.

Approved by:	re (blanket amd64/*)
2003-05-12 02:37:29 +00:00
..
alpha Style fixes. 2003-05-04 22:13:04 +00:00
amd64 Give a %fs and %gs to userland. Use swapgs to obtain the kernel %GS.base 2003-05-12 02:37:29 +00:00
arm Style fixes. 2003-05-04 22:13:04 +00:00
boot For amd64 kernels, repeat the 1GB mapping over the entire address space 2003-05-11 22:42:29 +00:00
cam Fix three problems in large (>2TB) device handling: 2003-05-03 00:21:40 +00:00
coda - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with 2003-03-31 22:49:17 +00:00
compat Change the semantics of sysv shm emulation to take a additional 2003-05-05 09:22:58 +00:00
conf Add files for the 'ips' driver. 2003-05-11 06:37:52 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r114584, 2003-05-03 17:16:40 +00:00
crypto Assembly files put thru the C preprocessor need to have C style comments. 2003-04-21 16:30:12 +00:00
ddb Move the _oncpu entry from the KSE to the thread. 2003-04-10 17:35:44 +00:00
dev Make it compiled on 4-stable. 2003-05-12 00:42:28 +00:00
fs Clean up proc locking in procfs: make sure the proc lock is held before 2003-05-05 15:12:51 +00:00
geom When a GEOM (/dev-)device is closed and we find that I/O requests are 2003-05-09 21:25:28 +00:00
gnu This commit was generated by cvs2svn to compensate for changes in r113778, 2003-04-21 02:27:52 +00:00
i4b - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
i386 Provide exec_linux_setregs() to override exec_setregs(). 2003-05-11 21:51:11 +00:00
ia64 Style fixes. 2003-05-04 22:13:04 +00:00
isa Only use the pc bios stuff on i386's. I think this might even be unused 2003-05-01 04:23:15 +00:00
isofs/cd9660 Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
kern Make m_freem() just use m_free() instead of duplicating the code. The 2003-05-10 18:08:23 +00:00
libkern Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
modules Hook up the ips module 2003-05-11 06:40:09 +00:00
net Define a link layer MIB for ATM. Most fields of this MIB are needed by 2003-05-05 16:35:52 +00:00
netatalk - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatm Use __FBSDID rather than rcsid[]. 2003-04-03 21:36:33 +00:00
netgraph Last commit of the bluetooth upgrade. (this patch was forgotten in the first 2003-05-10 22:11:25 +00:00
netinet Correct a bug introduced with reduced TCP state handling; make 2003-05-07 05:26:27 +00:00
netinet6 Add definitions for IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP. 2003-04-29 22:03:46 +00:00
netipsec Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netipx Remove unimplemented IP-in-IPX encapsulation support (options IPTUNNEL). 2003-03-08 06:58:22 +00:00
netkey Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netnatm Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netncp - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with 2003-03-31 22:49:17 +00:00
netsmb - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with 2003-03-31 22:49:17 +00:00
nfs
nfsclient Instead of recording the Unix time in a process when it starts, record the 2003-05-01 16:59:23 +00:00
nfsserver - Acquire the vm_object's lock when performing vm_object_page_clean(). 2003-04-24 04:31:25 +00:00
opencrypto Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
pc98 Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
pccard 1. Allow drivers to query CIS strings from OLDCARD. 2003-04-23 23:39:21 +00:00
pci Don't call timeout() in sis_tick(), this is done earlier by mii_tick(), and it 2003-05-06 02:00:01 +00:00
posix4
powerpc Things run thru the C preprocessor must use C-style comments. 2003-05-05 10:01:10 +00:00
rpc
security Rename MAC_MAX_POLICIES to MAC_MAX_SLOTS, since the variables and 2003-05-08 19:49:42 +00:00
sparc64 Style fixes. 2003-05-04 22:13:04 +00:00
sys Redefine M_FREELIST to be 0x8000; 0x4000 conflicted with two other 2003-05-09 02:15:52 +00:00
tools MFp4: 2003-03-28 06:43:50 +00:00
ufs Lock the vm_object on entry to vm_object_vndeallocate(). 2003-05-03 20:28:26 +00:00
vm Give the kmem object's mutex a unique name, instead of "vm object", 2003-05-09 02:13:23 +00:00
Makefile Exclude sys/boot for amd64. There are still toolchain issues to deal 2003-05-08 06:35:39 +00:00