Re: [PATCH] rust: kernel: use strict provenance APIs

From: Tamir Duberstein

Date: Tue May 26 2026 - 05:20:33 EST


On Mon, May 25, 2026 at 9:48 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Fri, May 22, 2026 at 7:19 PM Tamir Duberstein <tamird@xxxxxxxxxx> wrote:
> >
> > Suggested-by: Benno Lossin <benno.lossin@xxxxxxxxx>
> > Link: https://lore.kernel.org/all/D8EIXDMRXMJP.36TFCGWZBRS3Y@xxxxxxxxx/
>
> The linked suggestion seems to be about enabling the lints, not using
> the provenance APIs (which we have been discussing for a long time).
> Do we want to enable the lints after this? Or what am I missing?

You're right; I carried over the tag from the previous iteration
thinking it addressed usage when it actually suggested the lints. The
lints can't be enabled yet because they are not stable (not just in
our MSRV).

> In any case, some of these are not equivalent to the `as` casts, so
> they are not a mechanical change. Could we have, at least for those,
> the reason why it is OK to perform the change? (perhaps as separate
> commits?)

Correct. There are both behavior-preserving exposed-provenance
spellings and cases that deliberately avoid exposing provenance. I
will split those as you suggest.

> Thanks for cleaning this up!

Thanks for reviewing!