@gregkh just a curious question, as I see you as an expert in the field, say all regular kernel coders and time to time contributes would port their stuff to rust, what would you estimate the shortest time you think it would take to make the Linux kernel 100% rust (excluding time that it takes for everyone to learn rust, we just assume they know it tomorrow)
Are we talking months/years/decades ?
@gregkh In a way 25 years feels far away, but don't feel that long ago I begun with my first RedHat 6.2 installation...
@gregkh this nerd sniped me so bad, because I think we really, really need this
dropped a bunch of thoughts for polishing, thinking about how gpu drivers would use this on our ioctl data structs ...
The API introduced in this series is not a silver bullet, users are
still able to access the untrusted value (otherwise how would they be
able to validate it?). But it provides additional guardrails to remind
users that they ought to validate the value before using it. As already
stated, they can access the value directly, but to do that, they need to
explicitly call one of theuntrusted_*
functions signaling to
reviewers that they are reading untrusted data without validation.
this does not seem to indicate that anything is being checked at build time? is there a part of the patch that demonstrates the zero-overhead build-time checking you describe? or is your point that the rust for linux people are receptive to these concerns and other kernel devs aren't? i'm confused by "this change forces you to always be aware of that, which is something that C in the kernel does not" when the part i quoted very explicitly says it is not a silver bullet and just provides additional guardrails (which is obviously useful, i'm not contesting that)
@gregkh do you have a link to where you've asked for this sort of thing before?
@gregkh not altogether clear to me that the Validator impls for tarfs (https://lore.kernel.org/all/20240913112643.542914-4-benno.lossin@proton.me/) cannot be done in c by exposing named accessor methods. build-time checking is obv the thing c really can't do but it's not clear to me how this patch demonstrates that and i assume i'm missing something
@gregkh
> but it's not obvious how and no one has come up with a way to do so. Maybe now they will have some more incentive :)
Not sure if this is what you want, but there is __attribute__((tainted_args)) since gcc 12.