summaryrefslogtreecommitdiff
path: root/arch/x86/entry
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2023-04-03 14:10:20 +0300
committerDave Hansen <dave.hansen@linux.intel.com>2023-04-06 23:45:06 +0300
commit97740266de26e5dfe6e4fbecacb6995b66c2e378 (patch)
treec57cf73b3ee45b7874d93def94f1fed909d6da92 /arch/x86/entry
parentfca1fdd2b0a6fcd491ec520afac80bc72b4c811e (diff)
downloadlinux-97740266de26e5dfe6e4fbecacb6995b66c2e378.tar.xz
x86/mm/iommu/sva: Do not allow to set FORCE_TAGGED_SVA bit from outside
arch_prctl(ARCH_FORCE_TAGGED_SVA) overrides the default and allows LAM and SVA to co-exist in the process. It is expected by called by the process when it knows what it is doing. arch_prctl() operates on the current process, but the same code is reachable from ptrace where it can be called on arbitrary task. Make it strict and only allow to set MM_CONTEXT_FORCE_TAGGED_SVA for the current process. Fixes: 23e5d9ec2bab ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive") Suggested-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Link: https://lore.kernel.org/all/20230403111020.3136-3-kirill.shutemov%40linux.intel.com
Diffstat (limited to 'arch/x86/entry')
0 files changed, 0 insertions, 0 deletions