From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Xen-devel <xen-devel@lists.xen.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [Patch v2 3/3] xen/gdbsx: Security audit of {, un}pausevcpu and domstatus hypercalls
Date: Thu, 24 Jul 2014 18:20:09 -0700 [thread overview]
Message-ID: <20140724182009.5a22218d@mantra.us.oracle.com> (raw)
In-Reply-To: <53D103F3.2010604@citrix.com>
On Thu, 24 Jul 2014 14:02:43 +0100
Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> On 24/07/14 13:58, Jan Beulich wrote:
> >>>> On 24.07.14 at 13:16, <andrew.cooper3@citrix.com> wrote:
> >> --- a/xen/arch/x86/domctl.c
> >> +++ b/xen/arch/x86/domctl.c
> >> @@ -1030,11 +1030,10 @@ long arch_do_domctl(
> >> if ( !d->controller_pause_count )
> >> break;
> >> ret = -EINVAL;
> >> - if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS
> >> ||
> >> + if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= d->max_vcpus ||
> > As mentioned on IRC - are you sure you can replace (rather than
> > amend) the previous bounds check? I.e. do you _know_ that gdbsx
> > can deal with guests having more than MAX_VIRT_CPUS vCPU-s?
> >
> > Jan
> >
>
> I have no idea whether it can or not, but if it asks for a legitimate
> ID greater than MAX_VIRT_CPUS, then I think it is reasonable to
> assume yes.
In earlier days, gdbsx was not part of xen. So I, in my earlier xen
days, added call to unpause a vcpu with INTMAX (~0u) vcpuid, and see
if xen returns ENOSYS.
The above change doesn't affect that, and it is good to check for
d->max_vcpus instead of MAX_VIRT_CPUS.
vcpuid in gdbsx is int, so it can handle INTMAX-1 vcpus, it thinks
INTMAX is invalid vcpu :).
thanks,
mukesh
prev parent reply other threads:[~2014-07-25 1:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 10:56 [PATCH 0/3] GDBSX fixes Andrew Cooper
2014-07-24 10:56 ` [PATCH 1/3] xen/common: Introduce vcpu_{, un}pause_by_systemcontroller() helpers Andrew Cooper
2014-07-24 10:56 ` [PATCH 2/3] x86/gdbsx: Invert preconditions for XEN_DOMCTL_gdbsx_{, un}pausevcpu hypercalls Andrew Cooper
2014-07-24 10:56 ` [PATCH 3/3] xen/gdbsx: Security audit of {, un}pausevcpu and domstatus hypercalls Andrew Cooper
2014-07-24 11:07 ` Tim Deegan
2014-07-24 11:11 ` Andrew Cooper
2014-07-24 11:16 ` [Patch v2 " Andrew Cooper
2014-07-24 11:41 ` Tim Deegan
2014-07-24 12:58 ` Jan Beulich
2014-07-24 13:02 ` Andrew Cooper
2014-07-25 1:20 ` Mukesh Rathor [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=20140724182009.5a22218d@mantra.us.oracle.com \
--to=mukesh.rathor@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--cc=tim@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 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).