News for hackers. Stuff that matters.
Re:A pair of Linux kernel modules using Rust by nicoburns on Tuesday September 13, 2022 @07:02AM (#32822728)
Worth noting that one doesn't need to use raw array accessing in Rust nearly so much as in C because you have things like iterators and for..in loops that will ensure correct access.

But I would assume it would be a kernel panic. It definitely won't be UB.

Re:A pair of Linux kernel modules using Rust by scoutt on Wednesday September 14, 2022 @04:37AM (#32834617)
How does the Rust compiler handle, check bounds and ensures nothing bad can happen with a dynamic array that is passed to a Rust module from the Kernel, another C module or a C userspace program?

If an array and a length can be passed to a Rust module, I can just lie about it's size and, unless there is a runtime bound check (which can be slow), I guess bad things can happen too.