From: Dave Hansen <dave.hansen@intel.com>
To: Borislav Petkov <bp@alien8.de>, Alexandre Messier <alex@me.ssier.org>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
Andrew.Cooper3@citrix.com, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org,
regressions@lists.linux.dev
Subject: Re: [REGRESSION] Unable to unlock encrypted disk starting with kernel 5.19-rc1+
Date: Tue, 28 Jun 2022 09:52:28 -0700 [thread overview]
Message-ID: <de8d1830-9553-dd8f-8b12-308985c98b40@intel.com> (raw)
In-Reply-To: <YrrHwxtD2dpts7PF@zn.tnic>
First of all, thank you for bisecting this! I know those are a lot of work.
That XSAVEC patch modifies the AVX register save/restore code. There is
a set of x86 AES acceleration instructions called AES-NI. Those
instructions use the AVX registers. So, it's at least a plausible
connection between that patch and your symptoms. But, I don't think
anyone's been able to reproduce what you're seeing yet.
The kernel XSAVE buffer formats also differ slightly between AMD and
Intel. That *should* be OK, but it might explain why I can't reproduce
this.
If you get a chance, could you apply this (ugly hackish) patch to the
userspace 'cryptsetup' utility and run it?
https://sr71.net/~dave/intel/cryptsetup-memcmp.patch
On Ubuntu at least, it was as simple as:
apt-get source cryptsetup
apt-get build-dep cryptsetup
cd cryptsetup-1.6.6
./configure
make
Then I could run:
./src/cryptsetup benchmark --cipher=aes-xts --key-size=512
and
./src/cryptsetup benchmark --cipher=aes-xts --key-size=256
With that patch applied, you should see some output like:
# ./src/cryptsetup benchmark --cipher=aes-xts --key-size=512
# Tests are approximate using memory only (no storage IO).
memcmp12: 0
memcmp23: 0
memcmp13: 0
memcmp12: -173
memcmp23: 173
memcmp13: 0
# Algorithm | Key | Encryption | Decryption
aes-xts 512b 4592.2 MiB/s 4192.0 MiB/s
The "memcmp13:" lines should both be 0. That means that an encryption
and decryption cycle didn't change the data. You *might* have to run
this in a loop if there's some kind of bad timing involved in triggering
the bug.
If you see a "memcmp13:" with something other than 0, that will narrow
things down and means we'll have a pretty quick reproducer that doesn't
involve luks which should speed things along.
next prev parent reply other threads:[~2022-06-28 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 5:13 Alexandre Messier
2022-06-28 9:20 ` Borislav Petkov
2022-06-28 16:52 ` Dave Hansen [this message]
2022-06-28 21:31 ` Alexandre Messier
2022-06-28 22:59 ` Thomas Gleixner
2022-06-28 23:24 ` Alexandre Messier
2022-06-29 15:24 ` Dave Hansen
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=de8d1830-9553-dd8f-8b12-308985c98b40@intel.com \
--to=dave.hansen@intel.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=alex@me.ssier.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=regressions@lists.linux.dev \
--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
all inboxes | Powered by JetHome®