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.…
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.
“Rust is safe” is not some kind of absolute guarantee of code safety
31–40 of 542 posts
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#32Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#33To put things in context, Linus is being reasonable and wise and well-mannered once again. Wouldn't mind reading a few juicy expletives, to be honest.
I wonder if he'll end up regretting opening this particular Pandora's box or will things stabilize eventually.
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#34To put things in context, Linus is being reasonable and wise and well-mannered once again. Wouldn't mind reading a few juicy expletives, to be honest.
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#35I am the only one who would have a hard time to collaborate on a project where the "collaborators" start their message with > You need to realize that > (a) reality trumps fantasy ?
If he were any other person, he’d have been axed a long time ago for this behavior.
I don’t understand how people put up with this kind of toxicity, even from him.
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#36Earlier quoted context omitted.
if you panic and you're a kernel you very likely corrupt your filesystem, at the very least.
While I don’t advocate for kernel panics, journaling filesystems are a thing.
EFI is FAT, FAT is not journaled. You almost certainly have EFI these days.
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#37Why is panicing in the kernel on an error not an option? Like kernels can write a core dump and reboot, right?
I guess when the kernel panics, there is nothing to write the core dump for you...
https://en.wikipedia.org/wiki/Kdump_(Linux)
He also mentions that programs can report problems automatically to the distro devs. For example:
https://retrace.fedoraproject.org/faf/problems/
A kernel dump is not something you always want to upload since it can be large and contain sensitive info. I'm not a kernel dev though.
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#38Why is panicing in the kernel on an error not an option? Like kernels can write a core dump and reboot, right?
I guess when the kernel panics, there is nothing to write the core dump for you...
Of course this working requires the fresh kernel to be able to get up and do that without itself crashing, so it can't capture every scenario. And it is bringing down the system completely, and there's lots of pros and cons to be argued about that vs attempting to continue or limp along.
Re: “Rust is safe” is not some kind of absolute guarantee of code safety
#39I am the only one who would have a hard time to collaborate on a project where the "collaborators" start their message with > You need to realize that > (a) reality trumps fantasy ?
You need to realise that (a) that's the creator of Linux (b) see (a) above
He gets a lot more leeway than being the creator of Linux should afford someone.