1. 01 Sep, 2019 1 commit
    • Max Filippov's avatar
      xtensa: add support for call0 ABI in userspace · 09f8a6db
      Max Filippov authored
      Provide a Kconfig choice to select whether only the default ABI, only
      call0 ABI or both are supported. The default for XEA2 is windowed, but
      it may change for XEA3. Call0 only runs userspace with PS.WOE disabled.
      Supporting both windowed and call0 ABIs is tricky, as there's no
      indication in the ELF binaries which ABI they use. So it is done by
      probing: each process is started with PS.WOE disabled, but the handler
      of an illegal instruction exception taken with PS.WOE retries faulting
      instruction after enabling PS.WOE. It must happen before any signal is
      delivered to the process, otherwise it may be delivered incorrectly.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  2. 27 May, 2019 1 commit
  3. 04 Jan, 2019 1 commit
    • Linus Torvalds's avatar
      Remove 'type' argument from access_ok() function · 96d4f267
      Linus Torvalds authored
      Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
      of the user address range verification function since we got rid of the
      old racy i386-only code to walk page tables by hand.
      It existed because the original 80386 would not honor the write protect
      bit when in kernel mode, so you had to do COW by hand before doing any
      user access.  But we haven't supported that in a long time, and these
      days the 'type' argument is a purely historical artifact.
      A discussion about extending 'user_access_begin()' to do the range
      checking resulted this patch, because there is no way we're going to
      move the old VERIFY_xyz interface to that model.  And it's best done at
      the end of the merge window when I've done most of my merges, so let's
      just get this done once and for all.
      This patch was mostly done with a sed-script, with manual fix-ups for
      the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
      There were a couple of notable cases:
       - csk...
  4. 17 Dec, 2018 1 commit
  5. 17 Dec, 2017 1 commit
  6. 01 May, 2017 1 commit
  7. 02 Mar, 2017 1 commit
  8. 24 Dec, 2016 1 commit
  9. 12 Apr, 2015 2 commits
  10. 13 Feb, 2015 1 commit
    • Andy Lutomirski's avatar
      all arches, signal: move restart_block to struct task_struct · f56141e3
      Andy Lutomirski authored
      If an attacker can cause a controlled kernel stack overflow, overwriting
      the restart block is a very juicy exploit target.  This is because the
      restart_block is held in the same memory allocation as the kernel stack.
      Moving the restart block to struct task_struct prevents this exploit by
      making the restart_block harder to locate.
      Note that there are other fields in thread_info that are also easy
      targets, at least on some architectures.
      It's also a decent simplification, since the restart code is more or less
      identical on all architectures.
      [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: David Miller <davem@davemloft.net>
      Acked-by: default avatarRichard Weinberger <richard@nod.at>
      Cc: Richard H...
  11. 06 Aug, 2014 1 commit
  12. 15 Oct, 2013 1 commit
  13. 24 Feb, 2013 1 commit
    • Chris Zankel's avatar
      xtensa: add support for TLS · c50842df
      Chris Zankel authored
      The Xtensa architecture provides a global register called THREADPTR
      for the purpose of Thread Local Storage (TLS) support. This allows us
      to use a fairly simple implementation, keeping the thread pointer in
      the regset and simply saving and restoring it upon entering/exiting
      the from user space.
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
  14. 03 Feb, 2013 1 commit
  15. 19 Dec, 2012 1 commit
  16. 01 Oct, 2012 2 commits
  17. 04 Jun, 2012 1 commit
  18. 01 Jun, 2012 6 commits
  19. 24 May, 2012 1 commit
  20. 22 May, 2012 3 commits
  21. 23 Apr, 2012 1 commit
  22. 22 Mar, 2012 4 commits
  23. 14 Feb, 2008 3 commits
    • Chris Zankel's avatar
      [XTENSA] Add support for the sa_restorer function · 44c64e6b
      Chris Zankel authored
      Supporting the sa_restorer function allows for better security
      since the sigreturn system call doesn't need to be placed on
      the stack, so the stack doesn't need to be executable. This
      requires support from the c-library as it has to provide the
      restorer function.
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
    • Chris Zankel's avatar
      [XTENSA] Add support for configurable registers and coprocessors · c658eac6
      Chris Zankel authored
      The Xtensa architecture allows to define custom instructions and
      registers. Registers that are bound to a coprocessor are only
      accessible if the corresponding enable bit is set, which allows
      to implement a 'lazy' context switch mechanism. Other registers
      needs to be saved and restore at the time of the context switch
      or during interrupt handling.
      This patch adds support for these additional states:
      - save and restore registers that are used by the compiler upon
        interrupt entry and exit.
      - context switch additional registers unbound to any coprocessor
      - 'lazy' context switch of registers bound to a coprocessor
      - ptrace interface to provide access to additional registers
      - update configuration files in include/asm-xtensa/variant-fsf
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
    • Chris Zankel's avatar
      [XTENSA] Remove oldmask from sigcontext and fix register flush · 3befce8f
      Chris Zankel authored
      Remove oldmask from the sigcontext structure. Also update wmask
      and windowstart when we flush the AR registers to stack.
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
  24. 01 Jun, 2007 1 commit
    • Chris Zankel's avatar
      [XTENSA] Remove non-rt signal handling · 29c4dfd9
      Chris Zankel authored
      The non-rt signal handling was never really used, so we don't break
      anything. This patch also cleans up the signal stack-frame to make
      it independent from the processor configuration. It also improves
      the method used for controlling single-stepping. We now save and
      restore the 'icountlevel' register that controls single stepping
      and set or clear the saved state to enable or disable it.
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
  25. 08 May, 2007 1 commit
  26. 10 Dec, 2006 1 commit