1. 23 7月, 2014 1 次提交
    • J
      arm64: mm: Implement 4 levels of translation tables · c79b954b
      Jungseok Lee 提交于
      This patch implements 4 levels of translation tables since 3 levels
      of page tables with 4KB pages cannot support 40-bit physical address
      space described in [1] due to the following issue.
      
      It is a restriction that kernel logical memory map with 4KB + 3 levels
      (0xffffffc000000000-0xffffffffffffffff) cannot cover RAM region from
      544GB to 1024GB in [1]. Specifically, ARM64 kernel fails to create
      mapping for this region in map_mem function since __phys_to_virt for
      this region reaches to address overflow.
      
      If SoC design follows the document, [1], over 32GB RAM would be placed
      from 544GB. Even 64GB system is supposed to use the region from 544GB
      to 576GB for only 32GB RAM. Naturally, it would reach to enable 4 levels
      of page tables to avoid hacking __virt_to_phys and __phys_to_virt.
      
      However, it is recommended 4 levels of page table should be only enabled
      if memory map is too sparse or there is about 512GB RAM.
      
      References
      ----------
      [1]: Principles of ARM Memory Maps, White Paper, Issue C
      Signed-off-by: NJungseok Lee <jays.lee@samsung.com>
      Reviewed-by: NSungjinn Chung <sungjinn.chung@samsung.com>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Reviewed-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Reviewed-by: NSteve Capper <steve.capper@linaro.org>
      [catalin.marinas@arm.com: MEMBLOCK_INITIAL_LIMIT removed, same as PUD_SIZE]
      [catalin.marinas@arm.com: early_ioremap_init() updated for 4 levels]
      [catalin.marinas@arm.com: 48-bit VA depends on BROKEN until KVM is fixed]
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: NJungseok Lee <jungseoklee85@gmail.com>
      c79b954b
  2. 16 5月, 2014 1 次提交
  3. 09 5月, 2014 2 次提交
    • C
      arm64: Introduce execute-only page access permissions · bc07c2c6
      Catalin Marinas 提交于
      The ARMv8 architecture allows execute-only user permissions by clearing
      the PTE_UXN and PTE_USER bits. The kernel, however, can still access
      such page, so execute-only page permission does not protect against
      read(2)/write(2) etc. accesses. Systems requiring such protection must
      implement/enable features like SECCOMP.
      
      This patch changes the arm64 __P100 and __S100 protection_map[] macros
      to the new __PAGE_EXECONLY attributes. A side effect is that
      pte_valid_user() no longer triggers for __PAGE_EXECONLY since PTE_USER
      isn't set. To work around this, the check is done on the PTE_NG bit via
      the pte_valid_ng() macro. VM_READ is also checked now for page faults.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      bc07c2c6
    • C
      arm64: Provide read/write fault information in compat signal handlers · 9141300a
      Catalin Marinas 提交于
      For AArch32, bit 11 (WnR) of the FSR/ESR register is set when the fault
      was caused by a write access and applications like Qemu rely on such
      information being provided in sigcontext. This patch introduces the
      ESR_EL1 tracking for the arm64 kernel faults and sets bit 11 accordingly
      in compat sigcontext.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      9141300a
  4. 20 9月, 2013 1 次提交
  5. 13 9月, 2013 2 次提交
  6. 19 7月, 2013 1 次提交
  7. 14 6月, 2013 1 次提交
  8. 25 5月, 2013 1 次提交
  9. 08 5月, 2013 1 次提交
  10. 26 4月, 2013 1 次提交
    • S
      arm64: mm: Correct show_pte behaviour · 4339e3f3
      Steve Capper 提交于
      show_pte makes use of the *_none_or_clear_bad style functions. If a
      pgd, pud or pmd is identified as being bad, it will then be cleared.
      
      As show_pte appears to be called from either the user or kernel
      fault handlers this side effect can lead to unpredictable behaviour;
      especially as TLB entries are not invalidated.
      
      This patch removes the page table sanitisation from show_pte. If a
      bad pgd, pud or pmd is encountered it is left unmodified.
      Signed-off-by: NSteve Capper <steve.capper@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      4339e3f3
  11. 14 11月, 2012 1 次提交
  12. 17 9月, 2012 1 次提交