Attempt i386_set_gsbase() before using the user_ldt code. Unimplemented

sysarch() calls return EINVAL, not SIGSYS.. so we can trivially adapt.
This commit is contained in:
Peter Wemm 2005-04-14 00:02:37 +00:00
parent 53193c146a
commit 4453c6dc67
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145037

View File

@ -36,8 +36,11 @@ _set_tp(void *tp)
{
#ifndef COMPAT_32BIT
union descriptor ldt;
int sel;
int error, sel;
error = i386_set_gsbase(tp);
if (error == 0)
return;
memset(&ldt, 0, sizeof(ldt));
ldt.sd.sd_lolimit = 0xffff; /* 4G limit */
ldt.sd.sd_lobase = ((uintptr_t)tp) & 0xffffff;