1. 24 1月, 2013 1 次提交
  2. 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
  3. 12 5月, 2012 1 次提交
  4. 08 12月, 2011 2 次提交
    • C
      ARM: LPAE: Page table maintenance for the 3-level format · da028779
      Catalin Marinas 提交于
      This patch modifies the pgd/pmd/pte manipulation functions to support
      the 3-level page table format. Since there is no need for an 'ext'
      argument to cpu_set_pte_ext(), this patch conditionally defines a
      different prototype for this function when CONFIG_ARM_LPAE.
      
      The patch also introduces the L_PGD_SWAPPER flag to mark pgd entries
      pointing to pmd tables pre-allocated in the swapper_pg_dir and avoid
      trying to free them at run-time. This flag is 0 with the classic page
      table format.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      da028779
    • C
      ARM: LPAE: Introduce the 3-level page table format definitions · dcfdae04
      Catalin Marinas 提交于
      This patch introduces the pgtable-3level*.h files with definitions
      specific to the LPAE page table format (3 levels of page tables).
      
      Each table is 4KB and has 512 64-bit entries. An entry can point to a
      40-bit physical address. The young, write and exec software bits share
      the corresponding hardware bits (negated). Other software bits use spare
      bits in the PTE.
      
      The patch also changes some variable types from unsigned long or int to
      pteval_t or pgprot_t.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      dcfdae04