]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, arm64: Mark dummy_tramp as global
authorNathan Chancellor <nathan@kernel.org>
Wed, 13 Jul 2022 17:35:03 +0000 (10:35 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 14 Jul 2022 14:57:26 +0000 (16:57 +0200)
commitdfeac3865ef37fb72f2d2f09cfae037d78f62353
treec2fbbeba0620fde9c734e3f7d479ab102ac506c3
parentf145808d408de0d455163f72dccb44ccd79d552c
bpf, arm64: Mark dummy_tramp as global

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: ce65640393a8 ("bpf, arm64: Implement bpf_arch_text_poke() for arm64")
Suggested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1661
Link: https://lore.kernel.org/bpf/20220713173503.3889486-1-nathan@kernel.org
arch/arm64/net/bpf_jit_comp.c