git: d50adfec9ee7 - main - amd64: clear debug registers on execing 32bit native binary
Konstantin Belousov
kib at FreeBSD.org
Sat Apr 10 01:25:15 UTC 2021
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=d50adfec9ee73e88e8d365525f1acef2c1db798a
commit d50adfec9ee73e88e8d365525f1acef2c1db798a
Author: Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-04-09 23:23:54 +0000
Commit: Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-04-10 01:25:02 +0000
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
---
sys/amd64/ia32/ia32_signal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 51dd1f38090f..c114cf1d240a 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -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 */
More information about the dev-commits-src-main
mailing list