git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Put sha1dc on a diet

From
MSMarc Stevens <marc.stevens@cwi.nl>
Date
Mar 13, 2017, 21:15 UTC
Message-ID
<1392458356.3351662.1489439723458.JavaMail.zimbra@cwi.nl>
In-Reply-To
<20170313210023.bumtp6wyw6blmymp@sigill.intra.peff.net>

I think I now understand. The Makefile indeed seems to fail to correctly rebuild when a header has changed.

As the performance branch has removed the 'int bigendian' from SHA1_CTX in lib/sha1.h, the perf-branch and master-branch are binary incompatible. So the command-line utility does not get fully recompiled and instead of the value of found_collision will read a different value of SHA1_CTX.

So be careful to always do a 'make clean' for now.
-- Marc
----- Original Message -----
From: "Jeff King" <peff@peff.net>
To: "Marc Stevens" <Marc.Stevens@cwi.nl>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>, "Dan Shumow" <danshu@microsoft.com>, "Junio C Hamano" <gitster@pobox.com>, "Git Mailing List" <git@vger.kernel.org>
Sent: Monday, March 13, 2017 10:00:23 PM
Subject: Re: [PATCH] Put sha1dc on a diet
On Mon, Mar 13, 2017 at 09:47:54PM +0100, Marc Stevens wrote:
> Linus:
> I would be surprised, the dependencies should be automatically determined.
> 
> BTW Did you make local changes to this perf branch?
I can reproduce it with:
  cd sha1collisiondetection
  git clean -dqfx ;# make sure we are starting from scratch
  git checkout 9c8e73cadb35776d3310e3f8ceda7183fa75a39f
  make
  bin/sha1dcsum $file
  git checkout 55d1db0980501e582f6cd103a04f493995b1df78
  make
  bin/sha1dcsum $file

The final call to sha1dcsum will report a collision, even though the first one did not.

It also reproduces with the original snippet I posted. I didn't notice because I was just collecting the timings then (and I originally noticed the problem on the versions I had pulled into Git, where it works as expected; but then I am just pulling in the two source files, without all of the libtool magic).

-Peff
Previous: Jeff KingNext: Marc Stevens
Message 33 of 36 in “Put sha1dc on a diet”
  1. Put sha1dc on a dietLinus Torvalds, Mar 1, 2017
  2. Junio C HamanoMar 1, 2017
  3. Linus TorvaldsMar 1, 2017
  4. Jeff KingMar 1, 2017
  5. Junio C HamanoMar 1, 2017
  6. Johannes SchindelinMar 1, 2017
  7. Junio C HamanoMar 1, 2017
  8. Linus TorvaldsMar 1, 2017
  9. Johannes SchindelinMar 1, 2017
  10. Linus TorvaldsMar 1, 2017
  11. Jeff KingMar 1, 2017
  12. Duy NguyenMar 2, 2017
  13. Johannes SchindelinMar 2, 2017
  14. Linus TorvaldsMar 2, 2017
  15. Jeff HostetlerMar 2, 2017
  16. Linus TorvaldsMar 2, 2017
  17. Johannes SchindelinMar 2, 2017
  18. Johannes SchindelinMar 2, 2017
  19. Jeff KingMar 1, 2017
  20. Linus TorvaldsMar 1, 2017
  21. Jeff KingMar 1, 2017
  22. Linus TorvaldsMar 1, 2017
  23. Dan ShumowMar 2, 2017
  24. Junio C HamanoMar 2, 2017
  25. Dan ShumowMar 4, 2017
  26. Jeff KingMar 13, 2017
  27. Jeff KingMar 1, 2017
  28. Jeff KingMar 13, 2017
  29. Marc StevensMar 13, 2017
  30. Linus TorvaldsMar 13, 2017
  31. Marc StevensMar 13, 2017
  32. Jeff KingMar 13, 2017
  33. Marc StevensMar 13, 2017
  34. Marc StevensMar 16, 2017
  35. Jeff KingMar 16, 2017
  36. Dan ShumowMar 16, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.