From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71A85232787; Tue, 18 Feb 2025 08:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739868206; cv=none; b=dRbCkisTu4HMhBsXklu9bEMYJlhtRI1UukXA5jL3tALFuOCRZ7bTgLJYu3FNrk2BDRY6ag+j9nB2827KnTX30El1KgL1ng6jzeQTGGi0i/Aalv921uKnxC081dCs5PUpMzSTU8Oc0E18h+4kEQ5Tmk6vzJtuhVFGfO7wRjHjrwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739868206; c=relaxed/simple; bh=A/CCR/2WH1cVpTRVUOEEmzgqWCrL/UskAPkmJyUs57o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XZrmzzVHT6KXHrBMgWsM/5B+S/vlcQxW4ixITqsA+L0Vjcq4HjjONcO+Bo3IfG0OEEr2YqAzlQpYBI5PobZvyPGz+o7Sng43KxjswU2sxkCCYSjqvEGamyWXXl8X6O0n7ljyIPcfMjntzyzWclF8ThhfeTp2/dpfUhqBcN8vToM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fXlExSU3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fXlExSU3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 173BDC4CEE2; Tue, 18 Feb 2025 08:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739868205; bh=A/CCR/2WH1cVpTRVUOEEmzgqWCrL/UskAPkmJyUs57o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fXlExSU35b/UGYNbHeSAfWSDYpsi0rB8E9f+BtZwpg2CNz8OF3qakh2T0+OIVCMN/ 9IpHSzw7YQ0zOij0fB+4l6GPPOCFopjnGFj4YLuNZoRaQDnfVLO/x7syRfB0Rzt4nh Dadog/0C2QShMa/Y/g38Qd3jUuX+Q+ngKIMCyUpGU0X9SJ3IXplgq4u2+o7JqZFKhN Qcb202Ygyq/s4J/ggKs6W1qOT1pu4/7QST13Du/cyv9agb8/dwzI9IIc4IFjh9O8so DY/20ZLAg7fmL3cYxjqILn6VUT2kjUyGG2hr7ygB8pcXn8XkJbKjy7a+NAWL8RczGm Zg4p3TGRXp8vw== Date: Tue, 18 Feb 2025 09:43:15 +0100 From: Ingo Molnar To: Eric Biggers Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-crypto@vger.kernel.org, Ard Biesheuvel , Stephen Rothwell , Peter Zijlstra Subject: Re: [PATCH] x86/crc: add ANNOTATE_NOENDBR to suppress objtool warnings Message-ID: References: <20250217193230.100443-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250217193230.100443-1-ebiggers@kernel.org> * Eric Biggers wrote: > From: Eric Biggers > > 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 > Closes: https://lore.kernel.org/r/20250217170555.3d14df62@canb.auug.org.au/ > Suggested-by: Peter Zijlstra > Signed-off-by: Eric Biggers > --- > > This applies to > https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next > > arch/x86/lib/crc-pclmul-template.S | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/x86/lib/crc-pclmul-template.S b/arch/x86/lib/crc-pclmul-template.S > index dc91cc074b300..a19b730b642d3 100644 > --- a/arch/x86/lib/crc-pclmul-template.S > +++ b/arch/x86/lib/crc-pclmul-template.S > @@ -5,10 +5,11 @@ > // Copyright 2025 Google LLC > // > // Author: Eric Biggers > > #include > +#include > > // Offsets within the generated constants table > .set OFFSETOF_BSWAP_MASK, -5*16 // msb-first CRCs only > .set OFFSETOF_FOLD_ACROSS_2048_BITS_CONSTS, -4*16 // must precede next > .set OFFSETOF_FOLD_ACROSS_1024_BITS_CONSTS, -3*16 // must precede next > @@ -270,10 +271,14 @@ > .set BSWAP_MASK_XMM, %xmm6 > .set CONSTS, V7 > .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 Acked-by: Ingo Molnar Thanks, Ingo