Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/crypto: ensure generated *.S files are removed on make clean

make clean does not check the kernel config when removing files. As
such, additions to clean-files under CONFIG_ARM or CONFIG_ARM64 are not
evaluated. For example, when building on arm64, this means that
lib/crypto/arm64/sha{256,512}-core.S are left over after make clean.

Set clean-files unconditionally to ensure that make clean removes these
files.

Fixes: e96cb9507f2d ("lib/crypto: sha256: Consolidate into single module")
Fixes: 24c91b62ac50 ("lib/crypto: arm/sha512: Migrate optimized SHA-512 code to library")
Fixes: 60e3f1e9b7a5 ("lib/crypto: arm64/sha512: Migrate optimized SHA-512 code to library")
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Link: https://lore.kernel.org/r/20250814-crypto_clean-v2-1-659a2dc86302@columbia.edu
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

authored by

Tal Zussman and committed by
Eric Biggers
fd7e5de4 d73915fd

+4 -4
+4 -4
lib/crypto/Makefile
··· 100 100 libsha256-y += arm/sha256-ce.o arm/sha256-core.o 101 101 $(obj)/arm/sha256-core.S: $(src)/arm/sha256-armv4.pl 102 102 $(call cmd,perlasm) 103 - clean-files += arm/sha256-core.S 104 103 AFLAGS_arm/sha256-core.o += $(aflags-thumb2-y) 105 104 endif 106 105 ··· 107 108 libsha256-y += arm64/sha256-core.o 108 109 $(obj)/arm64/sha256-core.S: $(src)/arm64/sha2-armv8.pl 109 110 $(call cmd,perlasm_with_args) 110 - clean-files += arm64/sha256-core.S 111 111 libsha256-$(CONFIG_KERNEL_MODE_NEON) += arm64/sha256-ce.o 112 112 endif 113 113 ··· 130 132 libsha512-y += arm/sha512-core.o 131 133 $(obj)/arm/sha512-core.S: $(src)/arm/sha512-armv4.pl 132 134 $(call cmd,perlasm) 133 - clean-files += arm/sha512-core.S 134 135 AFLAGS_arm/sha512-core.o += $(aflags-thumb2-y) 135 136 endif 136 137 ··· 137 140 libsha512-y += arm64/sha512-core.o 138 141 $(obj)/arm64/sha512-core.S: $(src)/arm64/sha2-armv8.pl 139 142 $(call cmd,perlasm_with_args) 140 - clean-files += arm64/sha512-core.S 141 143 libsha512-$(CONFIG_KERNEL_MODE_NEON) += arm64/sha512-ce-core.o 142 144 endif 143 145 ··· 163 167 obj-$(CONFIG_RISCV) += riscv/ 164 168 obj-$(CONFIG_S390) += s390/ 165 169 obj-$(CONFIG_X86) += x86/ 170 + 171 + # clean-files must be defined unconditionally 172 + clean-files += arm/sha256-core.S arm/sha512-core.S 173 + clean-files += arm64/sha256-core.S arm64/sha512-core.S