Subject: [PATCH] arm64: uaccess: implement unsafe accessors

From: [email-masked] (Will Deacon)
Date: Thu, 6 Sep 2018 15:01:48 +0100

On Thu, Sep 06, 2018 at 12:09:56PM +0100, Julien Thierry wrote:
> Current implementation of get/put_user_unsafe default to get/put_user
> which toggle PAN before each access, despite having been told by the caller
> that multiple accesses to user memory were about to happen.
> 
> Provide implementations for user_access_begin/end to turn PAN off/on and
> implement unsafe accessors that assume PAN was already turned off.
> 
> Signed-off-by: Julien Thierry <[email-masked]>
> Cc: Catalin Marinas <[email-masked]>
> Cc: Will Deacon <[email-masked]>
> ---
>  arch/arm64/include/asm/uaccess.h | 61 ++++++++++++++++++++++++++++++----------
>  1 file changed, 46 insertions(+), 15 deletions(-)

Tested-by: Will Deacon <[email-masked]>

Cheers,

Will