1. 09 7月, 2018 2 次提交
  2. 07 2月, 2018 1 次提交
  3. 08 1月, 2018 1 次提交
  4. 11 12月, 2017 1 次提交
  5. 21 8月, 2017 1 次提交
    • C
      arm64: Move PTE_RDONLY bit handling out of set_pte_at() · 73e86cb0
      Catalin Marinas 提交于
      Currently PTE_RDONLY is treated as a hardware only bit and not handled
      by the pte_mkwrite(), pte_wrprotect() or the user PAGE_* definitions.
      The set_pte_at() function is responsible for setting this bit based on
      the write permission or dirty state. This patch moves the PTE_RDONLY
      handling out of set_pte_at into the pte_mkwrite()/pte_wrprotect()
      functions. The PAGE_* definitions to need to be updated to explicitly
      include PTE_RDONLY when !PTE_WRITE.
      
      The patch also removes the redundant PAGE_COPY(_EXEC) definitions as
      they are identical to the corresponding PAGE_READONLY(_EXEC).
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      73e86cb0
  6. 26 8月, 2016 1 次提交
    • C
      arm64: Introduce execute-only page access permissions · cab15ce6
      Catalin Marinas 提交于
      The ARMv8 architecture allows execute-only user permissions by clearing
      the PTE_UXN and PTE_USER bits. However, the kernel running on a CPU
      implementation without User Access Override (ARMv8.2 onwards) 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 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_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_ng() macro. VM_READ is also checked now for page faults.
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      cab15ce6
  7. 29 6月, 2016 3 次提交
  8. 26 2月, 2016 1 次提交
    • M
      arm64: Remove fixmap include fragility · 3eca86e7
      Mark Rutland 提交于
      The asm-generic fixmap.h depends on each architecture's fixmap.h to pull
      in the definition of PAGE_KERNEL_RO, if this exists. In the absence of
      this, FIXMAP_PAGE_RO will not be defined. In mm/early_ioremap.c the
      definition of early_memremap_ro is predicated on FIXMAP_PAGE_RO being
      defined.
      
      Currently, the arm64 fixmap.h doesn't include pgtable.h for the
      definition of PAGE_KERNEL_RO, and as a knock-on effect early_memremap_ro
      is not always defined, leading to link-time failures when it is used.
      This has been observed with defconfig on next-20160226.
      
      Unfortunately, as pgtable.h includes fixmap.h, adding the include
      introduces a circular dependency, which is just as fragile.
      
      Instead, this patch factors out PAGE_KERNEL_RO and other prot
      definitions into a new pgtable-prot header which can be included by poth
      pgtable.h and fixmap.h, avoiding the  circular dependency, and ensuring
      that early_memremap_ro is alwyas defined where it is used.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reported-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      3eca86e7