lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D672AA56-460F-44C5-A73C-E99D36F86078@kloenk.dev>
Date: Thu, 04 Jul 2024 16:51:17 +0200
From: Finn Behrens <me@...enk.dev>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Wedson Almeida Filho <wedsonaf@...il.com>,
 Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
 Gary Guo <gary@...yguo.net>,
 Björn Roy Baron <bjorn3_gh@...tonmail.com>,
 Benno Lossin <benno.lossin@...ton.me>,
 Andreas Hindborg <a.hindborg@...sung.com>, Alice Ryhl <aliceryhl@...gle.com>,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
 patches@...ts.linux.dev
Subject: Re: [PATCH 08/13] rust: work around `bindgen` 0.69.0 issue



On 1 Jul 2024, at 20:36, Miguel Ojeda wrote:

> `bindgen` 0.69.0 contains a bug: `--version` does not work without
> providing a header [1]:
>
>     error: the following required arguments were not provided:
>       <HEADER>
>
>     Usage: bindgen <FLAGS> <OPTIONS> <HEADER> -- <CLANG_ARGS>...
>
> Thus, in preparation for supporting several `bindgen` versions, work
> around the issue by passing a dummy argument.
>
> Include a comment so that we can remove the workaround in the future.
>
> Link: https://github.com/rust-lang/rust-bindgen/pull/2678 [1]
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>

Reviewed-by: Finn Behrens <me@...enk.dev>

> ---
>  init/Kconfig                 | 5 ++++-
>  scripts/rust_is_available.sh | 6 +++++-
>  2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index febdea2afc3b..94e20d3b99d4 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1928,7 +1928,10 @@ config RUSTC_VERSION_TEXT
>  config BINDGEN_VERSION_TEXT
>  	string
>  	depends on RUST
> -	default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) --version || echo n)
> +	# The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
> +	# (https://github.com/rust-lang/rust-bindgen/pull/2678). It can be removed when
> +	# the minimum version is upgraded past that (0.69.1 already fixed the issue).
> +	default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) --version workaround-for-0.69.0 || echo n)
>
>  #
>  # Place an empty function call at each tracepoint site. Can be
> diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh
> index 33bbd01ffe51..cfda8157dce9 100755
> --- a/scripts/rust_is_available.sh
> +++ b/scripts/rust_is_available.sh
> @@ -121,8 +121,12 @@ fi
>  # Check that the Rust bindings generator is suitable.
>  #
>  # Non-stable and distributions' versions may have a version suffix, e.g. `-dev`.
> +#
> +# The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
> +# (https://github.com/rust-lang/rust-bindgen/pull/2678). It can be removed when
> +# the minimum version is upgraded past that (0.69.1 already fixed the issue).
>  rust_bindings_generator_output=$( \
> -	LC_ALL=C "$BINDGEN" --version 2>/dev/null
> +	LC_ALL=C "$BINDGEN" --version workaround-for-0.69.0 2>/dev/null
>  ) || rust_bindings_generator_code=$?
>  if [ -n "$rust_bindings_generator_code" ]; then
>  	echo >&2 "***"
> -- 
> 2.45.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ