What are the opsem effects of CHERI?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 760
- Forks
- 68
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rust-lang/unsafe-code-guidelines
-
I-opsem-nominated
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
rust-lang/unsafe-code-guidelines#634 · 5 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
rust-lang/unsafe-code-guidelines#632 · 8 comentarios · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
rust-lang/unsafe-code-guidelines#631 · 7 comentarios ·
-
I-opsem-nominated
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
rust-lang/unsafe-code-guidelines#630 · 1 reacción ·
Todos los issues de rust-lang/unsafe-code-guidelines
Issues similares
-
bug core-lang
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Call-argument syntax diagnostic needs example spacing and removal of confusing trailing sentenceAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mw00/project-maya#1368 ·
Los mantenedores suelen responder en 2 días
-
test(bind-json): legacy Solidity fixture requires an unavailable solc on Linux ARM64Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
foundry-rs/foundry#18828 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día