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:
parent
53193c146a
commit
4453c6dc67
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user