Re:Rust's unsafe pointer types need an overhaul
by Mathnerd314 on Sunday March 20, 2022 @01:12AM
(#30740336)
Maybe I'm lazy but it seems like you can just store your fat 129-bit pointers in a hashmap and lookup normal 64-bit addresses in the hashmap to dereference them. This defeats the security model and is a little slow but means you don't need to change any code to run on CHERI.
[ Parent
| on HN ]
Re:Rust's unsafe pointer types need an overhaul
by aaronbwebber on Sunday March 20, 2022 @01:46AM
(#30740456)
Maybe I am misunderstanding how this works, but if you did that, you would no longer have a pointer with a valid metadata flag, and if you try to use it, you get a fault (at least on the Morello board that ARM has built). Perhaps you could do this on something that is just emulating CHERI, but at that point why are you doing this at all?
Re:Rust's unsafe pointer types need an overhaul
by staticassertion on Sunday March 20, 2022 @01:18AM
(#30740367)
> This defeats the security model and is a little slow
Yeah. So... why are you porting to CHERI if you're going to do it like that?