diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2021-04-09 23:25:06 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-04-10 01:25:02 +0000 |
commit | 94172affa43af15fe3b50293a96c292eca30c386 (patch) | |
tree | 77b12656958bad1e645b0dd8efbe65707922e20a | |
parent | d50adfec9ee73e88e8d365525f1acef2c1db798a (diff) | |
download | src-94172affa43af15fe3b50293a96c292eca30c386.tar.gz src-94172affa43af15fe3b50293a96c292eca30c386.zip |
amd64: clear debug registers on execing 32bit Linux binary
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D29687
-rw-r--r-- | sys/amd64/linux32/linux32_sysvec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index bb86baefaec4..3790d0fcb69c 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -722,6 +722,8 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp, regs->tf_cs = _ucode32sel; regs->tf_rbx = (register_t)imgp->ps_strings; + x86_clear_dbregs(pcb); + fpstate_drop(td); /* Do full restore on return so that we can change to a different %cs */ |