From: Russell King Date: Thu, 6 Jan 2011 22:33:19 +0000 (+0000) Subject: Merge branch 'pgt' (early part) into devel X-Git-Tag: v2.6.38-rc1~471^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=28cdac6690cb113856293bf79b40de33dbd8f974;p=karo-tx-linux.git Merge branch 'pgt' (early part) into devel --- 28cdac6690cb113856293bf79b40de33dbd8f974 diff --cc arch/arm/mm/proc-macros.S index f8f777df8d72,f5ca6aaecdbd..e32fa499194c --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@@ -152,14 -138,11 +152,14 @@@ tst r1, #L_PTE_USER orrne r3, r3, #PTE_EXT_AP1 +#ifdef CONFIG_CPU_USE_DOMAINS + @ allow kernel read/write access to read-only user pages tstne r3, #PTE_EXT_APX bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 +#endif - tst r1, #L_PTE_EXEC - orreq r3, r3, #PTE_EXT_XN + tst r1, #L_PTE_XN + orrne r3, r3, #PTE_EXT_XN orr r3, r3, r2 diff --cc arch/arm/mm/proc-v7.S index 7401f4d7e676,210d051c54d7..b49fab21517c --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@@ -148,14 -146,11 +146,14 @@@ ENTRY(cpu_v7_set_pte_ext tst r1, #L_PTE_USER orrne r3, r3, #PTE_EXT_AP1 +#ifdef CONFIG_CPU_USE_DOMAINS + @ allow kernel read/write access to read-only user pages tstne r3, #PTE_EXT_APX bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 +#endif - tst r1, #L_PTE_EXEC - orreq r3, r3, #PTE_EXT_XN + tst r1, #L_PTE_XN + orrne r3, r3, #PTE_EXT_XN tst r1, #L_PTE_YOUNG tstne r1, #L_PTE_PRESENT