Thread (19 messages) 19 messages, 1 author, 2025-06-25
STALE355d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 05/18] lib/crypto: sha512: Do not include <crypto/internal/sha2.h>

From: Eric Biggers <ebiggers@kernel.org>
Date: 2025-06-25 07:10:29
Also in: linux-arm-kernel, linux-crypto, linux-mips, linux-riscv, linux-s390, lkml, sparclinux
Subsystem: crypto library, library code, the rest · Maintainers: Eric Biggers, Jason A. Donenfeld, Ard Biesheuvel, Andrew Morton, Linus Torvalds

Since the SHA-512 code is now consolidated into a single translation
unit except for assembly code, there is no longer any need for an
internal header.  Indeed, lib/crypto/sha512.c relies on
<crypto/internal/sha2.h> only for indirect inclusions.  Stop including
it.  This prepares for the later removal of this header, once the
SHA-256 code is reorganized similarly and stops needing it too.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 lib/crypto/sha512.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/crypto/sha512.c b/lib/crypto/sha512.c
index fe9d98b9b7db9..f5a9569a7ef96 100644
--- a/lib/crypto/sha512.c
+++ b/lib/crypto/sha512.c
@@ -7,15 +7,16 @@
  * Copyright (c) 2003 Kyle McMartin <kyle@debian.org>
  * Copyright 2025 Google LLC
  */
 
 #include <crypto/hmac.h>
-#include <crypto/internal/sha2.h>
+#include <crypto/sha2.h>
 #include <linux/export.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/overflow.h>
+#include <linux/unaligned.h>
 #include <linux/wordpart.h>
 
 static const struct sha512_block_state sha384_iv = {
 	.h = {
 		SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
-- 
2.50.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help