diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-08-11 23:16:15 +0300 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2025-08-22 21:40:05 +0300 |
| commit | d47cc4dea17391c99b943fa8d70a279e906b2843 (patch) | |
| tree | dfb6eea68407b4917219422fb56a059a5556db78 /include/linux | |
| parent | 0780f54ab129b28e2b29689c95ad579a9db04fab (diff) | |
| download | linux-d47cc4dea17391c99b943fa8d70a279e906b2843.tar.xz | |
bpf: Use sha1() instead of sha1_transform() in bpf_prog_calc_tag()
Now that there's a proper SHA-1 library API, just use that instead of
the low-level SHA-1 compression function. This eliminates the need for
bpf_prog_calc_tag() to implement the SHA-1 padding itself. No
functional change; the computed tags remain the same.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20250811201615.564461-1-ebiggers@kernel.org
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/filter.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index c0a74fb9fcb1..9092d8ea95c8 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -997,12 +997,6 @@ static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) return prog->len * sizeof(struct bpf_insn); } -static inline u32 bpf_prog_tag_scratch_size(const struct bpf_prog *prog) -{ - return round_up(bpf_prog_insn_size(prog) + - sizeof(__be64) + 1, SHA1_BLOCK_SIZE); -} - static inline unsigned int bpf_prog_size(unsigned int proglen) { return max(sizeof(struct bpf_prog), |
