public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tamas Lengyel <tamas.lengyel@zentific.com>
Cc: jeremy@goop.org, Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Access control in Xen privcmd_ioctl_mmap
Date: Fri, 11 Jan 2013 12:39:54 -0500	[thread overview]
Message-ID: <20130111173954.GC26287@phenom.dumpdata.com> (raw)
In-Reply-To: <CAErYnsgFhW3Cf-W1CQJGOUstcyfdQxWUcGkGbd0uxM1R=XYuSw@mail.gmail.com>

On Mon, Dec 31, 2012 at 03:44:30PM -0500, Tamas Lengyel wrote:
> In the privcmd Linux driver two checks in the functions
> privcmd_ioctl_mmap and privcmd_ioctl_mmap_batch are not needed as they
> are trying to enforce hypervisor-level access control.  They should be
> removed as they break secondary control domains when performing dom0
> disaggregation. Xen itself provides adequate security controls around
> these hypercalls and these checks prevent those controls from
> functioning as intended.
> 
> The patch applies to the stable Linux 3.7.1 kernel.

Hm, I get this:

atching file drivers/xen/privcmd.c
Hunk #1 FAILED at 196.
patch: **** malformed patch at line 91: *udata, int version)

Anyhow I fixed it up.

Should this patch also be back-ported to the stable trees?

> 
> Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>
> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Cc: xen-devel@lists.xensource.com
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/xen/privcmd.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
> index 71f5c45..adaa260 100644
> --- a/drivers/xen/privcmd.c
> +++ b/drivers/xen/privcmd.c
> @@ -196,9 +196,6 @@ static long privcmd_ioctl_mmap(void __user *udata)
>         LIST_HEAD(pagelist);
>         struct mmap_mfn_state state;
> 
> -       if (!xen_initial_domain())
> -               return -EPERM;
> -
>         if (copy_from_user(&mmapcmd, udata, sizeof(mmapcmd)))
>                 return -EFAULT;
> 
> @@ -316,9 +313,6 @@ static long privcmd_ioctl_mmap_batch(void __user
> *udata, int version)
>         int *err_array = NULL;
>         struct mmap_batch_state state;
> 
> -       if (!xen_initial_domain())
> -               return -EPERM;
> -
>         switch (version) {
>         case 1:
>                 if (copy_from_user(&m, udata, sizeof(struct privcmd_mmapbatch)))

      parent reply	other threads:[~2013-01-11 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-31 20:44 [PATCH] Access control in Xen privcmd_ioctl_mmap Tamas Lengyel
2013-01-02 15:54 ` Daniel De Graaf
2013-01-11 17:39 ` 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=20130111173954.GC26287@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tamas.lengyel@zentific.com \
    --cc=xen-devel@lists.xensource.com \
    /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