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: <CAKH8qBsTJcipS65962_hTLhpqzv42YWQpXntVkkt4RhCYubT7g@mail.gmail.com>
Date:   Wed, 13 Jul 2022 12:11:38 -0700
From:   Stanislav Fomichev <sdf@...gle.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Hao Luo <haoluo@...gle.com>,
        Jiri Olsa <jolsa@...nel.org>, Zi Shen Lim <zlim.lnx@...il.com>,
        Xu Kuohai <xukuohai@...wei.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, bpf@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, patches@...ts.linux.dev,
        Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH] bpf, arm64: Mark dummy_tramp as global

On Wed, Jul 13, 2022 at 10:35 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> When building with clang + CONFIG_CFI_CLANG=y, the following error
> occurs at link time:
>
>   ld.lld: error: undefined symbol: dummy_tramp
>
> dummy_tramp is declared globally in C but its definition in inline
> assembly does not use .global, which prevents clang from properly
> resolving the references to it when creating the CFI jump tables.
>
> Mark dummy_tramp as global so that the reference can be properly
> resolved.
>
> Fixes: b2ad54e1533e ("bpf, arm64: Implement bpf_arch_text_poke() for arm64")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1661
> Suggested-by: Sami Tolvanen <samitolvanen@...gle.com>
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>

Reviewed-by: Stanislav Fomichev <sdf@...gle.com>

> ---
>  arch/arm64/net/bpf_jit_comp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
> index fd1cb0d2aaa6..dcc572b7d4da 100644
> --- a/arch/arm64/net/bpf_jit_comp.c
> +++ b/arch/arm64/net/bpf_jit_comp.c
> @@ -604,6 +604,7 @@ void dummy_tramp(void);
>
>  asm (
>  "      .pushsection .text, \"ax\", @progbits\n"
> +"      .global dummy_tramp\n"
>  "      .type dummy_tramp, %function\n"
>  "dummy_tramp:"
>  #if IS_ENABLED(CONFIG_ARM64_BTI_KERNEL)
>
> base-commit: ace2bee839e08df324cb320763258dfd72e6120e
> --
> 2.37.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ