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 2005-04-14 00:02:37 +00:00
parent 0085f3944e
commit b1e2cc301b

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;