Re: [GIT PULL] Rust `hrtimer` support for v6.15

From: Miguel Ojeda
Date: Tue Mar 25 2025 - 16:04:29 EST


On Fri, Mar 21, 2025 at 1:14 PM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>
> As discussed, I fixed the UB you fund in:
>
> rust: hrtimer: allow timer restart from timer handler
>
> by casting to `u32` when assigning enum values. The commits below this
> commit are unchanged, the later commits were replayed on top of the
> changed commit.

I reduced it and filled an issue upstream:

https://github.com/rust-lang/rust-bindgen/issues/3179

And I sent a potential patch to deal with this cleanly in a single
place (as long as the C headers allow for it, which in your case it
does), please see:

https://lore.kernel.org/rust-for-linux/20250325184309.97170-1-ojeda@xxxxxxxxxx/

By the way, it wasn't UB, no? i.e. the UB one was the parsing patch on
the modules series, which we discussed roughly at the same time.

I hope that helps!

Cheers,
Miguel