summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-03-15 00:45:55 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-03-24 18:40:45 +0300
commita02327413acc141a887fe77b89656e88bcc4f412 (patch)
tree198a88647bbf6a2f451657dae2ff759940cbae22
parentbb6da652c585c397fc2c98df9e7534197e1b1cb1 (diff)
downloadlinux-a02327413acc141a887fe77b89656e88bcc4f412.tar.xz
bpf: Remove inclusions of crypto/sha1.h
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>
-rw-r--r--include/linux/filter.h1
-rw-r--r--kernel/bpf/core.c1
-rw-r--r--net/ipv6/addrconf.c1
3 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 44d7ae95ddbc..e40d4071a345 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -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>
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 67eb12b637a5..1af5fb3f21d9 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -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>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 0e55f139e05d..04c1e856bf7f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -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>