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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQBqcBEYvJQNMHgP7WfQmLbsj_j-wz4DpwQ4Cr3D1bj-w@mail.gmail.com>
Date: Sun, 28 Jul 2024 17:02:46 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT

On Sun, Jul 28, 2024 at 2:05 AM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Sat, Jul 27, 2024 at 4:03 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
> >
> > The successful execution of 'command -v rustc' does not necessarily mean
> > that 'rustc --version' will succeed.
>
> +1, it could also be e.g. non-executable.
>
> By the way, I was checking recently `pahole-version.sh` for a series I
> will send about `RUSTC_VERSION` and I saw that one has a `[ ! -x`
> check after the `command -v` for the non-executable case. But taking
> into account what you say here, I wonder if something needs to be done
> there too, e.g.
>
>     $ echo 'bad' > bad-pahole
>     $ chmod u+x bad-pahole
>     $ make PAHOLE=./bad-pahole defconfig
>     ...
>     ./bad-pahole: 1: bad: not found
>     init/Kconfig:112: syntax error
>     init/Kconfig:112: invalid statement
>
> So perhaps we can put in pahole-version.sh something like:
>
>     if output=$("$@" --version 2>/dev/null); then
>         echo $output | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'
>     else
>         echo 0
>         exit 1
>     fi
>
> i.e. similar to what you do here for `rustc`/`bindgen`.



Agree.
pahole-version.sh should be fixed too.




>
> > However, I did not understand the necessity of 'command -v $(RUSTC)'.
>
> I agree, I don't think it is needed.
>
> If you want to take it through your tree:
>
> Acked-by: Miguel Ojeda <ojeda@...nel.org>
> Tested-by: Miguel Ojeda <ojeda@...nel.org>
>
> Otherwise, I can take it too.


Yes, please take this to your tree. Thanks.






-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ