Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Will Deacon:
"Fix pte_same() to avoid getting stuck on write fault.

This single arm64 fix is a revert of 747a70e60b72 ("arm64: Fix
copy-on-write referencing in HugeTLB"), not because that patch was
wrong, but because it was broken by aa57157be69f ("arm64: Ensure
VM_WRITE|VM_SHARED ptes are clean by default") which we merged in
-rc6.

We spotted the issue in Android (AOSP), where one of the JIT threads
gets stuck on a write fault during boot because the faulting pte is
marked as PTE_DIRTY | PTE_WRITE | PTE_RDONLY and the fault handler
decides that there's nothing to do thanks to pte_same() masking out
PTE_RDONLY.

Thanks to John Stultz for reporting this and testing this so quickly,
and to Steve Capper for confirming that the HugeTLB tests continue to
pass"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: Do not mask out PTE_RDONLY in pte_same()

-17
-17
arch/arm64/include/asm/pgtable.h
··· 283 283 set_pte(ptep, pte); 284 284 } 285 285 286 - #define __HAVE_ARCH_PTE_SAME 287 - static inline int pte_same(pte_t pte_a, pte_t pte_b) 288 - { 289 - pteval_t lhs, rhs; 290 - 291 - lhs = pte_val(pte_a); 292 - rhs = pte_val(pte_b); 293 - 294 - if (pte_present(pte_a)) 295 - lhs &= ~PTE_RDONLY; 296 - 297 - if (pte_present(pte_b)) 298 - rhs &= ~PTE_RDONLY; 299 - 300 - return (lhs == rhs); 301 - } 302 - 303 286 /* 304 287 * Huge pte definitions. 305 288 */