Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SS access to non-SS pages cause page fault #169

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions cfi_backward.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ The following faults may occur:
original access type.
. If the accessed page is not a shadow stack page or if the page is in
non-idempotent memory:
.. `SSAMOSWAP`, `C.SSPUSH`, and `SSPUSH` cause a store/AMO access-fault.
.. `C.SSPOPCHK` and `SSPOPCHK` cause a load access-fault.
.. `SSAMOSWAP`, `C.SSPUSH`, and `SSPUSH` cause a store/AMO page fault.
.. `C.SSPOPCHK` and `SSPOPCHK` cause a load page fault.

[NOTE]
====
Expand Down Expand Up @@ -902,7 +902,7 @@ follows:
PAGESIZE` and go to step 2.

5. A leaf PTE has been found. If the memory access is by a shadow stack
instruction and `pte.xwr != 010b`, then cause an access-violation exception
instruction and `pte.xwr != 010b`, then cause a page fault exception
corresponding to the access type. If the memory access is either a
non-shadow-stack store/AMO or an implicit access, and `pte.xwr == 010b`, then
an access-fault exception is raised, corresponding to the original access type.
Expand Down Expand Up @@ -936,10 +936,7 @@ Shadow stacks are expected to be bounded on each end using guard pages, so that
no two shadow stacks are adjacent to each other. This guards against accidentally
underflowing or overflowing from one shadow stack to another. Traditionally,
a guard page for a stack is a page that is inaccessible to the process owning
the stack. For shadow stacks, the guard page may also be a non-shadow-stack
page that is otherwise accessible to the process owning the shadow stack
because shadow stack loads and stores to non-shadow-stack pages cause an
access-fault exception.
the stack.
====

The G-stage address translation and protections remain unaffected by Zicfiss
Expand Down