cfi: fix ordering of textual SSPUSH behavior, clarify ordering.#2782
cfi: fix ordering of textual SSPUSH behavior, clarify ordering.#2782dtzSiFive wants to merge 1 commit intoriscv:mainfrom
Conversation
Normative Rule Changes DetectedThis PR modifies normatively tagged text. Please review the changes below to ensure they are intentional. View Detected ChangesNormative Tag Change Reportriscv-spec SpecificationWhat happens next:
How to update reference files (if needed): make update-ref
git add ref/*.json
git commit -m "Update normative tag reference files"
This comment was automatically generated by the normative tag check workflow. |
| of the shadow stack. | ||
| A shadow stack push operation is defined as a store of the value in the link | ||
| register to memory at one level down from the top of the shadow stack, which is | ||
| `ssp - XLEN/8`, followed by updating `ssp` to this address. |
There was a problem hiding this comment.
I don't think this actually changes the memory ordering implications. Either way, the store depends on ssp. It doesn't really matter whether it depends on the incremented value or the original value.
There was a problem hiding this comment.
The main change intent is to not indicate ssp is decremented first "followed by" the store, when the code listing has them in the other order.
But okay I see what you mean, if the update to ssp can be said to precede the store but doesn't commit until after regardless this change is unnecessary.
| imply ordering: subsequent `SSPUSH` and `C.SSPUSH` instructions may be globally | ||
| visible before earlier `SSPUSH` and `C.SSPUSH` instructions, despite | ||
| potentially having an address dependency on the update to `ssp`. The decrement | ||
| of `ssp` and the store to the shadow stack are not ordered with respect to each | ||
| other; the store may or may not be globally visible before the decrement of | ||
| `ssp`. |
There was a problem hiding this comment.
I think this is true, but if this follows from RVWMO's handling of implicit CSR accesses (which I think it does, but I haven't confirmed it), then I'd rather not add any new text. I'll leave this open for now.
There was a problem hiding this comment.
Aye, I'll check and agreed. Thanks!
No description provided.