All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <juergen.gross@ts.fujitsu.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Jan Beulich <JBeulich@suse.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH 08/11] xen/cpupool: prevent a domain from moving itself
Date: Fri, 19 Apr 2013 11:43:06 +0200	[thread overview]
Message-ID: <517111AA.5080708@ts.fujitsu.com> (raw)
In-Reply-To: <1365800659-26040-9-git-send-email-dgdegra@tycho.nsa.gov>

Am 12.04.2013 23:04, schrieb Daniel De Graaf:
> In the XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN operation, the existing check
> for domid == 0 should be checking that a domain does not attempt to
> modify its own cpupool; fix this by using rcu_lock_remote_domain_by_id.
>
> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Cc: Juergen Gross <juergen.gross@ts.fujitsu.com>
> Cc: Jan Beulich <JBeulich@suse.com>

Sorry for late answer, but I'm on vacation and reading mails not very 
often...

Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>

> ---
>   xen/common/cpupool.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
> index 10b10f8..c901f7e 100644
> --- a/xen/common/cpupool.c
> +++ b/xen/common/cpupool.c
> @@ -546,12 +546,8 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
>       {
>           struct domain *d;
>
> -        ret = -EINVAL;
> -        if ( op->domid == 0 )
> -            break;
> -        ret = -ESRCH;
> -        d = rcu_lock_domain_by_id(op->domid);
> -        if ( d == NULL )
> +        ret = rcu_lock_remote_domain_by_id(op->domid, &d);
> +        if ( ret )
>               break;
>           if ( d->cpupool == NULL )
>           {
>

  reply	other threads:[~2013-04-19  9:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 21:04 [PATCH v3 0/11] Rename/remove IS_PRIV Daniel De Graaf
2013-04-12 21:04 ` [PATCH 01/11] MAINTAINERS: Add myself as XSM maintainer Daniel De Graaf
2013-04-12 21:04 ` [PATCH 02/11] xen/arch/x86: remove IS_PRIV access check bypasses Daniel De Graaf
2013-04-12 21:04 ` [PATCH 03/11] xen/xsm: add hooks for claim Daniel De Graaf
2013-04-12 21:04 ` [PATCH 04/11] hvm: convert access check for nested HVM to XSM Daniel De Graaf
2013-04-12 21:04 ` [PATCH 05/11] xen/arch/x86: remove IS_PRIV_FOR references Daniel De Graaf
2013-04-12 21:04 ` [PATCH 06/11] xen/arch/arm: remove rcu_lock_target_domain_by_id Daniel De Graaf
2013-04-12 21:04 ` [PATCH 07/11] xen: rename IS_PRIV to is_hardware_domain Daniel De Graaf
2013-04-12 21:04 ` [PATCH 08/11] xen/cpupool: prevent a domain from moving itself Daniel De Graaf
2013-04-19  9:43   ` Jürgen Groß [this message]
2013-04-12 21:04 ` [PATCH 09/11] xen: use domid check in is_hardware_domain Daniel De Graaf
2013-04-12 21:04 ` [PATCH 10/11] xen/arch/x86: clarify domid == 0 checks Daniel De Graaf
2013-04-15  8:51   ` Jan Beulich
2013-04-15 13:47     ` Daniel De Graaf
2013-04-18 15:09       ` Jan Beulich
2013-04-12 21:04 ` [PATCH 11/11] IOMMU: use is_hardware_domain instead of domid == 0 Daniel De Graaf
2013-04-18 15:12 ` [PATCH v3 0/11] Rename/remove IS_PRIV Jan Beulich
2013-04-18 16:10   ` Daniel De Graaf
2013-04-18 16:11     ` [PATCH] xen/arch/x86: remove IS_PRIV bypass on IRQ check Daniel De Graaf
2013-04-18 16:20       ` Jan Beulich
2013-04-22 12:13     ` [PATCH v3 0/11] Rename/remove IS_PRIV George Dunlap
2013-04-22 15:05       ` Daniel De Graaf
2013-04-22 15:09         ` George Dunlap
2013-04-23  9:59           ` Jan Beulich
2013-05-03  7:39           ` 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=517111AA.5080708@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=JBeulich@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --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.