From: Ard Biesheuvel <ardb@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: herbert@gondor.apana.org.au, geert@linux-m68k.org,
Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH] crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd
Date: Mon, 30 Nov 2020 13:26:20 +0100 [thread overview]
Message-ID: <20201130122620.16640-1-ardb@kernel.org> (raw)
Geert reports that builds where CONFIG_CRYPTO_AEGIS128_SIMD is not set
may still emit references to crypto_aegis128_update_simd(), which
cannot be satisfied and therefore break the build. These references
only exist in functions that can be optimized away, but apparently,
the compiler is not always able to prove this.
So add some explicit checks for CONFIG_CRYPTO_AEGIS128_SIMD to help the
compiler figure this out.
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
crypto/aegis128-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/aegis128-core.c b/crypto/aegis128-core.c
index 2b05f79475d3..89dc1c559689 100644
--- a/crypto/aegis128-core.c
+++ b/crypto/aegis128-core.c
@@ -89,7 +89,7 @@ static void crypto_aegis128_update_a(struct aegis_state *state,
const union aegis_block *msg,
bool do_simd)
{
- if (do_simd) {
+ if (IS_ENABLED(CONFIG_CRYPTO_AEGIS128_SIMD) && do_simd) {
crypto_aegis128_update_simd(state, msg);
return;
}
@@ -101,7 +101,7 @@ static void crypto_aegis128_update_a(struct aegis_state *state,
static void crypto_aegis128_update_u(struct aegis_state *state, const void *msg,
bool do_simd)
{
- if (do_simd) {
+ if (IS_ENABLED(CONFIG_CRYPTO_AEGIS128_SIMD) && do_simd) {
crypto_aegis128_update_simd(state, msg);
return;
}
--
2.17.1
next reply other threads:[~2020-11-30 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 12:26 Ard Biesheuvel [this message]
2020-11-30 12:42 ` [PATCH] crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd Geert Uytterhoeven
2020-11-30 12:47 ` Ard Biesheuvel
2020-11-30 13:09 ` Geert Uytterhoeven
2020-12-04 7:17 ` Herbert Xu
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=20201130122620.16640-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=geert@linux-m68k.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.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