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: <CAKwvOdmJa5WFLw=YZWAEu=o+3dkUgVNrwNWDZLC=k2Be=Bcy3Q@mail.gmail.com>
Date:   Mon, 18 Sep 2023 08:51:13 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Will Deacon <will@...nel.org>
Cc:     linux-kernel@...r.kernel.org, kernel-team@...roid.com,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nicolas Schier <nicolas@...sle.eu>,
        Josh Poimboeuf <jpoimboe@...nel.org>,
        John Stultz <jstultz@...gle.com>, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH v4 1/3] scripts/faddr2line: Don't filter out non-function
 symbols from readelf

On Thu, Sep 14, 2023 at 6:12 AM Will Deacon <will@...nel.org> wrote:
>
> As Josh points out in 20230724234734.zy67gm674vl3p3wv@...ble:

Perhaps a suggested-by tag would be appropriate then? Next time.

>
> > Problem is, I think the kernel's symbol printing code prints the
> > nearest kallsyms symbol, and there are some valid non-FUNC code
> > symbols.  For example, syscall_return_via_sysret.
>
> so we shouldn't be considering only 'FUNC'-type symbols in the output
> from readelf.
>
> Drop the function symbol type filtering from the faddr2line outer loop.
>
> Cc: Josh Poimboeuf <jpoimboe@...nel.org>
> Cc: John Stultz <jstultz@...gle.com>
> Link: https://lore.kernel.org/r/20230724234734.zy67gm674vl3p3wv@treble
> Signed-off-by: Will Deacon <will@...nel.org>

LGTM; thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

> ---
>  scripts/faddr2line | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/faddr2line b/scripts/faddr2line
> index 0e73aca4f908..a35a420d0f26 100755
> --- a/scripts/faddr2line
> +++ b/scripts/faddr2line
> @@ -260,7 +260,7 @@ __faddr2line() {
>
>                 DONE=1
>
> -       done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$4 == "FUNC" && $8 == fn')
> +       done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$8 == fn')
>  }
>
>  [[ $# -lt 2 ]] && usage
> --
> 2.42.0.283.g2d96d420d3-goog
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ