]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bpf: Remove inclusions of crypto/sha1.h
authorEric Biggers <ebiggers@kernel.org>
Sat, 14 Mar 2026 21:45:55 +0000 (14:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Mar 2026 15:40:45 +0000 (08:40 -0700)
Since commit 603b44162325 ("bpf: Update the bpf_prog_calc_tag to use
SHA256") made BPF program tags use SHA-256 instead of SHA-1, the header
<crypto/sha1.h> no longer needs to be included.  Remove the relevant
inclusions so that they no longer unnecessarily come up in searches for
which kernel code is still using the obsolete SHA-1 algorithm.

Since net/ipv6/addrconf.c was relying on the transitive inclusion of
<crypto/sha1.h> (for an unrelated purpose) via <linux/filter.h>, make it
include <crypto/sha1.h> explicitly in order to keep that file building.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/r/20260314214555.112386-1-ebiggers@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/filter.h
kernel/bpf/core.c
net/ipv6/addrconf.c

index 44d7ae95ddbccd0ba72740b5547e91e1990686f2..e40d4071a3455c2dbda8ae9ad871bed3fab6dbdd 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/if_vlan.h>
 #include <linux/vmalloc.h>
 #include <linux/sockptr.h>
-#include <crypto/sha1.h>
 #include <linux/u64_stats_sync.h>
 
 #include <net/sch_generic.h>
index 67eb12b637a5d3e7b89c697802ebc4b9b8484818..1af5fb3f21d96ffd6b532b4f5944783f41b3ff65 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <uapi/linux/btf.h>
-#include <crypto/sha1.h>
 #include <linux/filter.h>
 #include <linux/skbuff.h>
 #include <linux/vmalloc.h>
index 0e55f139e05d5bb3d788242bc0dc46c5948bb493..04c1e856bf7fc5031863d9db5827584d51752d73 100644 (file)
@@ -36,6 +36,7 @@
 
 #define pr_fmt(fmt) "IPv6: " fmt
 
+#include <crypto/sha1.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/kernel.h>