Re: [PATCH] rust: print: add safety comments for %pA formatting

From: Miguel Ojeda

Date: Tue Feb 10 2026 - 10:04:05 EST


On Thu, Feb 5, 2026 at 5:23 AM Muchamad Coirul Anwar
<muchamadcoirulanwar@xxxxxxxxx> wrote:
>
> The safety comments in `rust_fmt_argument` and `call_printk` were
> previously marked as TODO.
>
> This patch adds the missing safety documentation explaining why
> dereferencing the pointers and calling the C `_printk` function
> is safe in these contexts. It clarifies the contract between
> `lib/vsprintf.c` and the Rust implementation regarding the `%pA`
> format specifier.
>
> Signed-off-by: Muchamad Coirul Anwar <muchamadcoirulanwar@xxxxxxxxx>

Related:

https://lore.kernel.org/rust-for-linux/20260128202130.196419-1-shivendra02467@xxxxxxxxx/

Cc'ing Shivendra.

Could you (i.e. both) please coordinate the patches, perhaps merging
them into a single series? You may want to use Co-developed-by and/or
have a different author per patch etc.

Thanks!

Cheers,
Miguel