git: f6b3c49256ed - stable/13 - amd64: clear debug registers on execing 32bit native binary

Konstantin Belousov kib at FreeBSD.org
Fri Apr 23 11:15:10 UTC 2021


The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=f6b3c49256edd4f402393a1d0276bd3ff3b5d458

commit f6b3c49256edd4f402393a1d0276bd3ff3b5d458
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-23 11:14:08 +0000

    amd64: clear debug registers on execing 32bit native binary
    
    (cherry picked from commit d50adfec9ee73e88e8d365525f1acef2c1db798a)
---
 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-branches mailing list