]> git.ipfire.org Git - thirdparty/linux.git/commit - arch/arm64/Kconfig
arm64: Add support for user sub-page fault probing
authorCatalin Marinas <catalin.marinas@arm.com>
Sat, 23 Apr 2022 10:07:50 +0000 (11:07 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 25 Apr 2022 09:25:43 +0000 (10:25 +0100)
commitf3ba50a7a100e91b0b13ca43190a66c1bfdb9993
tree99884d8d9b030537a94d99d2646a8f5ec618864d
parentda32b5817253697671af961715517bfbb308a592
arm64: Add support for user sub-page fault probing

With MTE, even if the pte allows an access, a mismatched tag somewhere
within a page can still cause a fault. Select ARCH_HAS_SUBPAGE_FAULTS if
MTE is enabled and implement the probe_subpage_writeable() function.
Note that get_user() is sufficient for the writeable MTE check since the
same tag mismatch fault would be triggered by a read. The caller of
probe_subpage_writeable() will need to check the pte permissions
(put_user, GUP).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220423100751.1870771-3-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/Kconfig
arch/arm64/include/asm/mte.h
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/mte.c