Re: [PATCH v3 05/10] rust: uaccess: add UserSliceWriter::write_slice_file()

From: Alexandre Courbot
Date: Sat Nov 01 2025 - 10:29:22 EST


On Sat Oct 25, 2025 at 3:02 AM JST, Miguel Ojeda wrote:
> On Thu, Oct 23, 2025 at 1:20 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>>
>> I would love to have infallible conversions from usize to u64 (and u32
>> to usize), but we can't really modify the stdlib to add them.
>
> I don't have a link at hand now, but we already (recently too, I
> think) discussed having these "we know it is infallible in the kernel"
> conversions. Maybe there was a patch posted even.
>
> Otherwise, I will create a good first issue.

Are you referring to this discussion?

https://lore.kernel.org/rust-for-linux/DDK4KADWJHMG.1FUPL3SDR26XF@xxxxxxxxxx/

If so, I have posted something along those lines:

https://lore.kernel.org/rust-for-linux/20251029-nova-as-v3-4-6a30c7333ad9@xxxxxxxxxx/

We planned to have it stew in Nova for a bit, but I don't mind moving
this to the core code if you think that looks good enough.