Re: [PATCH V13 5/7] rust: Make __udivdi3() and __umoddi3() panic

Miguel Ojeda
2026-04-24T10:26:43Z

On Fri, Apr 24, 2026 at 11:43 AM Link Mauve <linkmauve@linkmauve.fr> wrote:
>
> A possible solution would be to change the core crate to not divide
> u64s, but the last time I tried to do that I couldn’t quite figure out
> how to do formatting without it, maybe I will just open an issue against
> Rust.

Yeah, I have some context at:

https://github.com/Rust-for-Linux/linux/issues/2 ->
feature(compiler_builtins) and a way to avoid certain intrinsics (f32,
f64, i128, u128 and 64-bit divisions/modulos).

We have discussed it at some points with upstream Rust (including
related discussions about having more `cfg`s in `core` or a
`cfg(linux_kernel)` etc.). I don't think we have an open issue
concretely for it, apart from the Clippy one to flag the use the use
of the 64-bit division, but if you open a more general one with some
details, that would be great.

Thanks!

Cheers,
Miguel