The branch main has been updated by kib:

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

commit 71186b6eaa070dda5229af374b584e5f65ce5fb3
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2025-05-28 11:58:48 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2025-05-28 12:02:23 +0000

    amd64: revert unintended changes in ia32_exception.S
    
    The result was the missed %r8 restore into the protected mode context,
    which is innocent.
    
    Fixes:  ddab534cd6f6557740c24ff2019642880ad8bef6
    Reported by:    olce
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/amd64/ia32/ia32_exception.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/amd64/ia32/ia32_exception.S b/sys/amd64/ia32/ia32_exception.S
index ef1a2c59a0af..42d0ff6c638b 100644
--- a/sys/amd64/ia32/ia32_exception.S
+++ b/sys/amd64/ia32/ia32_exception.S
@@ -54,10 +54,10 @@ int0x80_syscall_common:
        movq    %rax,TF_RAX(%rsp)
        movq    %rdx,TF_RDX(%rsp)
        movq    %rcx,TF_RCX(%rsp)
-       movq    %r15,TF_R15(%rsp)
        call    handle_ibrs_entry
        sti
        movq    %rsi,TF_RSI(%rsp)
+       movq    %r8,TF_R8(%rsp)
        movq    %r9,TF_R9(%rsp)
        movq    %rbx,TF_RBX(%rsp)
        movq    %rbp,TF_RBP(%rsp)
@@ -66,6 +66,7 @@ int0x80_syscall_common:
        movq    %r12,TF_R12(%rsp)
        movq    %r13,TF_R13(%rsp)
        movq    %r14,TF_R14(%rsp)
+       movq    %r15,TF_R15(%rsp)
        movl    $TF_HASSEGS,TF_FLAGS(%rsp)
        pushfq
        andq    $~(PSL_D | PSL_AC),(%rsp)

Reply via email to