android_kernel_xiaomi_sm8350/arch
Hugh Dickins 69b0475456 [PATCH] mm: arm ready for split ptlock
Prepare arm for the split page_table_lock: three issues.

Signal handling's preserve and restore of iwmmxt context currently involves
reading and writing that context to and from user space, while holding
page_table_lock to secure the user page(s) against kswapd.  If we split the
lock, then the structure might span two pages, secured by to read into and
write from a kernel stack buffer, copying that out and in without locking (the
structure is 160 bytes in size, and here we're near the top of the kernel
stack).  Or would the overhead be noticeable?

arm_syscall's cmpxchg emulation use pte_offset_map_lock, instead of
pte_offset_map and mm-wide page_table_lock; and strictly, it should now also
take mmap_sem before descending to pmd, to guard against another thread
munmapping, and the page table pulled out beneath this thread.

Updated two comments in fault-armv.c.  adjust_pte is interesting, since its
modification of a pte in one part of the mm depends on the lock held when
calling update_mmu_cache for a pte in some other part of that mm.  This can't
be done with a split page_table_lock (and we've already taken the lowest lock
in the hierarchy here): so we'll have to disable split on arm, unless
CONFIG_CPU_CACHE_VIPT to ensures adjust_pte never used.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:42 -07:00
..
alpha [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
arm [PATCH] mm: arm ready for split ptlock 2005-10-29 21:40:42 -07:00
arm26 [PATCH] mm: arches skip ptlock 2005-10-29 21:40:40 -07:00
cris [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
frv [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
h8300 kbuild: h8300,m68knommu,sh,sh64 use generic asm-offsets.h support 2005-09-09 20:28:49 +02:00
i386 [PATCH] mm: i386 sh sh64 ready for split ptlock 2005-10-29 21:40:41 -07:00
ia64 [PATCH] mm: flush_tlb_range outside ptlock 2005-10-29 21:40:40 -07:00
m32r [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
m68k [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
m68knommu [PATCH] m68knommu: startup code for the Drangen Engine 68328 based board 2005-09-12 20:04:15 -07:00
mips [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
parisc [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
ppc [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
ppc64 [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
s390 [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
sh [PATCH] mm: i386 sh sh64 ready for split ptlock 2005-10-29 21:40:41 -07:00
sh64 [PATCH] mm: i386 sh sh64 ready for split ptlock 2005-10-29 21:40:41 -07:00
sparc [PATCH] mm: arches skip ptlock 2005-10-29 21:40:40 -07:00
sparc64 [PATCH] mm: arches skip ptlock 2005-10-29 21:40:40 -07:00
um [PATCH] mm: arches skip ptlock 2005-10-29 21:40:40 -07:00
v850 [PATCH] V850: C99 initializers for hw_interrupt_type structures 2005-09-10 10:06:27 -07:00
x86_64 [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
xtensa [PATCH] gfp_t: dma-mapping (xtensa) 2005-10-28 08:16:49 -07:00