News for hackers. Stuff that matters.
Re:Writing secure Go code by pjmlp on Tuesday November 05, 2024 @02:32AM (#42049398)
Kind of, regarding Rust.

It is impossible in the context of having all threads accessing in-process memory.

If the data can be accessed externally, regardless of the guarantees being uphold on the Rust side, there are no guarantees from third parties accessing the same data.

It also doesn't prevent other race issues with external data.

Re:Writing secure Go code by galangalalgol on Tuesday November 05, 2024 @08:02AM (#42051167)
Memory like that needs to be wrapped with unsafe for access, there is the volotile crate to mark stuff like that so the compuler won't optimize it away.

Other than rust haskell seems like the other primary candidate for memory safety even across threads.

Re:Writing secure Go code by pjmlp on Tuesday November 05, 2024 @08:10AM (#42051216)
Yes, but it doesn't guarantee changes occurring from third parties, even if everything is done correctly on Rust side, and all invariants are correct, so corrupted data can be still be seen as valid.
Re:Writing secure Go code by galangalalgol on Tuesday November 05, 2024 @09:19AM (#42051634)
Is there any defense at all against what you are talking about? I mean, I could use a firewire controller to modify memory without the processor or OS being aware. I suppose you could sign every block of memory using the tpm, but you'd have to the signatures in the tpm, and the code to check the signatures, and so on.
Re:Writing secure Go code by pjmlp on Tuesday November 05, 2024 @03:35PM (#42054918)
The point is that Fearless Concurrency comes with some footnotes when doing the full spectrum of systems programming.

Which tend to be ignored when talking about how Rust is so much better than anything else.

Ye it has improved some concurrency/parallelism scenarios, not all of them.