summaryrefslogtreecommitdiff
path: root/tools/perf/util/Build
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-06-25 23:23:09 +0300
committerNamhyung Kim <namhyung@kernel.org>2025-06-26 20:51:40 +0300
commit43830468b6436811ff732b062f8d6306c6eddb77 (patch)
tree42fcba7d87eeaf1de9817eb5ff4054f7473cd4d5 /tools/perf/util/Build
parent55a18d2f3ff79c9082225f44e0abbaea6286bf99 (diff)
downloadlinux-43830468b6436811ff732b062f8d6306c6eddb77.tar.xz
perf util: add a basic SHA-1 implementation
SHA-1 can be written in fewer than 100 lines of code. Just add a basic SHA-1 implementation so that there's no need to use an external library or try to pull in the kernel's SHA-1 implementation. The kernel's SHA-1 implementation is not really intended to be pulled into userspace programs in the way that it was proposed to do so for perf (https://lore.kernel.org/r/20250521225307.743726-3-yuzhuo@google.com/), and it's also likely to undergo some refactoring in the future. There's no need to tie userspace tools to it. Include a test for sha1() in the util test suite. Signed-off-by: Eric Biggers <ebiggers@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250625202311.23244-3-ebiggers@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/Build')
-rw-r--r--tools/perf/util/Build1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 07dc1e704f90..45515b8f615a 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -41,6 +41,7 @@ perf-util-y += rbtree.o
perf-util-y += libstring.o
perf-util-y += bitmap.o
perf-util-y += hweight.o
+perf-util-y += sha1.o
perf-util-y += smt.o
perf-util-y += strbuf.o
perf-util-y += string.o