Skip to content

Commit 96e890f

Browse files
MingcongBaiFearyncess
authored andcommitted
AOSCOS: crypto: padlock-sha: return -ENODEV on Zhaoxin KaiXian KX-6000/6000G
On Zhaoxin KaiXian KX-6000/6000G series of processors, this crypto module causes a null pointer dereference. Zhaoxin submitted upstream an implementation update but does not specify a fix. Per our testing, blacklisting this module causes the null pointer dereference to go away. Block x86 Family 7 Model 59 for now. Link: https://lore.kernel.org/all/20250114121301.156359-1-TonyWWang-oc%40zhaoxin.com/ */ Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
1 parent c531bac commit 96e890f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

drivers/crypto/padlock-sha.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,17 @@ static int __init padlock_init(void)
329329
struct shash_alg *sha1;
330330
struct shash_alg *sha256;
331331

332-
if (!x86_match_cpu(padlock_sha_ids) || !boot_cpu_has(X86_FEATURE_PHE_EN))
332+
/* On Zhaoxin KaiXian KX-6000/6000G series of processors, this crypto
333+
* module causes a null pointer dereference.
334+
*
335+
* Zhaoxin submitted upstream an implementation update but does not
336+
* specify a fix. Per our testing, blacklisting this module causes the
337+
* null pointer dereference to go away.
338+
*
339+
* Link: https://lore.kernel.org/all/20250114121301.156359-1-TonyWWang-oc%40zhaoxin.com/ */
340+
if (!x86_match_cpu(padlock_sha_ids) ||
341+
!boot_cpu_has(X86_FEATURE_PHE_EN) ||
342+
(c->x86 == 7 && c->x86_model == 59))
333343
return -ENODEV;
334344

335345
/* Register the newly added algorithm module if on *

0 commit comments

Comments
 (0)