[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72nqwqTmCzKb=rhRhUDg8pju_RB2zzCKnJ5hDrVTUVnhPA@mail.gmail.com>
Date: Sun, 18 Jan 2026 23:46:25 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: stijn@...ux-ipv6.be, Kees Cook <kees@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nsc@...nel.org>, Emese Revfy <re.emese@...il.com>
Cc: ojeda@...nel.org, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH] rust: bindgen: disable GCC latent entropy plugin
On Sun, Dec 21, 2025 at 9:17 AM <stijn@...ux-ipv6.be> wrote:
>
> When CONFIG_GCC_PLUGIN_LATENT_ENTROPY and CONFIG_RUST are enabled, rust
> bindgen fails due to latent_entropy being undeclared:
>
> BINDGEN rust/bindings/bindings_generated.rs
> ./include/linux/random.h:24:39: error: use of undeclared identifier 'latent_entropy'
> ./include/linux/random.h:24:62: error: use of undeclared identifier 'latent_entropy'
> Unable to generate bindings: clang diagnosed error: ./include/linux/random.h:24:39: error: use of undeclared identifier 'latent_entropy'
> ./include/linux/random.h:24:62: error: use of undeclared identifier 'latent_entropy'
>
> Fix this by adding DISABLE_LATENT_ENTROPY_PLUGIN to
> bindgen_extra_c_flags.
>
> Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support")
> Signed-off-by: Stijn Tintel <stijn@...ux-ipv6.be>
Cc'ing plugins and Kbuild.
Kees, Emese: from a quick look at the plugin, it doesn't seem to
change the signature of the functions (and even for variables it just
initializes), so it seems OK to ignore it for `bindgen` purposes, at
least naively. So I think this sounds fine.
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists