arm64: uaccess: implement unsafe accessors
authorJulien Thierry <[email protected]>
Thu, 6 Sep 2018 11:09:56 +0000 (12:09 +0100)
committerCatalin Marinas <[email protected]>
Mon, 10 Sep 2018 15:27:56 +0000 (16:27 +0100)
commita1f33941f7e103bcf471eaf8461b212223c642d6
treefb9a2e0d7f385293d8513bc81e893e7694823ac1
parent4733c7c79e8c466fedb4fd4eb29bfc5b1bdb336f
arm64: uaccess: implement unsafe accessors

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.

Tested-by: Will Deacon <[email protected]>
Signed-off-by: Julien Thierry <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
arch/arm64/include/asm/uaccess.h