Re: [PATCH] rust: bindings: Support some inline static functions
From: Alistair Francis
Date: Wed Nov 06 2024 - 21:27:20 EST
On Tue, Nov 5, 2024 at 7:32 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Tue, Nov 5, 2024 at 3:22 AM Alistair Francis <alistair23@xxxxxxxxx> wrote:
> >
> > If this is accepted or at least Acked I can work on removing the
> > existing rust_helper_* functions and convert them to be auto-generated.
>
> Yeah, we have tracked the feature for a long time, please see:
>
> https://github.com/Rust-for-Linux/linux/issues/353
>
> So it is definitely in our plan to use (assuming it works).
>
> But, yeah, we would need the patch with the conversions, to show how
> it would look in practice (i.e. comparing before/after etc.), i.e. the
> usual kernel rule.
Great! I have done the conversions in a patch series here:
https://lore.kernel.org/lkml/20241107020831.1561063-1-alistair.francis@xxxxxxx/T/#t
>
> > + --allowlist-function crypto_shash_descsize
>
> We probably should put this into something similar to
> `rust/bindgen_parameters` (and remove this variable).
Fixed in https://lore.kernel.org/lkml/20241107020831.1561063-1-alistair.francis@xxxxxxx/T/#t
>
> > + @cp /tmp/bindgen/extern.c $(src)/
>
> I don't think we can use/assume `/tmp` -- we will need
> `--wrap-static-fns-path` or similar.
Fixed in https://lore.kernel.org/lkml/20241107020831.1561063-1-alistair.francis@xxxxxxx/T/#t
Alistair
>
> Thanks for trying out the new feature!
>
> Cheers,
> Miguel