The branch main has been updated by kib:

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

commit d50adfec9ee73e88e8d365525f1acef2c1db798a
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-04-09 23:23:54 +0000
Commit:     Konstantin Belousov <[email protected]>
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 */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to