Skip to contentSkip to conversation

linux-image-amd64: self-tests for sha256 using sha256-padlock-nano failed.

PATCH In review larryw3i 4 participants 12 messages Nov 16, 2025 – Jan 6 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

larryw3i

author
#1 lore raw
Quoted 9 lines · On Sun, 16 Nov 2025 23:11:17 +0800 larryw3i <[email protected]> wrote:

Doesn't anyone care about this bug? The kernel version is now "6.17.7+deb14+1-amd64", yet this bug remains unfixed! The KX-6000G, KX-U6780A, and KX-6640MA all exhibit this bug. Hey! Friends from zhaoxin, what's the matter with you? 😅

Regards,

larryw3i

#2 lore raw

PATCH 1/1 crypto: padlock-sha - Disable broken driver

This driver is known broken, as it computes the wrong SHA-1 and SHA-256 hashes. Correctness needs to be the first priority for cryptographic code. Just disable it, allowing the standard (and actually correct) SHA-1 and SHA-256 implementations to take priority.

---

This patch is targeting crypto/master

 drivers/crypto/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/Kconfig +1 -1
index a6688d54984c..16ea3e741350 100644
@@ -38,11 +38,11 @@ config CRYPTO_DEV_PADLOCK_AES
 	  If unsure say M. The compiled module will be
 	  called padlock-aes.
 
 config CRYPTO_DEV_PADLOCK_SHA
 	tristate "PadLock driver for SHA1 and SHA256 algorithms"
-	depends on CRYPTO_DEV_PADLOCK
+	depends on CRYPTO_DEV_PADLOCK && BROKEN
 	select CRYPTO_HASH
 	select CRYPTO_SHA1
 	select CRYPTO_SHA256
 	help
 	  Use VIA PadLock for SHA1/SHA256 algorithms.

base-commit: 59b0afd01b2ce353ab422ea9c8375b03db313a21

Signature · 1 line
2.51.2
#3 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 5 lines · Eric Biggers

This driver is known broken, as it computes the wrong SHA-1 and SHA-256 hashes. Correctness needs to be the first priority for cryptographic code. Just disable it, allowing the standard (and actually correct) SHA-1 and SHA-256 implementations to take priority.

Following Herbert Xu's suggestion(https://lore.kernel.org/linux-crypto/[email protected]/), we have prepared a new version of the patch to address this issue. Since the code needs to remain compatible with older platforms, we are still conducting extensive testing. Once the testing is complete, I will submit the finalized patch immediately.

Best Regards
AlanSong-oc

author
#4 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 1 line · AlanSong-oc

I will submit the finalized patch immediately.

Dear AlanSong-oc,

I also want to nag a few more words. I think after a period of time, most of your machines without external graphics cards may not be able to install Debian properly (I don't know if KX-7000 is the same). It seems that GNOME 49 no longer uses X11 by default but Wayland. However, as far as I know, Wayland requires a graphics card driver to work. I have over ten laptops with your CPUs built-in here. The operating system I installed is Debian testing, but now GNOME is not working and I have to use XFCE4.  😭

Regards,

larryw3i

#5 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 4 lines · On 11/17/2025 6:08 PM, larryw3i wrote:
Quoted 1 line · AlanSong-oc

I will submit the finalized patch immediately.

Dear AlanSong-oc,

Quoted 8 lines

I also want to nag a few more words. I think after a period of time, most of your machines without external graphics cards may not be able to install Debian properly (I don't know if KX-7000 is the same). It seems that GNOME 49 no longer uses X11 by default but Wayland. However, as far as I know, Wayland requires a graphics card driver to work. I have over ten laptops with your CPUs built-in here. The operating system I installed is Debian testing, but now GNOME is not working and I have to use XFCE4. 😭

Thank you for reporting the issue on the Zhaoxin platform. However, I would suggest not discussing the unrelated display problem in this patch email. Regarding the display issue you encountered, as far as I know, using Wayland for display does not require a dedicated graphics driver. Wayland can operate using the generic SimpleDRM driver. However, I have not checked whether SimpleDRM is enabled or available in Debian. If you need the proper graphics driver for the Zhaoxin platform, I recommend contacting the OEM or Zhaoxin customer support.

Best Regards
AlanSong-oc

author
#6 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Thank you! AlanSong-oc,

I just noticed SimpleDRM, I'll try it.

Regards,

larryw3i

Quoted 1 line · AlanSong-oc

generic SimpleDRM driver

maintainer
#7 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

In reply to Eric Biggers
Quoted 4 lines · Eric Biggers

This driver is known broken, as it computes the wrong SHA-1 and SHA-256 hashes. Correctness needs to be the first priority for cryptographic code. Just disable it, allowing the standard (and actually correct) SHA-1 and SHA-256 implementations to take priority.

...

drivers/crypto/Kconfig config CRYPTO_DEV_PADLOCK_AES · line 43

Quoted 12 lines
drivers/crypto/Kconfig +1 -1
index a6688d54984c..16ea3e741350 100644
@@ -38,11 +38,11 @@ config CRYPTO_DEV_PADLOCK_AES
 	  If unsure say M. The compiled module will be
 	  called padlock-aes.
 
 config CRYPTO_DEV_PADLOCK_SHA
 	tristate "PadLock driver for SHA1 and SHA256 algorithms"
-	depends on CRYPTO_DEV_PADLOCK
+	depends on CRYPTO_DEV_PADLOCK && BROKEN

It's only broken on ZHAOXIN, so this should be conditional on CPU_SUP_ZHAOXIN.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#8 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 16 lines · Herbert Xu
Quoted 4 lines · Eric Biggers

This driver is known broken, as it computes the wrong SHA-1 and SHA-256 hashes. Correctness needs to be the first priority for cryptographic code. Just disable it, allowing the standard (and actually correct) SHA-1 and SHA-256 implementations to take priority.

...

Quoted 8 lines
drivers/crypto/Kconfig +0 -0
index a6688d54984c..16ea3e741350 100644
@@ -38,11 +38,11 @@ config CRYPTO_DEV_PADLOCK_AES
 	  If unsure say M. The compiled module will be
 	  called padlock-aes.
 
Quoted 8 lines

drivers/crypto/Kconfig config CRYPTO_DEV_PADLOCK_AES · line 43

Quoted 4 lines
drivers/crypto/Kconfig +1 -1
 config CRYPTO_DEV_PADLOCK_SHA
 	tristate "PadLock driver for SHA1 and SHA256 algorithms"
-	depends on CRYPTO_DEV_PADLOCK
+	depends on CRYPTO_DEV_PADLOCK && BROKEN

It's only broken on ZHAOXIN, so this should be conditional on CPU_SUP_ZHAOXIN.

I.e., it's apparently broken on at least every CPU that has this hardware that's been released in the last 14 years. How confident are you that it still works on VIA CPUs from 2011 and earlier and is worth maintaining for them?

- Eric

#9 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 26 lines · Eric Biggers
Quoted 16 lines · Herbert Xu
Quoted 4 lines · Eric Biggers

This driver is known broken, as it computes the wrong SHA-1 and SHA-256 hashes. Correctness needs to be the first priority for cryptographic code. Just disable it, allowing the standard (and actually correct) SHA-1 and SHA-256 implementations to take priority.

...

Quoted 8 lines
drivers/crypto/Kconfig +0 -0
index a6688d54984c..16ea3e741350 100644
@@ -38,11 +38,11 @@ config CRYPTO_DEV_PADLOCK_AES
      If unsure say M. The compiled module will be
      called padlock-aes.
 
Quoted 8 lines

drivers/crypto/Kconfig config CRYPTO_DEV_PADLOCK_AES · line 43

Quoted 4 lines
drivers/crypto/Kconfig +1 -1
 config CRYPTO_DEV_PADLOCK_SHA
    tristate "PadLock driver for SHA1 and SHA256 algorithms"
-   depends on CRYPTO_DEV_PADLOCK
+   depends on CRYPTO_DEV_PADLOCK && BROKEN

It's only broken on ZHAOXIN, so this should be conditional on CPU_SUP_ZHAOXIN.

Quoted 4 lines

I.e., it's apparently broken on at least every CPU that has this hardware that's been released in the last 14 years. How confident are you that it still works on VIA CPUs from 2011 and earlier and is worth maintaining for them?

Given the lack of a verification platform for the current padlock-sha driver, and the fact that these CPUs are rarely used today, extending the existing padlock-sha driver to support the ZHAOXIN platform is very difficult. To address the issues encountered when using the padlock-sha driver on the ZHAOXIN platform, would it be acceptable to submit a completely new driver that aligns with the previous advice?

Best Regards
AlanSong-oc

maintainer
#10 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 7 lines · AlanSong-oc

Given the lack of a verification platform for the current padlock-sha driver, and the fact that these CPUs are rarely used today, extending the existing padlock-sha driver to support the ZHAOXIN platform is very difficult. To address the issues encountered when using the padlock-sha driver on the ZHAOXIN platform, would it be acceptable to submit a completely new driver that aligns with the previous advice?

Perhaps it would be easier if you just added Zhaoxin support to lib/crypto instead?

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#11 lore raw

Re: [PATCH] crypto: padlock-sha - Disable broken driver

Quoted 11 lines · Herbert Xu
Quoted 7 lines · AlanSong-oc

Given the lack of a verification platform for the current padlock-sha driver, and the fact that these CPUs are rarely used today, extending the existing padlock-sha driver to support the ZHAOXIN platform is very difficult. To address the issues encountered when using the padlock-sha driver on the ZHAOXIN platform, would it be acceptable to submit a completely new driver that aligns with the previous advice?

Perhaps it would be easier if you just added Zhaoxin support to lib/crypto instead?

Sincere thanks for your helpful suggestion. I will add ZHAOXIN platform support to lib/crypto.

Best Regards
AlanSong-oc