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: <CAKwvOdmY=Jysqai3KOYO8+c5idP9JjNGKL2xZn2sDNdj5MjTVA@mail.gmail.com>
Date: Mon, 18 Dec 2023 08:37:43 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Elliot Berman <quic_eberman@...cinc.com>, Masahiro Yamada <masahiroy@...nel.org>, 
	Justin Stitt <justinstitt@...gle.com>
Cc: Nathan Chancellor <nathan@...nel.org>, Bill Wendling <morbo@...gle.com>, 
	Manuel Traut <manut@...utronix.de>, linux-arm-msm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev, 
	Will Deacon <will@...nel.org>
Subject: Re: [PATCH] scripts/decode_stacktrace.sh: Use LLVM environment variable

On Fri, Dec 15, 2023 at 10:27 AM Elliot Berman <quic_eberman@...cinc.com> wrote:

This patch looks familiar...
https://lore.kernel.org/lkml/20230929034836.403735-1-cmllamas@google.com/

Masahiro, can you please pick up that patch?

Elliot, Justin, can you help test/review that patch?

>
> When using LLVM as the compiler, decode_stacktrace should also use
> llvm-addr2line. Check if LLVM is set and add the appropriate
> suffix/prefix.
>
> Signed-off-by: Elliot Berman <quic_eberman@...cinc.com>
> ---
>  scripts/decode_stacktrace.sh | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> index 564c5632e1a2..189b00f4e120 100755
> --- a/scripts/decode_stacktrace.sh
> +++ b/scripts/decode_stacktrace.sh
> @@ -16,6 +16,16 @@ elif type c++filt >/dev/null 2>&1 ; then
>         cppfilt_opts=-i
>  fi
>
> +if [[ "${LLVM}" == "1" ]] ; then
> +       addr2line="llvm-addr2line"
> +elif [[ "${LLVM}" == */ ]] ; then
> +       addr2line="${LLVM}llvm-addr2line"
> +elif [[ "${LLVM}" == -* ]] ; then
> +       addr2line="llvm-addr2line${LLVM}"
> +else
> +       addr2line="${CROSS_COMPILE}addr2line"
> +fi
> +
>  if [[ $1 == "-r" ]] ; then
>         vmlinux=""
>         basepath="auto"
> @@ -169,7 +179,7 @@ parse_symbol() {
>         if [[ $aarray_support == true && "${cache[$module,$address]+isset}" == "isset" ]]; then
>                 local code=${cache[$module,$address]}
>         else
> -               local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address" 2>/dev/null)
> +               local code=$(${addr2line} -i -e "$objfile" "$address" 2>/dev/null)
>                 if [[ $aarray_support == true ]]; then
>                         cache[$module,$address]=$code
>                 fi
>
> ---
> base-commit: 3f7168591ebf7bbdb91797d02b1afaf00a4289b1
> change-id: 20231214-llvm-decode-stacktrace-09538979006d
>
> Best regards,
> --
> Elliot Berman <quic_eberman@...cinc.com>
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ