lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 08/17] crypto: x86/chacha20 - Avoid spurious jumps to other functions
    Date
    From: Peter Zijlstra <peterz@infradead.org>

    [ 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: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: Martin Willi <martin@strongswan.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/x86/crypto/chacha-avx512vl-x86_64.S | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/arch/x86/crypto/chacha-avx512vl-x86_64.S b/arch/x86/crypto/chacha-avx512vl-x86_64.S
    index 848f9c75fd4f..596f91e3a774 100644
    --- a/arch/x86/crypto/chacha-avx512vl-x86_64.S
    +++ b/arch/x86/crypto/chacha-avx512vl-x86_64.S
    @@ -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

    --
    2.35.1
    \
     
     \ /
      Last update: 2022-04-07 17:29    [W:2.710 / U:0.668 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site