1. 23 May, 2016 1 commit
  2. 21 May, 2016 3 commits
    • Eli Cooper's avatar
      um: add extended processor state save/restore support · a78ff111
      Eli Cooper authored
      This patch extends save_fp_registers() and restore_fp_registers() to use
      PTRACE_GETREGSET and PTRACE_SETREGSET with the XSTATE note type, adding
      support for new processor state extensions between context switches.
      
      When the new ptrace requests are unavailable, it falls back to the old
      PTRACE_GETFPREGS and PTRACE_SETFPREGS methods, which have been renamed to
      save_i387_registers() and restore_i387_registers().
      
      Now these functions expect *fp_regs to have the space of an _xstate struct.
      Thus, this also makes ptrace in UML responde to PTRACE_GETFPREGS/_SETFPREG
      requests with a user_i387_struct (thus independent from HOST_FP_SIZE), and
      by calling save_i387_registers() and restore_i387_registers() instead of
      the extended save_fp_registers() and restore_fp_registers() functions.
      Signed-off-by: default avatarEli Cooper <elicooper@gmx.com>
      a78ff111
    • Eli Cooper's avatar
      um: extend fpstate to _xstate to support YMM registers · b6024b21
      Eli Cooper authored
      Extends fpstate to _xstate, in order to hold AVX/YMM registers.
      
      To avoid oversized stack frame, the following functions have been
      refactored by using malloc.
       - sig_handler_common
       - timer_real_alarm_handler
      Signed-off-by: default avatarEli Cooper <elicooper@gmx.com>
      b6024b21
    • Eli Cooper's avatar
      um: fix FPU state preservation around signal handlers · 6de5a8a5
      Eli Cooper authored
      This patch makes UML saves/restores FPU state from/to the fpstate in
      pt_regs when setting up or returning from a signal stack, rather than
      calling ptrace directly. This ensures that FPU state is correctly
      preserved around signal handlers in a multi-threaded scenario.
      Signed-off-by: default avatarEli Cooper <elicooper@gmx.com>
      6de5a8a5
  3. 13 Mar, 2016 2 commits
    • Alexander Duyck's avatar
      ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short · 1e940829
      Alexander Duyck authored
      This patch updates csum_ipv6_magic so that it correctly recognizes that
      protocol is a unsigned 8 bit value.
      
      This will allow us to better understand what limitations may or may not be
      present in how we handle the data.  For example there are a number of
      places that call htonl on the protocol value.  This is likely not necessary
      and can be replaced with a multiplication by ntohl(1) which will be
      converted to a shift by the compiler.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e940829
    • Alexander Duyck's avatar
      ipv4: Update parameters for csum_tcpudp_magic to their original types · 01cfbad7
      Alexander Duyck authored
      This patch updates all instances of csum_tcpudp_magic and
      csum_tcpudp_nofold to reflect the types that are usually used as the source
      inputs.  For example the protocol field is populated based on nexthdr which
      is actually an unsigned 8 bit value.  The length is usually populated based
      on skb->len which is an unsigned integer.
      
      This addresses an issue in which the IPv6 function csum_ipv6_magic was
      generating a checksum using the full 32b of skb->len while
      csum_tcpudp_magic was only using the lower 16 bits.  As a result we could
      run into issues when attempting to adjust the checksum as there was no
      protocol agnostic way to update it.
      
      With this change the value is still truncated as many architectures use
      "(len + proto) << 8", however this truncation only occurs for values
      greater than 16776960 in length and as such is unlikely to occur as we stop
      the inner headers at ~64K in size.
      
      I did have to make a few minor changes in the arm, mn10300, nios2, and
      score versions of the function in order to support these changes as they
      were either using things such as an OR to combine the protocol and length,
      or were using ntohs to convert the length which would have truncated the
      value.
      
      I also updated a few spots in terms of whitespace and type differences for
      the addresses.  Most of this was just to make sure all of the definitions
      were in sync going forward.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      01cfbad7
  4. 05 Mar, 2016 1 commit
  5. 30 Jan, 2016 1 commit
  6. 29 Jan, 2016 3 commits
  7. 12 Jan, 2016 1 commit
  8. 10 Jan, 2016 3 commits
    • Mickaël Salaün's avatar
      um: Fix build error and kconfig for i386 · 42d91f61
      Mickaël Salaün authored
      Fix build error by generating elfcore.o only when ELF_CORE (depending on
      COREDUMP) is selected:
      
      arch/x86/um/built-in.o: In function `elf_core_write_extra_phdrs':
      (.text+0x3e62): undefined reference to `dump_emit'
      arch/x86/um/built-in.o: In function `elf_core_write_extra_data':
      (.text+0x3eef): undefined reference to `dump_emit'
      
      Fixes: 5d2acfc7 ("kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT")
      Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      42d91f61
    • Mickaël Salaün's avatar
      um: Add full asm/syscall.h support · d8f8b844
      Mickaël Salaün authored
      Add subarchitecture-independent implementation of asm-generic/syscall.h
      allowing access to user system call parameters and results:
      * syscall_get_nr()
      * syscall_rollback()
      * syscall_get_error()
      * syscall_get_return_value()
      * syscall_set_return_value()
      * syscall_get_arguments()
      * syscall_set_arguments()
      * syscall_get_arch() provided by arch/x86/um/asm/syscall.h
      
      This provides the necessary syscall helpers needed by
      HAVE_ARCH_SECCOMP_FILTER plus syscall_get_error().
      
      This is inspired from Meredydd Luff's patch
      (https://gerrit.chromium.org/gerrit/21425).
      Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Meredydd Luff <meredydd@senatehouse.org>
      Cc: David Drysdale <drysdale@google.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      d8f8b844
    • Mickaël Salaün's avatar
      um: Fix ptrace GETREGS/SETREGS bugs · e04c989e
      Mickaël Salaün authored
      This fix two related bugs:
      * PTRACE_GETREGS doesn't get the right orig_ax (syscall) value
      * PTRACE_SETREGS can't set the orig_ax value (erased by initial value)
      
      Get rid of the now useless and error-prone get_syscall().
      
      Fix inconsistent behavior in the ptrace implementation for i386 when
      updating orig_eax automatically update the syscall number as well. This
      is now updated in handle_syscall().
      Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Thomas Meyer <thomas@m3y3r.de>
      Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
      Cc: Anton Ivanov <aivanov@brocade.com>
      Cc: Meredydd Luff <meredydd@senatehouse.org>
      Cc: David Drysdale <drysdale@google.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      e04c989e
  9. 22 Dec, 2015 1 commit
  10. 08 Dec, 2015 1 commit
  11. 06 Nov, 2015 3 commits
  12. 19 Oct, 2015 1 commit
  13. 14 Oct, 2015 1 commit
  14. 09 Oct, 2015 2 commits
  15. 06 Jul, 2015 1 commit
  16. 25 Jun, 2015 1 commit
  17. 03 Jun, 2015 1 commit
    • Ingo Molnar's avatar
      x86/asm/entry: Move the 'thunk' functions to arch/x86/entry/ · e6b93f4e
      Ingo Molnar authored
      These are all calling x86 entry code functions, so move them close
      to other entry code.
      
      Change lib-y to obj-y: there's no real difference between the two
      as we don't really drop any of them during the linking stage, and
      obj-y is the more common approach for core kernel object code.
      
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e6b93f4e
  18. 31 May, 2015 7 commits
  19. 19 May, 2015 2 commits
  20. 13 Apr, 2015 4 commits