zlacker

[return to "“Rust is safe” is not some kind of absolute guarantee of code safety"]
1. a_hume+h4[view] [source] 2022-10-02 14:51:10
>>rvz+(OP)
I know next to nothing about kernel programming, but I'm not sure here what Linus' objection to the comment he is responding to here is.

The comment seemed to be making reference to rust's safety guarantees about undefined behaviour like use after free.

Linus' seems to have a completely different definition of "safey" that conflates allocation failures, indexing out of bounds, and division by zero with memory safety. Rust makes no claims about those problems, and the comment clearly refers to undefined behaviour. Obviously, those other problems are real problems, but just not ones that Rust claims to solve.

Edit: Reading the chain further along, it increasingly feels like Linus is aruging against a strawman.

◧◩
2. pfortu+Y4[view] [source] 2022-10-02 14:56:01
>>a_hume+h4
I am probably wrong but I understood that “safety meaning panic” is noeither “safe” not allowed in the Linux kernel because the kernel must not panic when an error arises.
◧◩◪
3. a_hume+i6[view] [source] 2022-10-02 15:03:52
>>pfortu+Y4
Which is why Rust has been accommodating the kernel by adding non-panic versions of the functions that Linus has been complaining about (namely that memory allocation is infallible, because that isn't an unreasonable thing to assume in applicationc code.). Still doesn't change the fact that "safe" in this context has a technical meaning, and what Linus is describing isn't that.
◧◩◪◨
4. Vt71fc+X8[view] [source] 2022-10-02 15:18:01
>>a_hume+i6
maybe his point is that the technical meaning should use a more acurate word in his opinion?
◧◩◪◨⬒
5. a_hume+5b[view] [source] 2022-10-02 15:30:27
>>Vt71fc+X8
His point seems to be the opposite, that "safety" should have a vaguer meaning in his opinion, and not the well established technical definition that the author clearly meant when he used the word.
◧◩◪◨⬒⬓
6. LtWorf+pe[view] [source] 2022-10-02 15:49:09
>>a_hume+5b
Or, in other words, rust-safety should mean what safety means in every other context, or rust people need to come up with a different word.
[go to top]