News for hackers. Stuff that matters.
Re:“Rust is safe” is not some kind of absolute guarantee of ... by atty on Sunday October 02, 2022 @11:00AM (#33056426)
The kernel can’t fail to complete its operations, because then the entire system crashes and no logs are created. Instead, you can finish the operation and check the result.
Re:“Rust is safe” is not some kind of absolute guarantee of ... by chlorion on Monday October 03, 2022 @01:26AM (#33063750)
The kernel can't panic and display an error message, but corrupting itself and deleting valuable data or allowing people to execute arbitrary code (possibly remotely) is okay?

I really have a hard time understanding how anyone could possibly think that's okay.

It sounds like the kernel's quality is so poor that UB is commonplace and even expected at this point. Pretty scary how many systems are relying on this huge pile of broken C code to hopefully only slightly corrupt itself and your system.

I'm not even sure how useful Rust in the kernel is going to be considering they want it to just ignore errors. You can't even have bounds checking on arrays because invalid accesses might be detected at runtime and cause an error, which is totally insane.

Re:“Rust is safe” is not some kind of absolute guarantee of ... by charcircuit on Sunday October 02, 2022 @11:44AM (#33056910)
panic doesn't instantly crash the program. It prints out debug information first. You could have kernel panics work the same way.
Re:“Rust is safe” is not some kind of absolute guarantee of ... by Someone1234 on Sunday October 02, 2022 @12:23PM (#33057360)
And when Linux is running on your fridge, in your car, or on a headless VM then who is there to read out this "printed output." The great thing about "log and continue" is you can automate collection and fix the underlying bug (or know that the hardware is failing).

Keep in mind that in a kernel panic no hardware is assumed to work, so assumptions like "just write to storage!" isn't an assumption you can make, you're in a panic the IO could have been literally pulled out.

Re:“Rust is safe” is not some kind of absolute guarantee of ... by charcircuit on Sunday October 02, 2022 @03:57PM (#33059585)
>Keep in mind that in a kernel panic no hardware is assumed to work

So just change that assumption since for these edge cases that is an incorrect assumption.

Re:“Rust is safe” is not some kind of absolute guarantee of ... by wtallis on Sunday October 02, 2022 @12:14PM (#33057245)
Printing debug information to the kernel log then immediately triggering a kernel panic is not as useful as it sounds, because that approach will quite often result in that debugging information never reaching a display or any kind of persistent storage.
Re:“Rust is safe” is not some kind of absolute guarantee of ... by secondcoming on Sunday October 02, 2022 @12:45PM (#33057648)
Prints it out how? If the kernel has crashed how do you guarantee anything gets printed, either to the screen, tty, log file?
Re:“Rust is safe” is not some kind of absolute guarantee of ... by charcircuit on Sunday October 02, 2022 @03:56PM (#33059572)
Print it to the cloud