Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732711

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

From Eric Biggers <ebiggers3@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files
Date 2017-09-15 07:00 +0200
Message-ID <upQTo-6ps-11@gated-at.bofh.it> (permalink)
References (3 earlier) <un9fS-3ll-43@gated-at.bofh.it> <uncx4-5G0-13@gated-at.bofh.it> <unvJo-1M9-7@gated-at.bofh.it> <upnom-4fk-19@gated-at.bofh.it> <upou5-4Vw-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Josh,

On Wed, Sep 13, 2017 at 05:33:03PM -0500, Josh Poimboeuf wrote:
> And here's v2 of the sha512-avx2 patch.  It should hopefully gain back
> most of the performance lost by v1.
> 
> From: Josh Poimboeuf <jpoimboe@redhat.com>
> Subject: [PATCH] x86/crypto: Fix RBP usage in sha512-avx2-asm.S
> 
> Using RBP as a temporary register breaks frame pointer convention and
> breaks stack traces when unwinding from an interrupt in the crypto code.
> 
> Mix things up a little bit to get rid of the RBP usage, without
> destroying performance.  Use RDI instead of RBP for the TBL pointer.
> That will clobber CTX, so save CTX on the stack and use RDI as CTX
> before it gets clobbered, and R12 as CTX after it gets clobbered.
> 
> Also remove the unused y4 variable.
> 

I tested the v2 patches for both sha256-avx2 and sha512-avx2 on Skylake.  They
both pass the crypto self-tests, and there was no noticable performance
difference compared to the unpatched versions.  Thanks!

Eric

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Josh Poimboeuf <jpoimboe@redhat.com> - 2017-09-13 23:30 +0200
  Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Josh Poimboeuf <jpoimboe@redhat.com> - 2017-09-14 00:40 +0200
    Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Eric Biggers <ebiggers3@gmail.com> - 2017-09-15 07:00 +0200
      Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Ingo Molnar <mingo@kernel.org> - 2017-09-15 07:40 +0200
        Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Eric Biggers <ebiggers3@gmail.com> - 2017-09-15 18:10 +0200
          Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Ingo Molnar <mingo@kernel.org> - 2017-09-15 23:10 +0200
            Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Herbert Xu <herbert@gondor.apana.org.au> - 2017-09-19 05:10 +0200
  Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Ingo Molnar <mingo@kernel.org> - 2017-09-14 11:20 +0200
    Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Ingo Molnar <mingo@kernel.org> - 2017-09-14 11:30 +0200
    Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Josh Poimboeuf <jpoimboe@redhat.com> - 2017-09-14 15:30 +0200
      Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S  files Ingo Molnar <mingo@kernel.org> - 2017-09-15 07:40 +0200

csiph-web