]> Git Repo - linux.git/commit
x86/uaccess: Provide untagged_addr() and remove tags before address check
authorKirill A. Shutemov <[email protected]>
Sun, 12 Mar 2023 11:26:01 +0000 (14:26 +0300)
committerDave Hansen <[email protected]>
Thu, 16 Mar 2023 20:08:39 +0000 (13:08 -0700)
commit74c228d20a51ddb1354409fdbed7b72427339d7b
tree524713f7708b7ffd19da588b367a19796503c04f
parent428e106ae1ad4e45d3fd6978a753db475d0d0ec9
x86/uaccess: Provide untagged_addr() and remove tags before address check

untagged_addr() is a helper used by the core-mm to strip tag bits and
get the address to the canonical shape based on rules of the current
thread. It only handles userspace addresses.

The untagging mask is stored in per-CPU variable and set on context
switching to the task.

The tags must not be included into check whether it's okay to access the
userspace address. Strip tags in access_ok().

Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Alexander Potapenko <[email protected]>
Link: https://lore.kernel.org/all/20230312112612.31869-7-kirill.shutemov%40linux.intel.com
arch/x86/include/asm/mmu.h
arch/x86/include/asm/mmu_context.h
arch/x86/include/asm/tlbflush.h
arch/x86/include/asm/uaccess.h
arch/x86/kernel/process.c
arch/x86/mm/init.c
This page took 0.056027 seconds and 4 git commands to generate.