amd64: clear debug registers on execing 32bit native binary

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D29687
This commit is contained in:
Konstantin Belousov 2021-04-10 02:23:54 +03:00
parent 2f15884747
commit d50adfec9e

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 */