commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mach branch, master, updated. v1.8-369-ga3db37b8


From: Samuel Thibault
Subject: [SCM] GNU Mach branch, master, updated. v1.8-369-ga3db37b8
Date: Sat, 27 Aug 2022 15:13:17 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mach".

The branch, master has been updated
       via  a3db37b8837c091f6018257f2de5bb740350f3f5 (commit)
      from  4cd8d01832be3100b89f9f12a7f828b787e2f901 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a3db37b8837c091f6018257f2de5bb740350f3f5
Author: Luca Dariz <luca@orpolo.org>
Date:   Tue Jun 28 12:10:48 2022 +0200

    x86_64: fix exception stack alignment
    
    * i386/i386/pcb.c:
      - increase alignment of pcb cache to 16
      - ensure the stack is properly aligned when switching ktss
    * i386/i386/thread.h:
      - add padding tomake iss field end aligned to 16 bytes
    * i386/i386/trap.c:
      - ensure the state we get after the trap points to the correct place
        in the pcb structure
    
    When handling exceptions from IA-32e compatibility mode in user space,
    on a 64-bit kernel, the exception stack where error info is pushed
    needs to be aligned to 16 bytes (see Intel System Programming guide,
    $6.14.2)
    
    The exception stack frame is set in the middle of pcb->iss, but it's not 
always
    16-byte aligned; to make sure it is, we increase the alignment of the
    pcb cache and add a padding field in the pcb structure.
    
    This issue resulted in a general protection failure due to CS being
    corrupted after a page fault.  The corruption was happening when the
    exception stack frame was not properly aligned and a page fault
    happened; the error info was then pushed after re-aligning the stack,
    so the value of eflags was actually written in CS place and other
    fields were shifted too.
    
    It also makes sense to ensure this by adding two assertions, although
    these were primarly useful during debug.
    
    Signed-off-by: Luca Dariz <luca@orpolo.org>
    Message-Id: <20220628101054.446126-10-luca@orpolo.org>

-----------------------------------------------------------------------

Summary of changes:
 i386/i386/pcb.c    | 10 +++++++++-
 i386/i386/thread.h |  3 +++
 i386/i386/trap.c   |  4 ++++
 3 files changed, 16 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GNU Mach



reply via email to

[Prev in Thread] Current Thread [Next in Thread]