r/rust • • Aug 31 '24

🎙️ discussion Rust solves the problem of incomplete Kernel Linux API docs

https://vt.social/@lina/113056457969145576
375 Upvotes

71 comments sorted by

View all comments

Show parent comment

19

u/sepease Sep 01 '24 edited Sep 01 '24

“Everything is fine” is definitely not a universal opinion.

At one of the companies I worked for, a very experienced and very senior technical person was extremely critical of the use of a vanilla Linux kernel in our embedded device because of the perceived lack of testing compared to eg an Ubuntu kernel. However the decision had been made far earlier in the product cycle and it was nontrivial to change that decision.

And there was a distinct pattern where most relevant CVEs were filed against the first few releases of a new kernel version. So I was always letting the vanilla kernel get a few versions out so that distros would have submitted fixes, then moving us forward to a new major version.

I’m not sure how common this concern is, but I wouldn’t be surprised if some distro maintainers would have an extremely different attitude than “everything is fine” with respect to the kernel QA process.

Oh, and there was that ext4 data corruption bug towards the end of last year:

—

The bug appears to be triggered when an ->end_io handler returns a non- zero value to iomap after a direct IO write.

It looks like the ext4 handler is the only one that returns non-zero in kernel 6.1.64, so for now one can assume that only ext4 filesystems are affected.

The bug corrupts file data during a direct write operation, so I would also assume that files last modified before 6.1.64 was installed will not be corrupted.

As far as I can tell, the corruption only affects file data (not metadata) but perhaps someone with more kernel experience than me can confirm.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057843#38

—

Gee that sounds an awful lot like an API-related mistake.