Skip to contentSkip to conversation

bpf: Remove inclusion of crypto/sha1.h

PATCH Superseded Eric Biggers 1 participant 2 messages Mar 14

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: Remove inclusion of crypto/sha1.h

Since commit 603b44162325 ("bpf: Update the bpf_prog_calc_tag to use SHA256") made kernel/bpf/core.c use only SHA-256 and not SHA-1, the header <crypto/sha1.h> no longer needs to be included. Remove the inclusion so that it no longer unnecessarily comes up in searches for which kernel code is still using the obsolete SHA-1 algorithm.

---
 kernel/bpf/core.c | 1 -
 1 file changed, 1 deletion(-)
kernel/bpf/core.c +0 -1
index 3ece2da55625c..f11ab6f354e2e 100644
@@ -16,11 +16,10 @@
  * Andi Kleen - Fix a few bad bugs and races.
  * Kris Katterjohn - Added many additional checks in bpf_check_classic()
  */
 
 #include <uapi/linux/btf.h>
-#include <crypto/sha1.h>
 #include <linux/filter.h>
 #include <linux/skbuff.h>
 #include <linux/vmalloc.h>
 #include <linux/prandom.h>
 #include <linux/bpf.h>

base-commit: 1c9982b4961334c1edb0745a04cabd34bc2de675

Signature · 1 line
2.53.0
#1 lore raw
Quoted 10 lines · Eric Biggers

Since commit 603b44162325 ("bpf: Update the bpf_prog_calc_tag to use SHA256") made kernel/bpf/core.c use only SHA-256 and not SHA-1, the header <crypto/sha1.h> no longer needs to be included. Remove the inclusion so that it no longer unnecessarily comes up in searches for which kernel code is still using the obsolete SHA-1 algorithm.

---
 kernel/bpf/core.c | 1 -
 1 file changed, 1 deletion(-)

I missed include/linux/filter.h which is related. I'll send a v2.

- Eric