Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0d86f2a authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Greg Kroah-Hartman
Browse files

crypto: x86/chacha20 - Avoid spurious jumps to other functions



[ Upstream commit 4327d168515fd8b5b92fa1efdf1d219fb6514460 ]

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarMartin Willi <martin@strongswan.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f0213894
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ ENTRY(chacha_2block_xor_avx512vl)
	# 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 @@ ENTRY(chacha_4block_xor_avx512vl)
	# xor remaining bytes from partial register into output
	mov		%rcx,%rax
	and		$0xf,%rcx
	jz		.Ldone8
	jz		.Ldone4
	mov		%rax,%r9
	and		$~0xf,%r9