From: Brendan Jackman <jackmanb@google.com>
To: Shuah Khan <shuah@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>
Cc: Alexandra Sandulescu <aesa@google.com>,
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, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Brendan Jackman <jackmanb@google.com>
Subject: [PATCH 0/2] KVM: x86: selftests: add L1TF exploit test
Date: Mon, 13 Oct 2025 15:13:53 +0000 [thread overview]
Message-ID: <20251013-l1tf-test-v1-0-583fb664836d@google.com> (raw)
This has been tested on a Google Skylake platform.
One potential issue with this test is that it fails (that is, the
exploit succeeds) when using the conditional L1D flush, because the
gadget is injected into the hypercall path which doesn't appear to
include a flush. If this is unacceptable, we should discuss how to amend
the test so that it can be used to evaluate the conditional flush logic
as well. This would basically mean simulating some more complicated
gadget where the "attacker" has found another way to steer the host
kernel towards the target data, instead of just a simple hypercall.
The reason this limitation is tolerable to me is my ulterior motive,
i.e. because I am specifically interested in an end-to-end test for
Address Space Isolation [0], which is abstracted from these details of the
exploit.
Based on kvm/next.
[0] https://lore.kernel.org/all/20250924-b4-asi-page-alloc-v1-0-2d861768041f@google.com/T/#t
Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
Alexandra Sandulescu (1):
KVM: x86: selftests: add an L1TF exploit test
Brendan Jackman (1):
selftests: fix installing nested TEST_GEN_MODS_DIR
tools/testing/selftests/kvm/Makefile.kvm | 7 +
tools/testing/selftests/kvm/x86/l1tf_test.c | 633 +++++++++++++++++++++
tools/testing/selftests/kvm/x86/l1tf_test.sh | 10 +
.../selftests/kvm/x86/test_modules/Makefile | 10 +
.../kvm/x86/test_modules/l1tf_test_helper.c | 92 +++
tools/testing/selftests/lib.mk | 2 +-
6 files changed, 753 insertions(+), 1 deletion(-)
---
base-commit: 6b36119b94d0b2bb8cea9d512017efafd461d6ac
change-id: 20251013-l1tf-test-1bee540cefb4
Best regards,
--
Brendan Jackman <jackmanb@google.com>
next reply other threads:[~2025-10-13 15:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 15:13 Brendan Jackman [this message]
2025-10-13 15:13 ` [PATCH 1/2] selftests: fix installing nested TEST_GEN_MODS_DIR Brendan Jackman
2025-10-13 15:13 ` [PATCH 2/2] KVM: x86: selftests: add an L1TF exploit test Brendan Jackman
2025-10-13 15:36 ` Brendan Jackman
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=20251013-l1tf-test-v1-0-583fb664836d@google.com \
--to=jackmanb@google.com \
--cc=aesa@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--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®