public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	linux-crypto@vger.kernel.org, ebiggers@google.com,
	herbert@gondor.apana.org.au, Jason@zx2c4.com,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH 1/2] x86/chacha20: Avoid spurious jumps to other functions
Date: Tue, 22 Mar 2022 12:48:10 +0100	[thread overview]
Message-ID: <20220322115125.737671717@infradead.org> (raw)
In-Reply-To: 20220322114809.381992456@infradead.org

The chacha_Nblock_xor_avx512vl() functions all have their own,
identical, .LdoneN label, however in one particular spot {2,4} jump to
the 8 version instead of their own. Resulting in:

  arch/x86/crypto/chacha-x86_64.o: warning: objtool: chacha_2block_xor_avx512vl() falls through to next function chacha_8block_xor_avx512vl()
  arch/x86/crypto/chacha-x86_64.o: warning: objtool: chacha_4block_xor_avx512vl() falls through to next function chacha_8block_xor_avx512vl()

Make each function consistently use its own done label.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/crypto/chacha-avx512vl-x86_64.S |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/crypto/chacha-avx512vl-x86_64.S
+++ b/arch/x86/crypto/chacha-avx512vl-x86_64.S
@@ -172,7 +172,7 @@ SYM_FUNC_START(chacha_2block_xor_avx512v
 	# xor remaining bytes from partial register into output
 	mov		%rcx,%rax
 	and		$0xf,%rcx
-	jz		.Ldone8
+	jz		.Ldone2
 	mov		%rax,%r9
 	and		$~0xf,%r9
 
@@ -438,7 +438,7 @@ SYM_FUNC_START(chacha_4block_xor_avx512v
 	# xor remaining bytes from partial register into output
 	mov		%rcx,%rax
 	and		$0xf,%rcx
-	jz		.Ldone8
+	jz		.Ldone4
 	mov		%rax,%r9
 	and		$~0xf,%r9
 



  reply	other threads:[~2022-03-22 11:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 11:48 [PATCH 0/2] crypto objtool cleanup Peter Zijlstra
2022-03-22 11:48 ` Peter Zijlstra [this message]
2022-03-22 12:18   ` [PATCH 1/2] x86/chacha20: Avoid spurious jumps to other functions Martin Willi
2022-03-25  4:22   ` Herbert Xu
2022-03-22 11:48 ` [PATCH 2/2] objtool: Fix IBT tail-call detection Peter Zijlstra
2022-03-23 23:05 ` [PATCH 3/2] x86/poly1305: Fixup SLS Peter Zijlstra
2022-03-25  4:22   ` Herbert Xu
2022-03-23 23:07 ` [PATCH 4/2] objtool: Fix SLS validation for KCOV tail-call replacement Peter Zijlstra
2022-03-25 12:30 ` [PATCH 5/2] x86/sm3: Fixup SLS Peter Zijlstra
2022-03-30  5:19   ` Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2022-03-25 12:05 [PATCH 1/2] x86/chacha20: Avoid spurious jumps to other functions Sedat Dilek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220322115125.737671717@infradead.org \
    --to=peterz@infradead.org \
    --cc=Jason@zx2c4.com \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jpoimboe@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox