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 branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:

- LPAE fixes for kernel-readonly regions

- Fix for get_user_pages_fast on LPAE systems

- avoid tying decompressor to a particular platform if DEBUG_LL is
enabled

- BUG if we attempt to return to userspace but the to-be-restored PSR
value keeps us in privileged mode (defeating an issue that ftracetest
found)

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: BUG if jumping to usermode address in kernel mode
ARM: 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE
ARM: 8721/1: mm: dump: check hardware RO bit for LPAE
ARM: make decompressor debug output user selectable
ARM: fix get_user_pages_fast

+42 -6
+2 -2
arch/arm/Kconfig.debug
··· 1776 1776 default y if ARCH_EBSA110 || DEBUG_FOOTBRIDGE_COM1 || DEBUG_GEMINI || ARCH_RPC 1777 1777 1778 1778 config DEBUG_UNCOMPRESS 1779 - bool 1779 + bool "Enable decompressor debugging via DEBUG_LL output" 1780 1780 depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M 1781 - default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ 1781 + depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ 1782 1782 (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ 1783 1783 !DEBUG_BRCMSTB_UART 1784 1784 help
+18
arch/arm/include/asm/assembler.h
··· 518 518 #endif 519 519 .endm 520 520 521 + .macro bug, msg, line 522 + #ifdef CONFIG_THUMB2_KERNEL 523 + 1: .inst 0xde02 524 + #else 525 + 1: .inst 0xe7f001f2 526 + #endif 527 + #ifdef CONFIG_DEBUG_BUGVERBOSE 528 + .pushsection .rodata.str, "aMS", %progbits, 1 529 + 2: .asciz "\msg" 530 + .popsection 531 + .pushsection __bug_table, "aw" 532 + .align 2 533 + .word 1b, 2b 534 + .hword \line 535 + .popsection 536 + #endif 537 + .endm 538 + 521 539 #endif /* __ASM_ASSEMBLER_H__ */
+12
arch/arm/include/asm/pgtable.h
··· 232 232 #define pte_valid_user(pte) \ 233 233 (pte_valid(pte) && pte_isset((pte), L_PTE_USER) && pte_young(pte)) 234 234 235 + static inline bool pte_access_permitted(pte_t pte, bool write) 236 + { 237 + pteval_t mask = L_PTE_PRESENT | L_PTE_USER; 238 + pteval_t needed = mask; 239 + 240 + if (write) 241 + mask |= L_PTE_RDONLY; 242 + 243 + return (pte_val(pte) & mask) == needed; 244 + } 245 + #define pte_access_permitted pte_access_permitted 246 + 235 247 #if __LINUX_ARM_ARCH__ < 6 236 248 static inline void __sync_icache_dcache(pte_t pteval) 237 249 {
+6
arch/arm/kernel/entry-header.S
··· 300 300 mov r2, sp 301 301 ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr 302 302 ldr lr, [r2, #\offset + S_PC]! @ get pc 303 + tst r1, #0xcf 304 + bne 1f 303 305 msr spsr_cxsf, r1 @ save in spsr_svc 304 306 #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) 305 307 @ We must avoid clrex due to Cortex-A15 erratum #830321 ··· 316 314 @ after ldm {}^ 317 315 add sp, sp, #\offset + PT_REGS_SIZE 318 316 movs pc, lr @ return & move spsr_svc into cpsr 317 + 1: bug "Returning to usermode but unexpected PSR bits set?", \@ 319 318 #elif defined(CONFIG_CPU_V7M) 320 319 @ V7M restore. 321 320 @ Note that we don't need to do clrex here as clearing the local ··· 332 329 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr 333 330 ldr lr, [sp, #\offset + S_PC] @ get pc 334 331 add sp, sp, #\offset + S_SP 332 + tst r1, #0xcf 333 + bne 1f 335 334 msr spsr_cxsf, r1 @ save in spsr_svc 336 335 337 336 @ We must avoid clrex due to Cortex-A15 erratum #830321 ··· 346 341 .endif 347 342 add sp, sp, #PT_REGS_SIZE - S_SP 348 343 movs pc, lr @ return & move spsr_svc into cpsr 344 + 1: bug "Returning to usermode but unexpected PSR bits set?", \@ 349 345 #endif /* !CONFIG_THUMB2_KERNEL */ 350 346 .endm 351 347
+2 -2
arch/arm/mm/dump.c
··· 129 129 .val = PMD_SECT_USER, 130 130 .set = "USR", 131 131 }, { 132 - .mask = L_PMD_SECT_RDONLY, 133 - .val = L_PMD_SECT_RDONLY, 132 + .mask = L_PMD_SECT_RDONLY | PMD_SECT_AP2, 133 + .val = L_PMD_SECT_RDONLY | PMD_SECT_AP2, 134 134 .set = "ro", 135 135 .clear = "RW", 136 136 #elif __LINUX_ARM_ARCH__ >= 6
+2 -2
arch/arm/mm/init.c
··· 629 629 .start = (unsigned long)_stext, 630 630 .end = (unsigned long)__init_begin, 631 631 #ifdef CONFIG_ARM_LPAE 632 - .mask = ~L_PMD_SECT_RDONLY, 633 - .prot = L_PMD_SECT_RDONLY, 632 + .mask = ~(L_PMD_SECT_RDONLY | PMD_SECT_AP2), 633 + .prot = L_PMD_SECT_RDONLY | PMD_SECT_AP2, 634 634 #else 635 635 .mask = ~(PMD_SECT_APX | PMD_SECT_AP_WRITE), 636 636 .prot = PMD_SECT_APX | PMD_SECT_AP_WRITE,