From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2/2] x86/domctl: Don't allow a toolstack domain to pause itself
Date: Wed, 1 Apr 2015 16:14:18 -0400 [thread overview]
Message-ID: <20150401201418.GB13356@l.oracle.com> (raw)
In-Reply-To: <1427902263-363-3-git-send-email-andrew.cooper3@citrix.com>
On Wed, Apr 01, 2015 at 04:31:03PM +0100, Andrew Cooper wrote:
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Keir Fraser <keir@xen.org>
> CC: Jan Beulich <JBeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> xen/arch/x86/domctl.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> index bcbdf95..ff3b423 100644
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
> @@ -411,7 +411,8 @@ long arch_do_domctl(
> struct hvm_domain_context c = { .size = domctl->u.hvmcontext.size };
>
> ret = -EINVAL;
> - if ( !is_hvm_domain(d) )
> + if ( (d == currd) || /* no domain_pause() */
> + !is_hvm_domain(d) )
> goto sethvmcontext_out;
>
> ret = -ENOMEM;
> @@ -436,7 +437,8 @@ long arch_do_domctl(
> struct hvm_domain_context c = { 0 };
>
> ret = -EINVAL;
> - if ( !is_hvm_domain(d) )
> + if ( (d == currd) || /* no domain_pause() */
> + !is_hvm_domain(d) )
> goto gethvmcontext_out;
>
> c.size = hvm_save_size(d);
> @@ -475,7 +477,8 @@ long arch_do_domctl(
>
> case XEN_DOMCTL_gethvmcontext_partial:
> ret = -EINVAL;
> - if ( !is_hvm_domain(d) )
> + if ( (d == currd) || /* no domain_pause() */
> + !is_hvm_domain(d) )
> break;
>
> domain_pause(d);
> @@ -896,7 +899,8 @@ long arch_do_domctl(
> break;
>
> ret = -EINVAL;
> - if ( !is_hvm_domain(d))
> + if ( (v == curr) || /* no vcpu_pause() */
> + !is_hvm_domain(d) )
> break;
>
> ret = hvm_debug_op(v, domctl->u.debug_op.op);
> --
> 1.7.10.4
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-04-01 20:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 15:31 [PATCH 0/2] Post-XSA-127 cleanup Andrew Cooper
2015-04-01 15:31 ` [PATCH 1/2] x86/domctl: cleanup Andrew Cooper
2015-04-01 20:13 ` Konrad Rzeszutek Wilk
2015-04-13 14:27 ` Jan Beulich
2015-04-13 15:22 ` Andrew Cooper
2015-04-13 15:49 ` [PATCH v2 " Andrew Cooper
2015-04-01 15:31 ` [PATCH 2/2] x86/domctl: Don't allow a toolstack domain to pause itself Andrew Cooper
2015-04-01 20:14 ` Konrad Rzeszutek Wilk [this message]
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=20150401201418.GB13356@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.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.