Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 May 2021 00:39:07 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 83f3bc609090 - stable/12 - amd64: clear debug registers on execing 32bit Linux binary
Message-ID:  <202105010039.1410d7Ze048169@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kib:

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

commit 83f3bc609090aedb9b276e4f2b43e570857fd153
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-04-09 23:25:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-01 00:38:29 +0000

    amd64: clear debug registers on execing 32bit Linux binary
    
    (cherry picked from commit 94172affa43af15fe3b50293a96c292eca30c386)
---
 sys/amd64/linux32/linux32_sysvec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 315dcc7ca629..1686891861c3 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -710,6 +710,8 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
 	regs->tf_cs = _ucode32sel;
 	regs->tf_rbx = imgp->ps_strings;
 
+	x86_clear_dbregs(pcb);
+
 	fpstate_drop(td);
 
 	/* Do full restore on return so that we can change to a different %cs */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105010039.1410d7Ze048169>