1. 09 11月, 2012 2 次提交
    • W
      ARM: mm: introduce present, faulting entries for PAGE_NONE · 26ffd0d4
      Will Deacon 提交于
      PROT_NONE mappings apply the page protection attributes defined by _P000
      which translate to PAGE_NONE for ARM. These attributes specify an XN,
      RDONLY pte that is inaccessible to userspace. However, on kernels
      configured without support for domains, such a pte *is* accessible to
      the kernel and can be read via get_user, allowing tasks to read
      PROT_NONE pages via syscalls such as read/write over a pipe.
      
      This patch introduces a new software pte flag, L_PTE_NONE, that is set
      to identify faulting, present entries.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      26ffd0d4
    • W
      ARM: mm: introduce L_PTE_VALID for page table entries · dbf62d50
      Will Deacon 提交于
      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: NWill Deacon <will.deacon@arm.com>
      dbf62d50
  2. 08 12月, 2011 1 次提交
    • C
      ARM: LPAE: MMU setup for the 3-level page table format · 1b6ba46b
      Catalin Marinas 提交于
      This patch adds the MMU initialisation for the LPAE page table format.
      The swapper_pg_dir size with LPAE is 5 rather than 4 pages. A new
      proc-v7-3level.S file contains the TTB initialisation, context switch
      and PTE setting code with the LPAE. The TTBRx split is based on the
      PAGE_OFFSET with TTBR1 used for the kernel mappings. The 36-bit mappings
      (supersections) and a few other memory types in mmu.c are conditionally
      compiled.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      1b6ba46b