1. 02 3月, 2016 2 次提交
    • M
      arm64: Rework valid_user_regs · dbd4d7ca
      Mark Rutland 提交于
      We validate pstate using PSR_MODE32_BIT, which is part of the
      user-provided pstate (and cannot be trusted). Also, we conflate
      validation of AArch32 and AArch64 pstate values, making the code
      difficult to reason about.
      
      Instead, validate the pstate value based on the associated task. The
      task may or may not be current (e.g. when using ptrace), so this must be
      passed explicitly by callers. To avoid circular header dependencies via
      sched.h, is_compat_task is pulled out of asm/ptrace.h.
      
      To make the code possible to reason about, the AArch64 and AArch32
      validation is split into separate functions. Software must respect the
      RES0 policy for SPSR bits, and thus the kernel mirrors the hardware
      policy (RAZ/WI) for bits as-yet unallocated. When these acquire an
      architected meaning writes may be permitted (potentially with additional
      validation).
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Dave Martin <dave.martin@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      dbd4d7ca
    • A
      arm64: mm: check at build time that PAGE_OFFSET divides the VA space evenly · 6d2aa549
      Ard Biesheuvel 提交于
      Commit 8439e62a ("arm64: mm: use bit ops rather than arithmetic in
      pa/va translations") changed the boundary check against PAGE_OFFSET from
      an arithmetic comparison to a bit test. This means we now silently assume
      that PAGE_OFFSET is a power of 2 that divides the kernel virtual address
      space into two equal halves. So make that assumption explicit.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      6d2aa549
  2. 01 3月, 2016 3 次提交
  3. 27 2月, 2016 3 次提交
  4. 26 2月, 2016 7 次提交
  5. 25 2月, 2016 11 次提交
  6. 24 2月, 2016 14 次提交