All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Kiper <daniel.kiper@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Don Slutz <dslutz@verizon.com>,
	xen-devel@lists.xen.org, David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [BUGFIX] [PATCH] kexec/x86: Do map crash kernel area
Date: Thu, 2 Jan 2014 02:41:34 +0100	[thread overview]
Message-ID: <20140102014134.GA3371@olila.local.net-space.pl> (raw)
In-Reply-To: <52C454A4.1030408@citrix.com>

On Wed, Jan 01, 2014 at 05:47:16PM +0000, Andrew Cooper wrote:
> On 01/01/2014 16:51, Don Slutz wrote:

[...]

> > With this patch no panic and crash kernel works.
> >
> > Signed-off-by: Don Slutz <dslutz@verizon.com>
>
> Commit 7113a45451a9f656deeff070e47672043ed83664 was clearly not tested.
> kimage_alloc_crash_control_page() explicitly chooses a page inside the
> crash region and clears it.

I tested this patch earlier and now with latest Xen and kexec-tools commits.
I am not able to reproduce this issue on my machines. Don, could you
provide more details about your system and how did you build your
Xen and kexec-tools (configure, make options, etc.)?

Andrew, David, Did you run kexec tests in your automated test environment
with commit 7113a45451a9f656deeff070e47672043ed83664 applied? Could you
tell something about results?

> However, the sentiment of the commit is certainly desirable, to prevent
> accidental playing in the crash region.
>
> As the mappings are removed from Xen's directmap region,
> map_domain_page() doesn't work (unless the debug highmem barrier is
> sufficiently low that the crash regions ends up above it, and the
> virtual address ends up coming from the mapcache).
>
> This means that both here in clear_domain_page(), and later in
> machine_kexec_load() where the code is copied in, is vulnerable to this
> pagefault.
>
> The solution to this problem which would leave the fewest mappings would
> be to have kimage_alloc_crash_control_page() map the individual control
> page to the main Xen pagetables, at which a call to point
> map_domain_page() on it will work correctly.  This would need an
> equivalent call to destroy_xen_mappings() in kimage_free().
>
> However, it is far from neat.
>
> I defer to others as to which approach is better, but suggest that one
> way or another, the problem gets fixed very quickly, even if that means
> taking this complete reversion now and submitting a proper fix in due
> course.

I am on holiday until 06th January 2014 and I am not able to investigate
this issue deeper right now. If you feel that it is better to revert
this patch and later do second attempt to remove this mapping I do
not object.

Daniel

  reply	other threads:[~2014-01-02  1:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-01 16:51 [BUGFIX] [PATCH] kexec/x86: Do map crash kernel area Don Slutz
2014-01-01 17:47 ` Andrew Cooper
2014-01-02  1:41   ` Daniel Kiper [this message]
2014-01-02 15:04     ` Don Slutz
2014-01-02 10:46 ` David Vrabel
2014-01-02 10:48   ` Andrew Cooper
2014-01-02 11:49     ` David Vrabel
2014-01-07  0:23       ` Don Slutz
2014-01-07 12:11   ` Jan Beulich

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=20140102014134.GA3371@olila.local.net-space.pl \
    --to=daniel.kiper@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=dslutz@verizon.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.