Re: [PATCH v4 1/2] crypto: padlock-sha - Disable for Zhaoxin processor
From: Eric Biggers
Date: Sat Mar 14 2026 - 14:40:34 EST
On Fri, Mar 13, 2026 at 04:01:49PM +0800, AlanSong-oc wrote:
> For Zhaoxin processors, the XSHA1 instruction requires the total memory
> allocated at %rdi register must be 32 bytes, while the XSHA1 and
> XSHA256 instruction doesn't perform any operation when %ecx is zero.
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-fixes
I made a few tweaks to your commit message, as noted below:
> ------------[ cut here ]------------
>
> alg: shash: sha256-padlock-nano test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
> alg: self-tests for sha256 using sha256-padlock-nano failed (rc=-22)
> ------------[ cut here ]------------
Removed the "cut here" lines because they caused checkpatch errors
> Disable the padlock-sha driver on Zhaoxin processors with the CPU family
> 0x07 and newer. Following the suggestion in [3], add support for the PHE
> extensions to lib/crypto. Only XSHA256 support for SHA-256 is included,
> since SHA-1 has been cryptographically broken, as recommended in [4].
Changed to clarify that the lib/crypto/ support is in a different patch:
Disable the padlock-sha driver on Zhaoxin processors with the CPU
family 0x07 and newer. Following the suggestion in [3], support for
PHE will be added to lib/crypto/ instead.
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103397
Changed to correct link https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113996
- Eric