public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>, <xen-devel@lists.xenproject.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<stefano.stabellini@eu.citrix.com>,
	<linux-kernel@vger.kernel.org>,
	"Riku Voipio" <riku.voipio@linaro.org>,
	Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call
Date: Fri, 11 Sep 2015 15:55:04 +0100	[thread overview]
Message-ID: <1441983304.3549.73.camel@citrix.com> (raw)
In-Reply-To: <55F2E909.70600@citrix.com>

On Fri, 2015-09-11 at 15:45 +0100, Julien Grall wrote:
> On 11/09/15 15:29, Ian Campbell wrote:
> > On Fri, 2015-09-11 at 15:16 +0100, Julien Grall wrote:
> > > When Xen is copyin data to/from the guest it will check if the kernel
> > 
> > "copying"
> > 
> > > has the right to do the access. If not, the hypercall will return an
> > > error.
> > > 
> > > After the commit a5e090acbf545c0a3b04080f8a488b17ec41fe02 "ARM:
> > > software-based priviledged-no-access support", the kernel can't
> > > access
> > 
> > "privileged"
> > 
> > > anymore the user space by default. This will result to fail on every
> > 
> > "any more" (or "any longer")
> > 
> > > hypercall made by the userspace (i.e via privcmd).
> > > 
> > > We have to enable the userspace access and then restore the correct
> > > permission everytime the privmcd is used to made an hypercall.
> > 
> > "every time" and "privcmd"
> > 
> > >  HYPERCALL1(tmem_op);
> > >  HYPERCALL2(multicall);
> > >  
> > > -ENTRY(privcmd_call)
> > > +ENTRY(__privcmd_call)
> > 
> > arch/arm/include/asm/assembler.h seems to contain uaccess_* macros
> > which
> > could be used right here directly I think? That would be preferable to
> > wrapping I think.
> 
> Looking to the uaccess_save macro:

I was thinking more about uaccess_enable/disable.

Ian.

  reply	other threads:[~2015-09-11 14:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 14:16 [PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call Julien Grall
2015-09-11 14:29 ` Ian Campbell
2015-09-11 14:45   ` Julien Grall
2015-09-11 14:55     ` Ian Campbell [this message]
2015-09-11 14:56       ` Julien Grall
2015-09-11 15:25         ` Russell King - ARM Linux
2015-09-11 15:36           ` Julien Grall
2015-09-11 15:20     ` Russell King - ARM Linux
2015-09-11 16:22   ` Julien Grall

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=1441983304.3549.73.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=riku.voipio@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox