Skip to content

Commit

Permalink
Add clarification of tag check priority for PTEs
Browse files Browse the repository at this point in the history
Clarify that the PTE check for a tag when storing capabilities happens after they are potentially removed by permission checks.
  • Loading branch information
Timmmm committed Dec 10, 2024
1 parent b4de3c5 commit 092803f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cheri-pte-ext.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ If the CW bit is clear then:
of the capability being written is set.
* When CRG is set, the "pre-CW state", two schemes are permitted (also see <<section_hardware_pte_updates>>):

NOTE: The tag bit of the stored capability is checked _after_ it is potentially
cleared <<tags_cleared_by_permissions,due to lack of permissions>>.

** The same behavior as when CRG is clear, allowing software interpretation
of this state.
** When a capability store or AMO instruction is executed
Expand Down
1 change: 1 addition & 0 deletions src/riscv-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ misaligned address fault exceptions when the effective address to access is
misaligned, even if the implementation supports Zicclsm. To transfer CLEN
misaligned bits without a tag, use integer loads and stores.

[#tags_cleared_by_permissions]
For loads, the tag of the capability loaded from memory is cleared if the
authorising capability does not grant permission to read capabilities (i.e.
both <<r_perm>> and <<c_perm>> must be set in AP). For stores, the tag of the
Expand Down

0 comments on commit 092803f

Please sign in to comment.