Re: [PATCH] Put sha1dc on a diet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
To: "Marc Stevens" <Marc.Stevens@xxxxxx>
Cc: "Linus Torvalds" <torvalds@xxxxxxxxxxxxxxxxxxxx>, "Dan Shumow" <danshu@xxxxxxxxxxxxx>, "Junio C Hamano" <gitster@xxxxxxxxx>, "Git Mailing List" <git@xxxxxxxxxxxxxxx>
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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]