Re: [PATCH] rust: fix regexp in scripts/is_rust_module.sh

From: Eric Curtin
Date: Mon Feb 13 2023 - 09:29:21 EST


On Mon, 13 Feb 2023 at 13:19, Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Fri, Feb 10, 2023 at 4:26 PM Andrea Righi <andrea.righi@xxxxxxxxxxxxx> wrote:
> >
> > nm can use "R" or "r" to show read-only data sections, but
> > scripts/is_rust_module.sh can only recognize "r", so with some versions
> > of binutils it can fail to detect if a module is a Rust module or not.
>
> Do you know which versions? If so, it would be nice to document it here.
>
> > Moreover, with this patch applied I can also relax the constraint of
> > "RUST depends on !DEBUG_INFO_BTF" and build a kernel with Rust and BTF
> > enabled at the same time (of course BTF generation is still skipped for
> > Rust modules).
>
> Even if that build succeeds, can you load the modules? i.e. the
> constraint was there due to
> https://github.com/Rust-for-Linux/linux/issues/735.
>
> Also Cc'ing Daniel, Eric and Martin since they are the ones working on this.

Don't have any issues with the change. Seems simple enough!

Reviewed-by: Eric Curtin <ecurtin@xxxxxxxxxx>

>
> Cheers,
> Miguel
>