All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

  1. 31 May, 2016 1 commit
  2. 24 Feb, 2016 1 commit
    • Ard Biesheuvel's avatar
      arm64: switch to relative exception tables · 6c94f27a
      Ard Biesheuvel authored
      Instead of using absolute addresses for both the exception location
      and the fixup, use offsets relative to the exception table entry values.
      Not only does this cut the size of the exception table in half, it is
      also a prerequisite for KASLR, since absolute exception table entries
      are subject to dynamic relocation, which is incompatible with the sorting
      of the exception table that occurs at build time.
      
      This patch also introduces the _ASM_EXTABLE preprocessor macro (which
      exists on x86 as well) and its _asm_extable assembly counterpart, as
      shorthands to emit exception table entries.
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      6c94f27a
  3. 18 Feb, 2016 2 commits
    • James Morse's avatar
      arm64: kernel: Don't toggle PAN on systems with UAO · 70544196
      James Morse authored
      If a CPU supports both Privileged Access Never (PAN) and User Access
      Override (UAO), we don't need to disable/re-enable PAN round all
      copy_to_user() like calls.
      
      UAO alternatives cause these calls to use the 'unprivileged' load/store
      instructions, which are overridden to be the privileged kind when
      fs==KERNEL_DS.
      
      This patch changes the copy_to_user() calls to have their PAN toggling
      depend on a new composite 'feature' ARM64_ALT_PAN_NOT_UAO.
      
      If both features are detected, PAN will be enabled, but the copy_to_user()
      alternatives will not be applied. This means PAN will be enabled all the
      time for these functions. If only PAN is detected, the toggling will be
      enabled as normal.
      
      This will save the time taken to disable/re-enable PAN, and allow us to
      catch copy_to_user() accesses that occur with fs==KERNEL_DS.
      
      Futex and swp-emulation code continue to hang their PAN toggling code on
      ARM64_HAS_PAN.
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      70544196
    • James Morse's avatar
      arm64: kernel: Add support for User Access Override · 57f4959b
      James Morse authored
      'User Access Override' is a new ARMv8.2 feature which allows the
      unprivileged load and store instructions to be overridden to behave in
      the normal way.
      
      This patch converts {get,put}_user() and friends to use ldtr*/sttr*
      instructions - so that they can only access EL0 memory, then enables
      UAO when fs==KERNEL_DS so that these functions can access kernel memory.
      
      This allows user space's read/write permissions to be checked against the
      page tables, instead of testing addr<USER_DS, then using the kernel's
      read/write permissions.
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      [catalin.marinas@arm.com: move uao_thread_switch() above dsb()]
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      57f4959b
  4. 27 Jul, 2015 1 commit
  5. 13 Jan, 2015 2 commits
  6. 20 Mar, 2014 1 commit
  7. 19 Dec, 2013 1 commit
  8. 25 Sep, 2013 1 commit
    • AKASHI Takahiro's avatar
      arm64: avoid multiple evaluation of ptr in get_user/put_user() · 1f65c13e
      AKASHI Takahiro authored
      get_user() is defined as a function macro in arm64, and trace_get_user()
      calls it as followed:
           get_user(ch, ptr++);
      Since the second parameter occurs twice in the definition, 'ptr++' is
      unexpectedly evaluated twice and trace_get_user() will generate a bogus
      string from user-provided one. As a result, some ftrace sysfs operations,
      like "echo FUNCNAME > set_ftrace_filter," hit this case and eventually fail.
      This patch fixes the issue both in get_user() and put_user().
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      [catalin.marinas@arm.com: added __user type annotation and s/optr/__p/]
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      1f65c13e
  9. 28 May, 2013 1 commit
  10. 17 Sep, 2012 1 commit