Re: [PATCH] Fix PPC SHA1 routine for large input buffers
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jun 19, 2006, 05:02 UTC
- Message-ID
- <Pine.LNX.4.64.0606182145370.5498@g5.osdl.org>
- In-Reply-To
- <17557.57564.267469.561683@cargo.ozlabs.ibm.com>
On Mon, 19 Jun 2006, Paul Mackerras wrote:
Show 7 quoted lines
> > The PPC SHA1 routine had an overflow which meant that it gave > incorrect results for input buffers >= 512MB. This fixes it by > ensuring that the update of the total length in bits is done using > 64-bit arithmetic. > > Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Linus Torvalds <torvalds@osdl.org>
This fixes git-fsck-objects for me on the mozilla archive, no more complaints about bad SHA1's.
And yeah, now it's taking me 14 minutes too, so the 7-minute fsck was just because it didn't actually check the SHA1 of the large pack fully.
(Which is actually good news - half of the time is literally checking the pack integrity. That implies that the individual object integrity isn't as dominating as I thought it would be, and that things like hw-accelerated SHA1 engines will help with fsck. I'd not be surprised to see things like that in a couple of years).
Linus