From: Joachim Eastwood Subject: Re: [PATCH] lib/sha1: use the git implementation of SHA-1 Date: Sun, 7 Aug 2011 20:08:45 +0200 Message-ID: References: <1312595187-3265-1-git-send-email-msb@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Mandeep Singh Baines , linux-kernel@vger.kernel.org, Ramsay Jones , Nicolas Pitre , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux@arm.linux.org.uk To: Linus Torvalds Return-path: Received: from mail-vx0-f174.google.com ([209.85.220.174]:64205 "EHLO mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754421Ab1HGSIq convert rfc822-to-8bit (ORCPT ); Sun, 7 Aug 2011 14:08:46 -0400 In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: On Sun, Aug 7, 2011 at 7:44 PM, Linus Torvalds wrote: > On Sun, Aug 7, 2011 at 10:36 AM, Joachim =A0Eastwood 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 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= Linus >