On 2025-01-18 Paul Eggert wrote: > On 2025-01-18 11:45, Lasse Collin wrote: > > On 2025-01-18 Paul Eggert wrote: > >> Does the unaligned read trick work even with CheriBSD's memory-safe > >> model? That is an edge case that might need an ifdef or something. > >> > > > > I'm not familiar with CheriBSD but the trick never crosses a cache > > line boundary (or page boundary). So the memory-safe model has to > > be really strict to not allow it. > > Yes, it's really that strict.
That's really nice, especially if performance is still acceptable. :-) > One way to fix bugs like this on CHERI is to use the alignment trick > only if the macro __CHERI_PURE_CAPABILITY__ is not defined. I will keep this in mind but the primarily lesson for me is that such tricks are a worse idea than I had thought. > Do you have access to cfarm <portal.cfarm.net>? I don't. Thanks for the idea. -- Lasse Collin