]> sourceware.org Git - debugedit.git/commit
debugedit: switch to xxhash for buildid recomputation main
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 24 Sep 2024 19:34:44 +0000 (15:34 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 2 Oct 2024 14:49:22 +0000 (10:49 -0400)
commit7f680f12774c0cece7c2da22b868c1db9639cc68
treea40cbc3a0f9b25ca5e1baa6c72f6aeec9fc0dc3a
parenta359559d4a7696a415cfec5f924363d26cb9a4eb
debugedit: switch to xxhash for buildid recomputation

When debugedit recomputes build-id (due to -i), it previously used md5
or sha1 (depending on length of incoming buildid).  This patch
replaces both those (including the code that does all the hashing)
with a 128-bit xxhash.  The 128-bit hash is truncated or padded to
whatever the incoming ELF note width was.

xxhash is much faster (8x over sha1) than either of those
crypto-flavoured hashes, and still produces fairly collision-free
values.  This was confirmed informally with a bulk build-id
recomputation of a few million binaries in the debuginfod server
corpus, yielding zero unexpected collisions.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Makefile.am
configure.ac
tests/debugedit.at
tools/debugedit.c
tools/md5.c [deleted file]
tools/md5.h [deleted file]
tools/sha1.c [deleted file]
tools/sha1.h [deleted file]
This page took 0.022046 seconds and 5 git commands to generate.