Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1222920

Re: [PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call

From Julien Grall <julien.grall@citrix.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call
Date 2015-09-11 17:40 +0200
Message-ID <q7yAG-5N1-41@gated-at.bofh.it> (permalink)
References (1 earlier) <q7xuV-4eq-7@gated-at.bofh.it> <q7xOi-4C9-11@gated-at.bofh.it> <q7xXY-4O5-7@gated-at.bofh.it> <q7xXY-4O5-5@gated-at.bofh.it> <q7yqZ-5BA-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/09/15 16:25, Russell King - ARM Linux wrote:
> On Fri, Sep 11, 2015 at 03:56:38PM +0100, Julien Grall wrote:
>> Well, we can't assume that the function will be called with uaccess
>> disabled.
> 
> Please explain your reasoning.

I think I was confused about the usage of uaccess.
Thank you for the explanation.

> The reason copy_from_user() et.al. need to save and restore the DACR is
> because the DACR may be in one of two states on older ARM architectures.
> It may have set the kernel domain to 'manager' mode, to allow these
> accessors to work on kernel memory, or the kernel domain may be in
> 'client' mode, thereby preventing the accessors from touching kernel
> memory.
> 
> Unless the code path is reachable with the kernel domain in manager
> mode, (iow, a set_fs(KERNEL_DS) or set_fs(get_ds()) has been done) then
> it should be safe to use uaccess_disable/uaccess_enable.


I believe that our privcmd driver doesn't made any usage of set_fs(...),
so I will use the uaccess_{disable,enable} macro.

Regards,

-- 
Julien Grall
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call Julien Grall <julien.grall@citrix.com> - 2015-09-11 16:20 +0200
  Re: [PATCH] arm/xen: Enable user access to the kernel before  issuing a privcmd call Ian Campbell <ian.campbell@citrix.com> - 2015-09-11 16:30 +0200
    Re: [PATCH] arm/xen: Enable user access to the kernel before issuing  a privcmd call Julien Grall <julien.grall@citrix.com> - 2015-09-11 16:50 +0200
      Re: [PATCH] arm/xen: Enable user access to the kernel before issuing  a privcmd call Julien Grall <julien.grall@citrix.com> - 2015-09-11 17:00 +0200
        Re: [PATCH] arm/xen: Enable user access to the kernel before issuing  a privcmd call Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-11 17:30 +0200
          Re: [PATCH] arm/xen: Enable user access to the kernel before issuing  a privcmd call Julien Grall <julien.grall@citrix.com> - 2015-09-11 17:40 +0200
      Re: [PATCH] arm/xen: Enable user access to the kernel before  issuing a privcmd call Ian Campbell <ian.campbell@citrix.com> - 2015-09-11 17:00 +0200
      Re: [PATCH] arm/xen: Enable user access to the kernel before issuing  a privcmd call Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-11 17:30 +0200
    Re: [PATCH] arm/xen: Enable user access to the kernel before issuing  a privcmd call Julien Grall <julien.grall@citrix.com> - 2015-09-11 18:30 +0200

csiph-web