From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] crypto/arm64: sm4 - Drop cpu feature table for PMULL
Date: Mon, 9 Nov 2026 17:10:52 +0100 [thread overview]
Message-ID: <20261109161052.890682-2-u.kleine-koenig@baylibre.com> (raw)
The result of having that table is that the sm4-ce-gcm module is
autoloaded if the CPU supports the PMULL cpu feature. However that
module is only usefull if there are both SM4 and PMULL. The module is
already auto-loaded if the CPU has SM4 and calls sm4_ce_gcm_init() then
which fails without PMULL.
So dropping the PMULL cpu feature table has the only affect that on
machines with PMULL but without SM4 the useless module isn't loaded any
more.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,
PSA: I don't know what these cpu features are and what the sm4-ce-gcm
module does. I just stumbled over that MODULE_DEVICE_TABLE(cpu, ...) and
convinced myself by looking at the code about the above analysis. It
wouldn't be a big surprise to me if I missed something relevant. So
please apply some distrust before the patch.
Best regards
Uwe
arch/arm64/crypto/sm4-ce-gcm-glue.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/arm64/crypto/sm4-ce-gcm-glue.c b/arch/arm64/crypto/sm4-ce-gcm-glue.c
index ef06f4f768a1..ffed81b40220 100644
--- a/arch/arm64/crypto/sm4-ce-gcm-glue.c
+++ b/arch/arm64/crypto/sm4-ce-gcm-glue.c
@@ -247,12 +247,6 @@ static void __exit sm4_ce_gcm_exit(void)
crypto_unregister_aead(&sm4_gcm_alg);
}
-static const struct cpu_feature __maybe_unused sm4_ce_gcm_cpu_feature[] = {
- { cpu_feature(PMULL) },
- {}
-};
-MODULE_DEVICE_TABLE(cpu, sm4_ce_gcm_cpu_feature);
-
module_cpu_feature_match(SM4, sm4_ce_gcm_init);
module_exit(sm4_ce_gcm_exit);
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.56.0.rc1
next reply other threads:[~2026-11-09 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 16:10 Uwe Kleine-König [this message]
2026-11-10 21:08 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261109161052.890682-2-u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=catalin.marinas@arm.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®