From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH 1/3] x86: tighten page table owner checking in do_mmu_update()
Date: Thu, 20 Nov 2014 10:29:46 +0000 [thread overview]
Message-ID: <546DC29A.4070301@citrix.com> (raw)
In-Reply-To: <546DCC7202000078000493F0@smtp.nue.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1370 bytes --]
On 20/11/14 10:11, Jan Beulich wrote:
> MMU_MACHPHYS_UPDATE, not manipulating page tables, shouldn't ignore
> a bad page table domain being specified.
>
> Also pt_owner can't be NULL when reaching the "out" label, so the
> respective check can be dropped.
Yes it can.
Failing
if ( (pg_owner = get_pg_owner((uint16_t)foreigndom)) == NULL )
{
rc = -ESRCH;
goto out;
}
around line 3462 will cause pt_owner to be NULL at the out label.
~Andrew
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Acked-by: Tim Deegan <tim@xen.org>
>
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -3618,6 +3618,11 @@ long do_mmu_update(
> break;
>
> case MMU_MACHPHYS_UPDATE:
> + if ( unlikely(d != pt_owner) )
> + {
> + rc = -EPERM;
> + break;
> + }
>
> mfn = req.ptr >> PAGE_SHIFT;
> gpfn = req.val;
> @@ -3694,7 +3699,7 @@ long do_mmu_update(
> perfc_add(num_page_updates, i);
>
> out:
> - if ( pt_owner && (pt_owner != d) )
> + if ( pt_owner != d )
> rcu_unlock_domain(pt_owner);
>
> /* Add incremental work we have done to the @done output parameter. */
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2401 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-11-20 10:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 10:04 [PATCH 0/3] x86: XSA-109/110 follow-up (to be considered for 4.5) Jan Beulich
2014-11-20 10:11 ` [PATCH 1/3] x86: tighten page table owner checking in do_mmu_update() Jan Beulich
2014-11-20 10:29 ` Andrew Cooper [this message]
2014-11-20 10:33 ` Andrew Cooper
2014-11-20 10:12 ` [PATCH 2/3] x86: don't ignore foreigndom input on various MMUEXT ops Jan Beulich
2014-11-20 10:51 ` Tim Deegan
2014-11-24 12:43 ` George Dunlap
2014-11-24 12:50 ` Jan Beulich
2014-11-20 10:13 ` [PATCH 3/3] x86/HVM: don't crash guest upon problems occurring in user mode Jan Beulich
2014-11-20 11:06 ` Andrew Cooper
2014-11-20 11:14 ` Jan Beulich
2014-11-20 11:34 ` Tim Deegan
2014-11-20 13:11 ` Jan Beulich
2014-11-20 15:37 ` [PATCH v2 " Jan Beulich
2014-11-20 15:41 ` Tim Deegan
2014-11-20 15:42 ` Andrew Cooper
2014-11-24 11:49 ` [PATCH 0/3] x86: XSA-109/110 follow-up (to be considered for 4.5) Jan Beulich
2014-11-24 17:11 ` Konrad Rzeszutek Wilk
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=546DC29A.4070301@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.