Re: [PATCH] rust: bindings: Support some inline static functions

From: Miguel Ojeda
Date: Tue Nov 05 2024 - 04:32:21 EST


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.

> + --allowlist-function crypto_shash_descsize

We probably should put this into something similar to
`rust/bindgen_parameters` (and remove this variable).

> + @cp /tmp/bindgen/extern.c $(src)/

I don't think we can use/assume `/tmp` -- we will need
`--wrap-static-fns-path` or similar.

Thanks for trying out the new feature!

Cheers,
Miguel