From: Nathan Huckleberry <nhuck@google.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Nathan Huckleberry <nhuck@google.com>,
Bruno Goncalves <bgoncalv@redhat.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Eric Biggers <ebiggers@google.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] crypto: x86/polyval - Fix crashes when keys are not 16-byte aligned
Date: Mon, 17 Oct 2022 15:26:20 -0700 [thread overview]
Message-ID: <20221017222620.715153-1-nhuck@google.com> (raw)
The key_powers array is not guaranteed to be 16-byte aligned, so using
movaps to operate on key_powers is not allowed.
Switch movaps to movups.
Fixes: 34f7f6c30112 ("crypto: x86/polyval - Add PCLMULQDQ accelerated implementation of POLYVAL")
Reported-by: Bruno Goncalves <bgoncalv@redhat.com>
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
arch/x86/crypto/polyval-clmulni_asm.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/crypto/polyval-clmulni_asm.S b/arch/x86/crypto/polyval-clmulni_asm.S
index a6ebe4e7dd2b..32b98cb53ddf 100644
--- a/arch/x86/crypto/polyval-clmulni_asm.S
+++ b/arch/x86/crypto/polyval-clmulni_asm.S
@@ -234,7 +234,7 @@
movups (MSG), %xmm0
pxor SUM, %xmm0
- movaps (KEY_POWERS), %xmm1
+ movups (KEY_POWERS), %xmm1
schoolbook1_noload
dec BLOCKS_LEFT
addq $16, MSG
--
2.38.0.413.g74048e4d9e-goog
next reply other threads:[~2022-10-17 22:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 22:26 Nathan Huckleberry [this message]
2022-10-17 23:02 ` [PATCH] crypto: x86/polyval - Fix crashes when keys are not 16-byte aligned Eric Biggers
2022-10-17 23:38 ` Nathan Huckleberry
2022-10-18 0:12 ` Eric Biggers
2022-10-18 4:03 ` Herbert Xu
2022-10-18 21:56 ` [PATCH v2] " Nathan Huckleberry
2022-10-18 22:39 ` Eric Biggers
2022-10-18 23:04 ` [PATCH v3] " Nathan Huckleberry
2022-10-18 23:12 ` Eric Biggers
2022-10-19 12:13 ` Bruno Goncalves
2022-10-21 11:39 ` 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=20221017222620.715153-1-nhuck@google.com \
--to=nhuck@google.com \
--cc=ardb@kernel.org \
--cc=bgoncalv@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=ebiggers@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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