1. 09 Nov, 2012 3 commits
    • Will Deacon's avatar
      ARM: mm: introduce L_PTE_VALID for page table entries · dbf62d50
      Will Deacon authored
      For long-descriptor translation table formats, the ARMv7 architecture
      defines the last two bits of the second- and third-level descriptors to
      be:
      
      	x0b	- Invalid
      	01b	- Block (second-level), Reserved (third-level)
      	11b	- Table (second-level), Page (third-level)
      
      This allows us to define L_PTE_PRESENT as (3 << 0) and use this value to
      create ptes directly. However, when determining whether a given pte
      value is present in the low-level page table accessors, we only need to
      check the least significant bit of the descriptor, allowing us to write
      faulting, present entries which are required for PROT_NONE mappings.
      
      This patch introduces L_PTE_VALID, which can be used to test whether a
      pte should fault, and updates the low-level page table accessors
      accordingly.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      dbf62d50
    • Will Deacon's avatar
      ARM: mm: don't use the access flag permissions mechanism for classic MMU · 0cbbbad6
      Will Deacon authored
      The simplified access permissions model is not used for the classic MMU
      translation regime, so ensure that it is turned off in the sctlr prior
      to turning on address translation for ARMv7.
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      0cbbbad6
    • Will Deacon's avatar
      ARM: mm: use pteval_t to represent page protection values · 864aa04c
      Will Deacon authored
      When updating the page protection map after calculating the user_pgprot
      value, the base protection map is temporarily stored in an unsigned long
      type, causing truncation of the protection bits when LPAE is enabled.
      This effectively means that calls to mprotect() will corrupt the upper
      page attributes, clearing the XN bit unconditionally.
      
      This patch uses pteval_t to store the intermediate protection values,
      preserving the upper bits for 64-bit descriptors.
      
      Cc: stable@vger.kernel.org
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      864aa04c
  2. 04 Nov, 2012 1 commit
  3. 03 Nov, 2012 15 commits
  4. 02 Nov, 2012 21 commits