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

Weaken backward sentry pseudo-locality, take 1.1 #81

Closed
wants to merge 2 commits into from

Conversation

nwf
Copy link
Member

@nwf nwf commented Nov 8, 2024

A different take on #80, that might be more amenable to convenient microarchitectural implementation? This stab uses a latch register that's read during CSC instructions and updated on control transfers.

@nwf nwf force-pushed the 202411-rsentry-pseudolocality-latch branch from fbd77ec to 0813c07 Compare November 8, 2024 03:21
@rmn30
Copy link
Collaborator

rmn30 commented Nov 8, 2024

Interesting. Are there other examples of architecture features that have such a effect explicitly delayed until control transfers? It seems a little arbitrary. RISC-V does have fence instructions for explicit uarch synchronisation so we could alternatively use one of those? I've seen complaints that 'hidden state' makes life difficult for DV which is one reason to prefer an explicit CSR. On the other hand maybe we should reconsider the pseudo-local return sentry thing altogether as it's getting rather difficult to articulate the threat model...

@nwf
Copy link
Member Author

nwf commented Nov 8, 2024

FWIW, Intel X86, not that it should be used as an example for much of anything, nominally requires "far jump"s for certain changes (protection, paging, long mode) to take effect, and the official recommendation is to make those changes one at a time. In practice, the chips tolerate a lot more.

Yes, this probably should also be triggered on fence instructions.

I agree that hidden state isn't stellar and am not hugely enamored of this approach.

Also open to revisiting/reverting the whole thing, as cute as "return addresses are confined to the stack" might seem.

@nwf
Copy link
Member Author

nwf commented Nov 14, 2024

Closing; #82

@nwf nwf closed this Nov 14, 2024
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

Successfully merging this pull request may close these issues.

2 participants