What are the opsem effects of CHERI?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
The issue asks for a concise summary of CHERI's operational semantics effects on Rust. Start by reading the linked Zulip/IRLO discussions and the CHERIoT limitations comment. Understand how usize being 64-bit changes pointer operations like with_exposed_provenance, int as ptr, and wrapping_offset. The goal is to document when programs might safely abort and the implications for unsafe code guidelines.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We discussed this on Zulip multiple times and maybe even on IRLO but I could not find a concise summary. This assume that on CHERI, usize is 64bit -- discussion of other ways choices should be delegated to other threads.
So what operations work different on CHERI than they would on all other Rust targets?
with_exposed_provenance/int as ptrsimply does not work. We should probably reject it at compile time; if we don't then the operation will create a no-capability pointer and the program will (safely) abort at runtime when that pointer is used to access memory.wrapping_offsetmay sometimes "lose" the capability. Due to CHERI compressing capabilities into 64bit, they cannot precisely represent capabilities that are too far away from the address the pointer is pointing to, so something likeptr.wrapping_add(BIG).wrapping_sub(BIG)might break the pointer. The program will safely abort at runtime when such a pointer is used to access memory. This can also affect operations based onwrapping_offset, such aswith_addr.- Copying a pointer byte-for-byte with
MaybeUninit<u8>(or similar) no longer works: the copy may lose its permissions, using it to access memory will (safely) abort the process. - CHERIoT has some more concerning limitations: pointers to stack variables cannot be stored in global variables or the heap.
I think that's it? Basically we get some safe aborts in cases where the program should not abort, but that should hopefully be rare and if it happens, it shouldn't be too hard to debug.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 760
- Fork
- 68
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/unsafe-code-guidelines
-
I-opsem-nominated
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rust-lang/unsafe-code-guidelines#634 · 5 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
rust-lang/unsafe-code-guidelines#632 · 8 commenti · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
rust-lang/unsafe-code-guidelines#631 · 7 commenti ·
-
I-opsem-nominated
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
rust-lang/unsafe-code-guidelines#630 · 1 reazione ·
Tutte le issue di rust-lang/unsafe-code-guidelines
Issue simili
-
bug core-lang
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Call-argument syntax diagnostic needs example spacing and removal of confusing trailing sentenceAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mw00/project-maya#1368 ·
I maintainer di solito rispondono entro 2 giorni
-
test(bind-json): legacy Solidity fixture requires an unavailable solc on Linux ARM64Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
foundry-rs/foundry#18828 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno