From: Paolo Bonzini <pbonzini@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
"Jörg Rödel" <joro@8bytes.org>
Subject: Re: [PATCH] kvm: x86: move tracepoints outside extended quiescent state
Date: Fri, 11 Dec 2015 11:41:30 +0100 [thread overview]
Message-ID: <566AA85A.9000507@redhat.com> (raw)
In-Reply-To: <20151211102244.GA3660@pd.tnic>
On 11/12/2015 11:22, Borislav Petkov wrote:
> On Thu, Dec 10, 2015 at 07:15:19PM +0100, Paolo Bonzini wrote:
>> Yeah, wait_lapic_expire also have to be moved before __kvm_guest_enter.
>
> Yeah, v2 doesn't splat on the Intel box anymore but the AMD box still
> has, and it is a different problem. With the v2 applied, it still
> explodes, see below.
Yes, I didn't expect it to fix anything. I just wanted to pinpoint it
to kvm-amd.
> And I'm willing to bet good money on that shadow pages fun.
You can disable it (well, make it take a few days to appear) with this:
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 484079efea5b..a9070e260c72 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -496,7 +496,7 @@ static struct kvm_memslots *kvm_alloc_memslots(void)
* Init kvm generation close to the maximum to easily test the
* code of handling generation number wrap-around.
*/
- slots->generation = -150;
+ slots->generation = 0;
for (i = 0; i < KVM_MEM_SLOTS_NUM; i++)
slots->id_to_index[i] = slots->memslots[i].id = i;
but it would not be AMD-specific.
Anyway if this theory is true:
> [ 959.466549] kernel tried to execute NX-protected page - exploit attempt? (uid: 1000)
>
> line basically says that we're pagefaulting when trying to fetch
> instructions, i.e., we're trying to execute something from a page, rIP
> points to 0xffff8800b9f9bdf0 and that is most likely a page belonging to
> kvm, which, however, is for some reason not executable (anymore?).
It would be a kvm hypervisor page, not a kvm guest page, hence unrelated
to the zapping thing.
Can you grab the kallsyms before making it crash? I will get to it next
week.
Paolo
next prev parent reply other threads:[~2015-12-11 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 17:38 [PATCH] kvm: x86: move tracepoints outside extended quiescent state Paolo Bonzini
2015-12-10 18:09 ` Borislav Petkov
2015-12-10 18:15 ` Paolo Bonzini
2015-12-11 10:22 ` Borislav Petkov
2015-12-11 10:41 ` Paolo Bonzini [this message]
[not found] ` <20151211114112.GA3704@pd.tnic>
2015-12-11 12:15 ` Paolo Bonzini
2015-12-11 13:02 ` Borislav Petkov
2015-12-11 12:20 ` Borislav Petkov
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=566AA85A.9000507@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).