diff options
author | 2025-02-17 11:32:30 -0800 | |
---|---|---|
committer | 2025-02-18 19:26:46 -0800 | |
commit | a0bd462f3a1369f4440cc4448b879ed2c8611f1a (patch) | |
tree | a426ad9e5a1e6b657af46e3dcd6df7c472d09b0f | |
parent | x86/crc32: improve crc32c_arch() code generation with clang (diff) | |
download | wireguard-linux-a0bd462f3a1369f4440cc4448b879ed2c8611f1a.tar.xz wireguard-linux-a0bd462f3a1369f4440cc4448b879ed2c8611f1a.zip |
x86/crc: add ANNOTATE_NOENDBR to suppress objtool warnings
The assembly functions generated by crc-pclmul-template.S are called
only via static_call, so they do not need to begin with an endbr
instruction. But objtool still warns about a missing endbr by default.
Add ANNOTATE_NOENDBR to suppress these warnings:
vmlinux.o: warning: objtool: crc32_x86_init+0x1c0: relocation to !ENDBR: crc32_lsb_vpclmul_avx10_256+0x0
vmlinux.o: warning: objtool: crc64_x86_init+0x183: relocation to !ENDBR: crc64_msb_vpclmul_avx10_256+0x0
vmlinux.o: warning: objtool: crc_t10dif_x86_init+0x183: relocation to !ENDBR: crc16_msb_vpclmul_avx10_256+0x0
vmlinux.o: warning: objtool: __SCK__crc32_lsb_pclmul+0x0: data relocation to !ENDBR: crc32_lsb_pclmul_sse+0x0
vmlinux.o: warning: objtool: __SCK__crc64_lsb_pclmul+0x0: data relocation to !ENDBR: crc64_lsb_pclmul_sse+0x0
vmlinux.o: warning: objtool: __SCK__crc64_msb_pclmul+0x0: data relocation to !ENDBR: crc64_msb_pclmul_sse+0x0
vmlinux.o: warning: objtool: __SCK__crc16_msb_pclmul+0x0: data relocation to !ENDBR: crc16_msb_pclmul_sse+0x0
Fixes: 8d2d3e72e35b ("x86/crc: add "template" for [V]PCLMULQDQ based CRC functions")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/20250217170555.3d14df62@canb.auug.org.au/
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250217193230.100443-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r-- | arch/x86/lib/crc-pclmul-template.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/lib/crc-pclmul-template.S b/arch/x86/lib/crc-pclmul-template.S index dc91cc074b30..a19b730b642d 100644 --- a/arch/x86/lib/crc-pclmul-template.S +++ b/arch/x86/lib/crc-pclmul-template.S @@ -7,6 +7,7 @@ // Author: Eric Biggers <ebiggers@google.com> #include <linux/linkage.h> +#include <linux/objtool.h> // Offsets within the generated constants table .set OFFSETOF_BSWAP_MASK, -5*16 // msb-first CRCs only @@ -272,6 +273,10 @@ .set CONSTS_YMM, %ymm7 .set CONSTS_XMM, %xmm7 + // Use ANNOTATE_NOENDBR to suppress an objtool warning, since the + // functions generated by this macro are called only by static_call. + ANNOTATE_NOENDBR + #ifdef __i386__ push CONSTS_PTR mov 8(%esp), CONSTS_PTR |