Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Joachim Eastwood <manabian@gmail.com>
Cc: Mandeep Singh Baines <msb@chromium.org>,
	linux-kernel@vger.kernel.org,
	Ramsay Jones <ramsay@ramsay1.demon.co.uk>,
	Nicolas Pitre <nico@cam.org>,
	Herbert Xu <herbert@gondor.hengli.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux@arm.linux.org.uk
Subject: Re: [PATCH] lib/sha1: use the git implementation of SHA-1
Date: Sun, 07 Aug 2011 11:38:12 -0700	[thread overview]
Message-ID: <d86cf41b-bc2f-400f-823e-8042913974ae@email.android.com> (raw)
In-Reply-To: <CAGhQ9Vx-MoFb7rEBQCwqi8zLjoWiED7FXvzcq2eDfTEg_P=2ug@mail.gmail.com>

There aren't many users of that define, could you just turn it back to the proper 16, and then try changing it to 80 in each place that uses it?

That way we'd see exactly *which* use is the buggy one..

        Linus

Joachim  Eastwood <manabian@gmail.com> wrote:

>On Sun, Aug 7, 2011 at 7:44 PM, Linus Torvalds
><torvalds@linux-foundation.org> wrote:
>> On Sun, Aug 7, 2011 at 10:36 AM, Joachim  Eastwood
><manabian@gmail.com> wrote:
>>>
>>> These printk's come from drivers/char/random.c
>>> So it doesn't seem like it hangs in any of the sha_* funtions.
>>
>> The only other change is to SHA_WORKSPACE_WORDS - I wonder if some
>> code depends on the old (much bigger) workspace for some reason?
>>
>> The git SHA1 routines are way smarter than the old SHA1, and will
>> re-use the workspace area, so they need only a fraction of the old
>> area.
>>
>> Try changing SHA_WORKSPACE_WORDS back to 80 (in
>> include/linux/cryptohash.h). The git sha1 only needs 16 words, but ..
>
>yup, setting it to 80 makes my kernel boot again :-)
>
>> If that fixes it for you, then it's almost certainly some buggy user
>> that uses the SHA1 workspace array for its own odd case, and
>> incorrectly "knows" that it's that old wasteful 320 bytes. There's a
>> few places in networking that uses SHA_WORKSPACE_WORDS.
>
>Guess more architectures than ARM are affected by this then.
>
>regards
>Joachim Eastwood
>
>>                                     Linus
>>

  reply	other threads:[~2011-08-07 18:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06  1:46 [PATCH] lib/sha1: use the git implementation of SHA-1 Mandeep Singh Baines
2011-08-07 11:54 ` Joachim Eastwood
2011-08-07 16:52   ` Linus Torvalds
2011-08-07 17:36     ` Joachim Eastwood
2011-08-07 17:44       ` Linus Torvalds
2011-08-07 18:08         ` Joachim Eastwood
2011-08-07 18:38           ` Linus Torvalds [this message]
2011-08-07 18:57             ` Joachim Eastwood
2011-08-07 19:47               ` Andreas Schwab
2011-08-07 20:17                 ` Linus Torvalds
2011-08-07 20:48                   ` Joachim Eastwood
2011-08-07 21:06                     ` Linus Torvalds
2011-08-07 21:29                       ` [PATCH] treewide: Remove direct uses of SHA_WORKSPACE_WORDS Joe Perches
2011-08-07 21:41                         ` Linus Torvalds
2011-08-08  1:25                       ` [PATCH] lib/sha1: use the git implementation of SHA-1 Nicolas Pitre

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=d86cf41b-bc2f-400f-823e-8042913974ae@email.android.com \
    --to=torvalds@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=manabian@gmail.com \
    --cc=msb@chromium.org \
    --cc=nico@cam.org \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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