mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Jue Wang <juew@google.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/mm: Don't try to change poison pages to uncacheable in a guest
Date: Sat, 16 May 2020 14:47:42 +0000	[thread overview]
Message-ID: <1138B55F-89DD-4ABA-98C2-61D2ED961764@intel.com> (raw)
In-Reply-To: <20200516065431.GB25771@zn.tnic>

There is only one actual machine check. But the VMM simulates a second machine check to the guest when the guest tries to access the poisoned page.

The stack trace was from Jue. I didn’t try to check it. But it looked reasonable that Linux would flush the cache for a page that is transitioning from cacheable to uncacheable.

Sent from my iPhone

> On May 15, 2020, at 23:54, Borislav Petkov <bp@alien8.de> wrote:
> 
> On Tue, May 05, 2020 at 11:46:48AM -0700, Tony Luck wrote:
>> An interesting thing happened when a guest Linux instance took
>> a machine check. The VMM unmapped the bad page from guest physical
>> space and passed the machine check to the guest.
>> 
>> Linux took all the normal actions to offline the page from the process
>> that was using it. But then guest Linux crashed because it said there
>> was a second machine check inside the kernel with this stack trace:
>> 
>> do_memory_failure
>>    set_mce_nospec
>>         set_memory_uc
>>              _set_memory_uc
>>                   change_page_attr_set_clr
>>                        cpa_flush
>>                             clflush_cache_range_opt
> 
> Maybe I don't see it but how can clflush_cache_range_opt() call
> cpa_flush() ?
> 
>> This was odd, because a CLFLUSH instruction shouldn't raise a machine
>> check (it isn't consuming the data). Further investigation showed that
>> the VMM had passed in another machine check because is appeared that the
>> guest was accessing the bad page.
> 
> This is where you lost me - if the VMM unmaps the page during the first
> MCE, how can the guest even attempt to touch it and do this stack trace
> above?
> 
> /me is confused.
> 
> -- 
> Regards/Gruss,
>    Boris.
> 
> https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2020-05-16 14:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 18:46 Tony Luck
2020-05-16  6:54 ` Borislav Petkov
2020-05-16 14:47   ` Luck, Tony [this message]
2020-05-16 15:02     ` Borislav Petkov
2020-05-17  1:52       ` Luck, Tony
     [not found]         ` <CAPcxDJ50pbuTbittyvPwKq1uUT8q8jJ+dHH8rCug8a1DDZXVYw@mail.gmail.com>
     [not found]           ` <CAPcxDJ6f3pBpwiR9nvXN_g_HBa1RAMG+aOmgfXLFT6aZ9HQn3w@mail.gmail.com>
2020-05-18 13:48             ` Borislav Petkov
2020-05-18 15:36               ` Luck, Tony
2020-05-18 16:55                 ` Borislav Petkov
2020-05-18 18:26                   ` Luck, Tony
2020-05-18 19:20                     ` Dan Williams
2020-05-19  5:22                     ` Sean Christopherson
2020-05-19  8:50                     ` Borislav Petkov
2020-05-20 16:35                       ` [PATCH v2] x86/mm: Change so poison pages are either unmapped or marked uncacheable Luck, Tony
2020-05-25 11:00                         ` [tip: ras/core] x86/{mce,mm}: " tip-bot2 for Tony Luck
2020-05-25 20:40                           ` Borislav Petkov
2020-05-26 17:37                             ` Luck, Tony
     [not found]                               ` <CAPcxDJ5arJojbY4pzOvYh=waSPd3X_JJb1_PSuzd+jQ0qbvFsA@mail.gmail.com>
     [not found]                                 ` <CAPcxDJ54EgX-SaDV=Lm+a2-43O68LhomyYfYdCDz38HGJCkh7g@mail.gmail.com>
2020-05-26 19:46                                   ` Borislav Petkov
2020-05-26 19:56                         ` [tip: ras/core] x86/{mce,mm}: Unmap the entire page if the whole page is affected and poisoned tip-bot2 for Tony Luck
2020-05-19  5:04                   ` [PATCH] x86/mm: Don't try to change poison pages to uncacheable in a guest Sean Christopherson

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=1138B55F-89DD-4ABA-98C2-61D2ED961764@intel.com \
    --to=tony.luck@intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=juew@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®