summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-05-12 02:37:29 +0000
committerpeter <peter@FreeBSD.org>2003-05-12 02:37:29 +0000
commitc688fcc3ca312086f910aab7cdf045d92c0c364f (patch)
tree64ee040db2f5653c25d9bdeca46546a3cf5d954b /release
parent6d94cd1e18844aefcc39c20d259853511b278015 (diff)
downloadFreeBSD-src-c688fcc3ca312086f910aab7cdf045d92c0c364f.zip
FreeBSD-src-c688fcc3ca312086f910aab7cdf045d92c0c364f.tar.gz
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/*)
Diffstat (limited to 'release')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud