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

Clarify Zicfiss interaction with Zjpm #1533

Open
JamesKenneyImperas opened this issue Jul 15, 2024 · 1 comment
Open

Clarify Zicfiss interaction with Zjpm #1533

JamesKenneyImperas opened this issue Jul 15, 2024 · 1 comment

Comments

@JamesKenneyImperas
Copy link

Zicfiss adds new instructions for loads and stores to the shadow stack. Are these instructions subject to pointer masking as defined by Zjpm? If so, can these instructions be added to the list of affected instructions in the Zjpm specification, or explicitly indicated as not affected by pointer masking?

Thanks.

@ved-rivos
Copy link
Collaborator

Instructions provided by Zicfiss make explicit memory accesses and pointer masking applies to those explicit memory accesses. The ssp CSR is specified as being XLEN wide and no pointer masking operations are applied when software reads/writes the ssp CSR - either using a Zicsr instructions or using ssrdp instruction.

This follows the two general rules specified in section 2.6 of the pointer masking specification - a) pointer masking applies to all explicit memory accesses b) No pointer masking operations are applied when software reads/writes to CSRs.

The pointer masking spec may have been better maintainable if it only listed exceptions to these rules than listing all instructions that confirm to the rule.

If we retain this list then sspush/c.sspush, sspopchk/c.sspopchk, and ssamoswap will be in the list as instructions that perform explicit memory accesses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants