1. 19 Oct, 2016 1 commit
  2. 07 Sep, 2016 1 commit
    • Mickaël Salaün's avatar
      um/ptrace: Fix the syscall number update after a ptrace · ce29856a
      Mickaël Salaün authored
      Update the syscall number after each PTRACE_SETREGS on ORIG_*AX.
      
      This is needed to get the potentially altered syscall number in the
      seccomp filters after RET_TRACE.
      
      This fix four seccomp_bpf tests:
      > [ RUN      ] TRACE_syscall.skip_after_RET_TRACE
      > seccomp_bpf.c:1560:TRACE_syscall.skip_after_RET_TRACE:Expected -1 (18446744073709551615) == syscall(39) (26)
      > seccomp_bpf.c:1561:TRACE_syscall.skip_after_RET_TRACE:Expected 1 (1) == (*__errno_location ()) (22)
      > [     FAIL ] TRACE_syscall.skip_after_RET_TRACE
      > [ RUN      ] TRACE_syscall.kill_after_RET_TRACE
      > TRACE_syscall.kill_after_RET_TRACE: Test exited normally instead of by signal (code: 1)
      > [     FAIL ] TRACE_syscall.kill_after_RET_TRACE
      > [ RUN      ] TRACE_syscall.skip_after_ptrace
      > seccomp_bpf.c:1622:TRACE_syscall.skip_after_ptrace:Expected -1 (18446744073709551615) == syscall(39) (26)
      > seccomp_bpf.c:1623:TRACE_syscall.skip_after_ptrace:Expected 1 (1) == (*__errno_location ()) (22)
      > [     FAIL ] TRACE_syscall.skip_after_ptrace
      > [ RUN      ] TRACE_syscall.kill_after_ptrace
      > TRACE_syscall.kill_after_ptrace: Test exited normally instead of by signal (code: 1)
      > [     FAIL ] TRACE_syscall.kill_after_ptrace
      
      Fixes: 26703c63 ("um/ptrace: run seccomp after ptrace")
      Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: James Morris <jmorris@namei.org>
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      ce29856a
  3. 09 Aug, 2016 1 commit
    • Mickaël Salaün's avatar
      um/ptrace: Fix the syscall number update after a ptrace · 4b056a4b
      Mickaël Salaün authored
      Update the syscall number after each PTRACE_SETREGS on ORIG_*AX.
      
      This is needed to get the potentially altered syscall number in the
      seccomp filters after RET_TRACE.
      
      This fix four seccomp_bpf tests:
      > [ RUN      ] TRACE_syscall.skip_after_RET_TRACE
      > seccomp_bpf.c:1560:TRACE_syscall.skip_after_RET_TRACE:Expected -1 (18446744073709551615) == syscall(39) (26)
      > seccomp_bpf.c:1561:TRACE_syscall.skip_after_RET_TRACE:Expected 1 (1) == (*__errno_location ()) (22)
      > [     FAIL ] TRACE_syscall.skip_after_RET_TRACE
      > [ RUN      ] TRACE_syscall.kill_after_RET_TRACE
      > TRACE_syscall.kill_after_RET_TRACE: Test exited normally instead of by signal (code: 1)
      > [     FAIL ] TRACE_syscall.kill_after_RET_TRACE
      > [ RUN      ] TRACE_syscall.skip_after_ptrace
      > seccomp_bpf.c:1622:TRACE_syscall.skip_after_ptrace:Expected -1 (18446744073709551615) == syscall(39) (26)
      > seccomp_bpf.c:1623:TRACE_syscall.skip_after_ptrace:Expected 1 (1) == (*__errno_location ()) (22)
      > [     FAIL ] TRACE_syscall.skip_after_ptrace
      > [ RUN      ] TRACE_syscall.kill_after_ptrace
      > TRACE_syscall.kill_after_ptrace: Test exited normally instead of by signal (code: 1)
      > [     FAIL ] TRACE_syscall.kill_after_ptrace
      
      Fixes: 26703c63 ("um/ptrace: run seccomp after ptrace")
      Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: James Morris <jmorris@namei.org>
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      4b056a4b
  4. 21 May, 2016 1 commit
    • 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
  5. 25 Jun, 2015 1 commit
  6. 02 Nov, 2011 5 commits
  7. 15 Sep, 2011 2 commits
  8. 28 Oct, 2010 2 commits
  9. 05 Feb, 2008 1 commit
  10. 29 Oct, 2007 1 commit
  11. 16 Oct, 2007 2 commits
  12. 31 Aug, 2007 1 commit
  13. 11 Feb, 2007 1 commit
  14. 27 Mar, 2006 1 commit
    • Bodo Stroesser's avatar
      [PATCH] uml: more carefully test whether we are in a system call · 81efcd33
      Bodo Stroesser authored
      For security reasons, UML in is_syscall() needs to have access to code in
      vsyscall-page.  The current implementation grants this access by explicitly
      allowing access to vsyscall in access_ok_skas().  With this change,
      copy_from_user() may be used to read the code.  Ptrace access to vsyscall-page
      for debugging already was implemented in get_user_pages() by mainline.  In
      i386, copy_from_user can't access vsyscall-page, but returns EFAULT.
      
      To make UML behave as i386 does, I changed is_syscall to use
      access_process_vm(current) to read the code from vsyscall-page.  This doesn't
      hurt security, but simplifies the code and prepares implementation of
      stub-vmas.
      Signed-off-by: default avatarBodo Stroesser <bstroesser@fujitsu-siemens.com>
      Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      81efcd33
  15. 20 May, 2005 1 commit
    • Jeff Dike's avatar
      [PATCH] uml: small fixes left over from rc4 · ba9950c8
      Jeff Dike authored
      Some changes that I sent in didn't make 2.6.12-rc4 for some reason.  This
      adds them back.  We have
      	an x86_64 definition of TOP_ADDR
      	a reimplementation of the x86_64 csum_partial_copy_from_user
      	some syntax fixes in arch/um/kernel/ptrace.c
      	removal of a CFLAGS definition in the x86_64 Makefile
      	some include changes in the x86_64 ptrace.c and user-offsets.h
      	a syntax fix in elf-x86_64.h
      Also moved an include in the i386 and x86_64 Makefiles to make the symlinks
      work, and some small fixes from Al Viro.
      Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
      Cc: <viro@parcelfarce.linux.theplanet.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      ba9950c8
  16. 07 May, 2005 1 commit
    • Bodo Stroesser's avatar
      [PATCH] uml: S390 preparation, peekusr/pokeusr defined by subarch · 82c1c11b
      Bodo Stroesser authored
      s390 needs to change some parts of arch/um/kernel/ptrace.c.  Thus, the code
      regarding PEEKUSER and POKEUSER are shifted to arch/um/sys-<subarch>/ptrace.c.
      
      Also s390 debug registers need to be updated, when singlestepping is switched
      on / off.  Thus, setting/resetting of singlestepping is centralized in the new
      function set_singlestep(), which also inserts the macro
      SUBARCH_SET_SINGLESTEP(mode), if defined.
      
      Finally, s390 has the "ieee_instruction_pointer" in its
      registers, which also is allowed to be read via
      
        ptrace( PTRACE_PEEKUSER, getpid(), PT_IEEE_IP, 0);
      
      To implement this feature, sys_ptrace inserts the macro
      SUBARCH_PTRACE_SPECIAL, if defined.
      Signed-off-by: default avatarBodo Stroesser <bstroesser@fujitsu-siemens.com>
      Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      82c1c11b
  17. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4