From: Arnd Bergmann <arnd@arndb.de>
To: James Morris <jmorris@redhat.com>
Cc: linux-kernel@vger.kernel.org, R CHAN <rspchan@starhub.net.sg>
Subject: Re: [CRYPTO]: Miscompiling sha256.c by gcc 3.2.3 and arch pentium3,4
Date: Fri, 30 Jan 2004 16:43:13 +0100 [thread overview]
Message-ID: <200401301643.13477.arnd@arndb.de> (raw)
James Morris wrote:
> Have you noticed if this happens for any of the other crypto algorithms?
Just as a reminder, there is still an issue with extreme stack usage
of some of the algorithms, depending on compiler version and
flags.
The worst I have seen was around 16kb for twofish_setkey on 64 bit
s390 with gcc-3.1 (iirc). Right now, I get up to 4kb for this
function with gcc-3.3.1, which probably works but is definitely
a bad sign. I've seen this as well on other architectures (iirc
on x86_64), but not as severe.
Other algorithms are bad as well, these are the top scores from
Jörn Engel's checkstack.pl (s390 64bit 2.6.1 gcc-3.3.1):
0x00000a twofish_setkey: lay %r15,-3960(%r15)
0x0026fc aes_decrypt: lay %r15,-1168(%r15)
0x000c0c aes_encrypt: lay %r15,-1000(%r15)
0x00000e sha512_transform: lay %r15,-936(%r15)
0x001292 test_deflate: lay %r15,-784(%r15)
0x0028a2 cast6_decrypt: lay %r15,-696(%r15)
0x00d1a0 twofish_encrypt: lay %r15,-664(%r15)
0x001b34 setkey: lay %r15,-656(%r15)
0x00e2b0 twofish_decrypt: lay %r15,-624(%r15)
0x000c9e cast6_encrypt: lay %r15,-600(%r15)
0x000014 sha1_transform: lay %r15,-504(%r15)
^
This is the stack size --------|
Arnd <><
next reply other threads:[~2004-01-30 15:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-30 15:43 Arnd Bergmann [this message]
2004-01-30 16:57 ` [CRYPTO]: Miscompiling sha256.c by gcc 3.2.3 and arch pentium3,4 James Morris
2004-01-30 18:02 ` Randy.Dunlap
2004-01-30 18:35 ` James Morris
2004-01-30 18:53 ` James Morris
-- strict thread matches above, loose matches on Subject: below --
2004-02-02 4:08 linux
2004-02-05 19:40 ` Jean-Luc Cooke
2004-01-30 3:21 R CHAN
2004-01-30 14:39 ` James Morris
2004-01-30 15:04 ` Dave Paris
2004-01-30 15:24 ` R Chan
2004-01-30 15:28 ` Jakub Jelinek
2004-01-30 16:35 ` James Morris
2004-01-30 17:14 ` Andy Isaacson
2004-01-30 19:49 ` Jakub Jelinek
2004-02-01 21:17 ` Bill Davidsen
2004-01-30 21:14 ` David S. Miller
2004-02-01 21:18 ` Bill Davidsen
2004-02-01 23:22 ` David S. Miller
2004-02-02 1:00 ` Linus Torvalds
2004-02-02 18:55 ` Bill Davidsen
2004-01-30 17:26 ` Jean-Luc Cooke
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=200401301643.13477.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rspchan@starhub.net.sg \
/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