Re: [PATCH v1 0/3] SHA256 for PPC/SPE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Von: linux-crypto-owner@xxxxxxxxxxxxxxx [linux-crypto-owner@xxxxxxxxxxxxxxx]" im Auftrag von "Herbert Xu [herbert@xxxxxxxxxxxxxxxxxxx]
> Gesendet: Montag, 26. Januar 2015 01:18
> An: Markus Stockhausen
> Cc: linux-crypto@xxxxxxxxxxxxxxx; linuxppc-dev@xxxxxxxxxxxxxxxx
> Betreff: Re: [PATCH v1 0/3] SHA256 for PPC/SPE
> 
> Markus Stockhausen <stockhausen@xxxxxxxxxxx> wrote:
> >
> >  [PATCH v1 0/3] SHA256 for PPC/SPE
> >
> > The following patches add support for SIMD accelerated SHA256
> > calculation on PPC processors with SPE instruction set. The
> > implementation takes care of the following constraints:
> >
> > - independant of processor endianess
> > - fallback to generic code if called from interrupt context
> > - disable preemtion only for short intervals
> 
> Thanks for the patch! Unfortunately the interrupt context test
> is a bummer because that means your code won't be used by IPsec
> at all.
> 
> Would it be possible to relax the conditions similar to sha1_ssse3
> on x86? If not how about going async with cryptd?

@Herbert: thanks for that annotation. IPsec is the desired use case.
Do you have a programming template for the cryptd integration?
E.g. ghash-clmulni-intel_glue.c?

@linuxppc: Intel world checks for usable FPU (SSE3, ...) in the crypto 
modules with

bool irq_fpu_usable(void)
{
  return !in_interrupt() ||
    interrupted_user_mode() ||
    interrupted_kernel_fpu_idle();
}

I guess interrupted_kernel_fpu_idle() is the part that allows IPsec 
inside an interrupt to make use of the accelerated module. 
Explanation reads:

* On others, we can do a kernel_fpu_begin/end() pair *ONLY* if 
* that pair does nothing at all: the thread must not have fpu (so
* that we don't try to save the FPU state), and TS must
* be set (so that the clts/stts pair does nothing that is
* visible in the interrupted kernel thread).

Do I have the chance to use something similiar in the PPC/SPE 
case? Or is there a simple way like saving the SPE registers
myself?

Thanks in advance.

Markus
****************************************************************************
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.

�ber das Internet versandte E-Mails können unter fremden Namen erstellt oder
manipuliert werden. Deshalb ist diese als E-Mail verschickte Nachricht keine
rechtsverbindliche Willenserklärung.

Collogia
Unternehmensberatung AG
Ubierring 11
D-50678 Köln

Vorstand:
Kadir Akin
Dr. Michael Höhnerbach

Vorsitzender des Aufsichtsrates:
Hans Kristian Langva

Registergericht: Amtsgericht Köln
Registernummer: HRB 52 497

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

e-mails sent over the internet may have been written under a wrong name or
been manipulated. That is why this message sent as an e-mail is not a
legally binding declaration of intention.

Collogia
Unternehmensberatung AG
Ubierring 11
D-50678 Köln

executive board:
Kadir Akin
Dr. Michael Höhnerbach

President of the supervisory board:
Hans Kristian Langva

Registry office: district court Cologne
Register number: HRB 52 497

****************************************************************************

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux