Re: C aggregate passing (Rust kernel policy)
From: Linus Torvalds
Date: Wed Feb 26 2025 - 18:17:22 EST
On Wed, 26 Feb 2025 at 14:27, Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote:
>
> This is another one that's entirely eliminated due to W^X references.
Are you saying rust cannot have global flags?
That seems unlikely. And broken if so.
> IOW: if you're writing code where rematerializing reads is even a
> _concern_ in Rust, then you had to drop to unsafe {} to do it - and your
> code is broken, and yes it will have UB.
If you need to drop to unsafe mode just to read a global flag that may
be set concurrently, you're doing something wrong as a language
designer.
And if your language then rematerializes reads, the language is shit.
Really.
Linus