1. 29 Jun, 2017 9 commits
  2. 26 Jun, 2017 3 commits
  3. 23 Jun, 2017 2 commits
    • Mark Rutland's avatar
      arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels · 8486e54d
      Mark Rutland authored
      When a kernel is built without CONFIG_ARM64_MODULE_PLTS, we don't
      generate the expected branch instruction in ftrace_make_nop(). This
      means we pass zero (rather than a valid branch) to ftrace_modify_code()
      as the expected instruction to validate. This causes us to return
      -EINVAL to the core ftrace code for a valid case, resulting in a splat
      at boot time.
      
      This was an unintended effect of commit:
      
        68764420 ("arm64: ftrace: fix building without CONFIG_MODULES")
      
      ... which incorrectly moved the generation of the branch instruction
      into the ifdef for CONFIG_ARM64_MODULE_PLTS.
      
      This patch fixes the issue by moving the ifdef inside of the relevant
      if-else case, and always checking that the branch is in range,
      regardless of CONFIG_ARM64_MODULE_PLTS. This ensures that we generate
      the expected branch instruction, and also improves our sanity checks.
      
      For consistency, both ftrace_make_nop() and ftrace_make_call() are
      updated with this pattern.
      
      Fixes: 68764420 ("arm64: ftrace: fix building without CONFIG_MODULES")
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reported-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      8486e54d
    • Dave Martin's avatar
      arm64: signal: Allow expansion of the signal frame · 33f08261
      Dave Martin authored
      This patch defines an extra_context signal frame record that can be
      used to describe an expanded signal frame, and modifies the context
      block allocator and signal frame setup and parsing code to create,
      populate, parse and decode this block as necessary.
      
      To avoid abuse by userspace, parse_user_sigframe() attempts to
      ensure that:
      
       * no more than one extra_context is accepted;
       * the extra context data is a sensible size, and properly placed
         and aligned.
      
      The extra_context data is required to start at the first 16-byte
      aligned address immediately after the dummy terminator record
      following extra_context in rt_sigframe.__reserved[] (as ensured
      during signal delivery).  This serves as a sanity-check that the
      signal frame has not been moved or copied without taking the extra
      data into account.
      Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      [will: add __force annotation when casting extra_datap to __user pointer]
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      33f08261
  4. 22 Jun, 2017 19 commits
  5. 20 Jun, 2017 7 commits