git: 73a9b273d3d3 - main - sys: move sys/kern/md[45].c to sys/crypto
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Oct 2025 10:18:47 UTC
The branch main has been updated by fuz:
URL: https://cgit.FreeBSD.org/src/commit/?id=73a9b273d3d315716304c2cc237fef3141a93f2a
commit 73a9b273d3d315716304c2cc237fef3141a93f2a
Author: Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-10-04 21:40:33 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-10-24 10:16:46 +0000
sys: move sys/kern/md[45].c to sys/crypto
Both files are used by kernel and userspace.
Move them to sys/crypto where they belong.
No functional changes intended.
In preparation of D45670.
Reviewed by: markj
Approved by: markj (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D52909
---
lib/libmd/Makefile | 2 +-
stand/libsa/Makefile | 3 +--
sys/conf/files | 4 ++--
sys/{kern => crypto}/md4c.c | 0
sys/{kern => crypto}/md5c.c | 0
sys/modules/smbfs/Makefile | 4 ++--
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile
index 547a134fc440..59a519a882af 100644
--- a/lib/libmd/Makefile
+++ b/lib/libmd/Makefile
@@ -108,7 +108,7 @@ CFLAGS+= -DWEAK_REFS
CFLAGS.skein_block.c+= -DSKEIN_LOOP=995
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2
.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
-.PATH: ${SRCTOP}/sys/kern
+.PATH: ${SRCTOP}/sys/crypto
USE_ASM_SOURCES?=1
.if defined(BOOTSTRAPPING) || ${MK_MACHDEP_OPTIMIZATIONS} == no
diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index f5a1acea843e..c1e03c7a5789 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -189,8 +189,7 @@ SRCS+= g_eli_hmac.c pkcs5v2.c
.PATH: ${SYSDIR}/crypto/sha2
SRCS+= sha256c.c sha512c.c
-# md5 from the kernel
-.PATH: ${SYSDIR}/kern
+.PATH: ${SYSDIR}/crypto
SRCS+= md5c.c
.if ${DO32:U0} == 0
diff --git a/sys/conf/files b/sys/conf/files
index d9730e6bf55b..c17451324324 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -681,6 +681,8 @@ crypto/curve25519.c optional crypto \
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium"
crypto/des/des_ecb.c optional netsmb
crypto/des/des_setkey.c optional netsmb
+crypto/md4c.c optional netsmb
+crypto/md5c.c standard
crypto/openssl/ossl.c optional ossl
crypto/openssl/ossl_aes.c optional ossl
crypto/openssl/ossl_chacha20.c optional ossl
@@ -3896,8 +3898,6 @@ kern/kern_vnodedumper.c standard
kern/kern_xxx.c standard
kern/link_elf.c standard
kern/linker_if.m standard
-kern/md4c.c optional netsmb
-kern/md5c.c standard
kern/p1003_1b.c standard
kern/posix4_mib.c standard
kern/sched_4bsd.c optional sched_4bsd
diff --git a/sys/kern/md4c.c b/sys/crypto/md4c.c
similarity index 100%
rename from sys/kern/md4c.c
rename to sys/crypto/md4c.c
diff --git a/sys/kern/md5c.c b/sys/crypto/md5c.c
similarity index 100%
rename from sys/kern/md5c.c
rename to sys/crypto/md5c.c
diff --git a/sys/modules/smbfs/Makefile b/sys/modules/smbfs/Makefile
index c796fb0701c5..5ef13757e621 100644
--- a/sys/modules/smbfs/Makefile
+++ b/sys/modules/smbfs/Makefile
@@ -1,6 +1,6 @@
-.PATH: ${SRCTOP}/sys/crypto/des \
+.PATH: ${SRCTOP}/sys/crypto \
+ ${SRCTOP}/sys/crypto/des \
${SRCTOP}/sys/crypto/des/arch/${MACHINE_CPUARCH} \
- ${SRCTOP}/sys/kern \
${SRCTOP}/sys/libkern \
${SRCTOP}/sys/netsmb \
${SRCTOP}/sys/fs/smbfs