Merge tag 'x86_mm_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Apr 2023 16:43:49 +0000 (09:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Apr 2023 16:43:49 +0000 (09:43 -0700)
Pull x86 LAM (Linear Address Masking) support from Dave Hansen:
 "Add support for the new Linear Address Masking CPU feature.

  This is similar to ARM's Top Byte Ignore and allows userspace to store
  metadata in some bits of pointers without masking it out before use"

* tag 'x86_mm_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm/iommu/sva: Do not allow to set FORCE_TAGGED_SVA bit from outside
  x86/mm/iommu/sva: Fix error code for LAM enabling failure due to SVA
  selftests/x86/lam: Add test cases for LAM vs thread creation
  selftests/x86/lam: Add ARCH_FORCE_TAGGED_SVA test cases for linear-address masking
  selftests/x86/lam: Add inherit test cases for linear-address masking
  selftests/x86/lam: Add io_uring test cases for linear-address masking
  selftests/x86/lam: Add mmap and SYSCALL test cases for linear-address masking
  selftests/x86/lam: Add malloc and tag-bits test cases for linear-address masking
  x86/mm/iommu/sva: Make LAM and SVA mutually exclusive
  iommu/sva: Replace pasid_valid() helper with mm_valid_pasid()
  mm: Expose untagging mask in /proc/$PID/status
  x86/mm: Provide arch_prctl() interface for LAM
  x86/mm: Reduce untagged_addr() overhead for systems without LAM
  x86/uaccess: Provide untagged_addr() and remove tags before address check
  mm: Introduce untagged_addr_remote()
  x86/mm: Handle LAM on context switch
  x86: CPUID and CR3/CR4 flags for Linear Address Masking
  x86: Allow atomic MM_CONTEXT flags setting
  x86/mm: Rework address range check in get_user() and put_user()

12 files changed:
1  2 
arch/x86/Kconfig
arch/x86/include/asm/mmu_context.h
arch/x86/include/uapi/asm/prctl.h
arch/x86/mm/init.c
arch/x86/mm/tlb.c
fs/proc/array.c
fs/proc/task_mmu.c
include/linux/mm.h
include/linux/sched/mm.h
mm/gup.c
mm/madvise.c
mm/migrate.c

Simple merge
index c3ad8a526378f9de192d4beedd3eb11ad8213c27,4c396e9a384f6eb2025e2c3b2d599c49e4db72be..1d29dc791f5a190b345b3dd481fcf2f56cd89622
@@@ -161,7 -214,8 +207,8 @@@ static inline void arch_dup_pkeys(struc
  static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
  {
        arch_dup_pkeys(oldmm, mm);
 -      paravirt_arch_dup_mmap(oldmm, mm);
 +      paravirt_enter_mmap(mm);
+       dup_lam(oldmm, mm);
        return ldt_dup_context(oldmm, mm);
  }
  
Simple merge
Simple merge
Simple merge
diff --cc fs/proc/array.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/gup.c
Simple merge
diff --cc mm/madvise.c
Simple merge
diff --cc mm/migrate.c
Simple merge