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: <8cf93086-4990-f14a-3271-92bc2ee0519e@iogearbox.net>
Date:   Wed, 5 Jan 2022 14:42:01 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Saeed Mahameed <saeed@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org,
        Saeed Mahameed <saeedm@...dia.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH net] scripts/pahole-flags.sh: Make sure pahole --version
 works

On 12/31/21 8:56 AM, Saeed Mahameed wrote:
> From: Saeed Mahameed <saeedm@...dia.com>
> 
> I had a broken pahole and it's been driving me crazy to see tons of the
> following error messages on every build.
> 
> pahole: symbol lookup error: pahole: undefined symbol: btf_gen_floats
> scripts/pahole-flags.sh: line 12: [: : integer expression expected
> scripts/pahole-flags.sh: line 16: [: : integer expression expected
> 
> Address this by redirecting pahole --version stderr to devnull,
> and validate stdout has a non empty string, otherwise exit silently.

I'll leave this up to Andrii, but broken pahole version sounds like it would
have been better to fix the local pahole installation instead [rather than the
kernel having to guard against it, especially if it's driving you crazy]?

I could image that silent exit on empty version string due to broken pahole
deployment might rather waste developer's time to then go and debug why btf
wasn't generated..

> Fixes: 9741e07ece7c ("kbuild: Unify options for BTF generation for vmlinux and modules")
> CC: Andrii Nakryiko <andrii@...nel.org>
> CC: Jiri Olsa <jolsa@...hat.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
> ---
>   scripts/pahole-flags.sh | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh
> index e6093adf4c06..b3b53f890d40 100755
> --- a/scripts/pahole-flags.sh
> +++ b/scripts/pahole-flags.sh
> @@ -7,7 +7,8 @@ if ! [ -x "$(command -v ${PAHOLE})" ]; then
>   	exit 0
>   fi
>   
> -pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
> +pahole_ver=$(${PAHOLE} --version 2>/dev/null | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
> +[ -z "${pahole_ver}" ] && exit 0
>   
>   if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
>   	# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ