From: James Morris <jmorris@intercode.com.au>
To: Thomas Spatzier <TSPAT@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, "David S. Miller" <davem@redhat.com>
Subject: Re: crypto API and IBM z990 hardware support
Date: Wed, 2 Jul 2003 19:35:16 +1000 (EST) [thread overview]
Message-ID: <Mutt.LNX.4.44.0307021913540.31308-100000@excalibur.intercode.com.au> (raw)
In-Reply-To: <OF1BACB1D3.F4409038-ONC1256D57.00247A0A-C1256D57.002701D8@de.ibm.com>
On Wed, 2 Jul 2003, Thomas Spatzier wrote:
> Hello James,
>
> I'm currently looking at the crypto API and considering adding support for
> new hardware instructions implemented in the IBM z990 architecture. Since I
> found your name in most of the files I find it appropriate to ask for your
> opinion on how to integrate the new code (from a design point of view).
> z990 provides hardware support for AES, DES and SHA. The problem is, that
> the respective instructions might not be implemented on all z990 systems
> (export restrictions etc). Hence, a check must be run to test whether the
> instruction set is present, and if not, a fall-back to the current software
> implementation must be taken.
Are there any details available on how all of this is implemented? Are
these instructions synchronous?
> I basically have two solutions in mind: (1)
> to integrate the new code into the current crypto files; add some #ifdef s
> to prevent the code from being compiled when building a non-z990 kernel;
> add some ifs for runtime check.
No, the core crypto code should not be altered with #ifdefs to handle some
arch specific issue.
> (2) include the new code into an arch/s390/crypto directory. The
> advantage of (1) is that there are no seperate crypto directories, the
> code doesn't drift apart. Furthermore, it's probably the best solution
> with respect to the kernel module loader. On the other hand, the
> hardware support is very arch-specific, which would fit in option (2).
> (2) however has the disadvantage that there are multiple crypto modules;
> the user has to select one to load -> must have different names for one
> algorithm. What is your opinion on this subject?
The plan is to provide crypto/arch/ subdirectories where arch optimized
versions of the crypto algorithms are implemented, and built automatically
(via configuration defaults) instead of the generic C versions.
So, there might be:
crypto/aes.c
crypto/arch/i386/aes.s
where on i386, aes.s would be built into aes.o and aes.c would not be
built.
The simple solution for you might be something like:
crypto/aes.c -> aes.o
crypto/arch/s390/aes_z990.c -> aes_z990.o
and the administrator of the system could configure modprobe.conf to alias
aes to aes_z990 if the latter is supported in hardware.
- James
--
James Morris
<jmorris@intercode.com.au>
next prev parent reply other threads:[~2003-07-02 9:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-02 7:07 Thomas Spatzier
2003-07-02 9:35 ` James Morris [this message]
2003-07-07 7:09 ` Christoph Hellwig
2003-07-08 2:53 ` David S. Miller
2003-07-08 3:37 ` Roland Dreier
2003-07-08 3:35 ` David S. Miller
2003-07-10 1:08 ` Werner Almesberger
2003-07-10 1:08 ` David S. Miller
2003-07-10 2:06 ` Werner Almesberger
2003-07-10 2:06 ` David S. Miller
2003-07-10 2:37 ` Werner Almesberger
2003-07-11 0:02 ` David S. Miller
[not found] ` <mailman.1057799700.15422.linux-kernel2news@redhat.com>
2003-07-10 5:55 ` Pete Zaitcev
2003-07-02 12:35 Thomas Spatzier
2003-07-02 16:57 ` James Morris
2003-07-07 7:11 ` Christoph Hellwig
2003-07-07 10:27 ` James Morris
2003-07-02 20:23 Ulrich Weigand
[not found] <4P45.5YN.11@gated-at.bofh.it>
[not found] ` <4T81.24d.41@gated-at.bofh.it>
2003-07-02 22:06 ` Arnd Bergmann
2003-07-06 14:08 ` James Morris
2003-07-06 17:46 ` Arnd Bergmann
2003-07-07 7:14 ` Christoph Hellwig
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=Mutt.LNX.4.44.0307021913540.31308-100000@excalibur.intercode.com.au \
--to=jmorris@intercode.com.au \
--cc=TSPAT@de.ibm.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®