1. 17 7月, 2008 2 次提交
    • R
      x86 ptrace: user-sets-TF nits · 380fdd75
      Roland McGrath 提交于
      This closes some arcane holes in single-step handling that can arise
      only when user programs set TF directly (via popf or sigreturn) and
      then use vDSO (syscall/sysenter) system call entry.  In those entry
      paths, the clear_TF_reenable case hits and we must check TIF_SINGLESTEP
      to be sure our bookkeeping stays correct wrt the user's view of TF.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      380fdd75
    • R
      x86 ptrace: unify syscall tracing · d4d67150
      Roland McGrath 提交于
      This unifies and cleans up the syscall tracing code on i386 and x86_64.
      
      Using a single function for entry and exit tracing on 32-bit made the
      do_syscall_trace() into some terrible spaghetti.  The logic is clear and
      simple using separate syscall_trace_enter() and syscall_trace_leave()
      functions as on 64-bit.
      
      The unification adds PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support
      on x86_64, for 32-bit ptrace() callers and for 64-bit ptrace() callers
      tracing either 32-bit or 64-bit tasks.  It behaves just like 32-bit.
      
      Changing syscall_trace_enter() to return the syscall number shortens
      all the assembly paths, while adding the SYSEMU feature in a simple way.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      d4d67150
  2. 01 7月, 2008 1 次提交
  3. 14 5月, 2008 1 次提交
  4. 26 4月, 2008 2 次提交
  5. 17 4月, 2008 1 次提交
  6. 27 3月, 2008 1 次提交
    • A
      x86: ptrace.c: fix defined-but-unused warnings · d8d4f157
      Andrew Morton 提交于
      arch/x86/kernel/ptrace.c:548: warning: 'ptrace_bts_get_size' defined but not used
      arch/x86/kernel/ptrace.c:558: warning: 'ptrace_bts_read_record' defined but not used
      arch/x86/kernel/ptrace.c:607: warning: 'ptrace_bts_clear' defined but not used
      arch/x86/kernel/ptrace.c:617: warning: 'ptrace_bts_drain' defined but not used
      arch/x86/kernel/ptrace.c:720: warning: 'ptrace_bts_config' defined but not used
      arch/x86/kernel/ptrace.c:788: warning: 'ptrace_bts_status' defined but not used
      
      Cc: Roland McGrath <roland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      d8d4f157
  7. 12 3月, 2008 1 次提交
    • R
      x86: ia32 syscall restart fix · 40f0933d
      Roland McGrath 提交于
      The code to restart syscalls after signals depends on checking for a
      negative orig_ax, and for particular negative -ERESTART* values in ax.
      These fields are 64 bits and for a 32-bit task they get zero-extended.
      The syscall restart behavior is lost, a regression from a native 32-bit
      kernel and from 64-bit tasks' behavior.
      
      This patch fixes the problem by doing sign-extension where it matters.
      
      For orig_ax, the only time the value should be -1 but winds up as
      0x0ffffffff is via a 32-bit ptrace call. So the patch changes ptrace to
      sign-extend the 32-bit orig_eax value when it's stored; it doesn't
      change the checks on orig_ax, though it uses the new current_syscall()
      inline to better document the subtle importance of the used of
      signedness there.
      
      The ax value is stored a lot of ways and it seems hard to get them all
      sign-extended at their origins. So for that, we use the
      current_syscall_ret() to sign-extend it only for 32-bit tasks at the
      time of the -ERESTART* comparisons.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      40f0933d
  8. 08 3月, 2008 1 次提交
    • R
      x86_64: make ptrace always sign-extend orig_ax to 64 bits · 84c6f604
      Roland McGrath 提交于
      This makes 64-bit ptrace calls setting the 64-bit orig_ax field for a
      32-bit task sign-extend the low 32 bits up to 64.  This matches what a
      64-bit debugger expects when tracing a 32-bit task.
      
      This follows on my "x86_64 ia32 syscall restart fix".  This didn't
      matter until that was fixed.
      
      The debugger ignores or zeros the high half of every register slot it
      sets (including the orig_rax pseudo-register) uniformly.  It expects
      that the setting of the low 32 bits always has the same meaning as a
      32-bit debugger setting those same 32 bits with native 32-bit
      facilities.
      
      This never arose before because the syscall restart check never
      matched any -ERESTART* values due to lack of sign extension.  Before
      that fix, even 32-bit ptrace setting orig_eax to -1 failed to trigger
      the restart check anyway.  So this was never noticed as a regression
      of 64-bit debuggers vs 32-bit debuggers on the same 64-bit kernel.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      [ Changed to just do the sign-extension unconditionally on x86-64,
        since orig_ax is always just a small integer and doesn't need
        the full 64-bit range ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      84c6f604
  9. 01 3月, 2008 1 次提交
  10. 22 2月, 2008 1 次提交
  11. 07 2月, 2008 1 次提交
  12. 30 1月, 2008 27 次提交