amd64: clear debug registers on execing 32bit native binary

(cherry picked from commit d50adfec9e)
This commit is contained in:
Konstantin Belousov 2021-04-10 02:23:54 +03:00
parent 0d51148255
commit f6b3c49256

View file

@ -968,6 +968,8 @@ ia32_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack)
regs->tf_gs = _ugssel;
regs->tf_flags = TF_HASSEGS;
x86_clear_dbregs(pcb);
fpstate_drop(td);
/* Return via doreti so that we can change to a different %cs */