)]}'
{
  "commit": "a65d17c9d27a85782cfe1bbc36c747ffa1f81814",
  "tree": "5e8fe6c190f9fe5624ecd694948226892e65ca38",
  "parents": [
    "8f6da52aeff1fd7272ff5082552a39c050565b57"
  ],
  "author": {
    "name": "John Blackwood",
    "email": "john.blackwood@ccur.com",
    "time": "Sun Feb 12 14:34:58 2006 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Sun Feb 12 16:10:47 2006 -0800"
  },
  "message": "[PATCH] arch/x86_64/kernel/traps.c PTRACE_SINGLESTEP oops\n\nWe found a problem with x86_64 kernels with preemption enabled, where\nhaving multiple tasks doing ptrace singlesteps around the same time will\ncause the system to \u0027oops\u0027.  The problem seems that a task can get\npreempted out of the do_debug() processing while it is running on the\nDEBUG_STACK stack.  If another task on that same cpu then enters do_debug()\nand uses the same per-cpu DEBUG_STACK stack, the previous preempted tasks\u0027s\nstack contents can be corrupted, and the system will oops when the\npreempted task is context switched back in again.\n\nThe typical oops looks like the following:\n\n  Unable to handle kernel paging request at ffffffffffffffae RIP: \u003cffffffff805452a1\u003e{thread_return+34}\n  PGD 103027 PUD 102429067 PMD 0\n  Oops: 0002 [1] PREEMPT SMP\n  CPU 0\n  Modules linked in:\n  Pid: 3786, comm: ssdd Not tainted 2.6.15.2 #1\n  RIP: 0010:[\u003cffffffff805452a1\u003e] \u003cffffffff805452a1\u003e{thread_return+34}\n  RSP: 0018:ffffffff80824058  EFLAGS: 000136c2\n  RAX: ffff81017e12cea0 RBX: 0000000000000000 RCX: 00000000c0000100\n  RDX: 0000000000000000 RSI: ffff8100f7856e20 RDI: ffff81017e12cea0\n  RBP: 0000000000000046 R08: ffff8100f68a6000 R09: 0000000000000000\n  R10: 0000000000000000 R11: ffff81017e12cea0 R12: ffff81000c2d53e8\n  R13: ffff81017f5b3be8 R14: ffff81000c0036e0 R15: 000001056cbfc899\n  FS:  00002aaaaaad9b00(0000) GS:ffffffff80883800(0000) knlGS:0000000000000000\n  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n  CR2: ffffffffffffffae CR3: 00000000f6fcf000 CR4: 00000000000006e0\n  Process ssdd (pid: 3786, threadinfo ffff8100f68a6000, task ffff8100f7856e20)\n  Stack: ffffffff808240d8 ffffffff8012a84a ffff8100055f6c00 0000000000000020\n         0000000000000001 ffff81000c0036e0 ffffffff808240b8 0000000000000000\n         0000000000000000 0000000000000000\n  Call Trace: \u003c#DB\u003e\n\t\u003cffffffff8012a84a\u003e{try_to_wake_up+985}\n\t\u003cffffffff8012c0d3\u003e{kick_process+87}\n        \u003cffffffff8013b262\u003e{signal_wake_up+48}\n\t\u003cffffffff8013b5ce\u003e{specific_send_sig_info+179}\n        \u003cffffffff80546abc\u003e{_spin_unlock_irqrestore+27}\n\t\u003cffffffff8013b67c\u003e{force_sig_info+159}\n        \u003cffffffff801103a0\u003e{do_debug+289} \u003cffffffff80110278\u003e{sync_regs+103}\n        \u003cffffffff8010ed9a\u003e{paranoid_userspace+35}\n  Unable to handle kernel paging request at 00007fffffb7d000 RIP: \u003cffffffff8010f2e4\u003e{show_trace+465}\n  PGD f6f25067 PUD f6fcc067 PMD f6957067 PTE 0\n  Oops: 0000 [2] PREEMPT SMP\n\nThis patch disables preemptions for the task upon entry to do_debug(), before\ninterrupts are reenabled, and then disables preemption before exiting\ndo_debug(), after disabling interrupts.  I\u0027ve noticed that the task can be\npreempted either at the end of an interrupt, or on the call to\nforce_sig_info() on the spin_unlock_irqrestore() processing.  It might be\nbetter to attempt to code a fix in entry.S around the code that calls\ndo_debug().\n\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee1b2da9e5e7d168de7de4053eaaed737dd4c3e9",
      "old_mode": 33188,
      "old_path": "arch/x86_64/kernel/traps.c",
      "new_id": "28d50dc540e89c2633770e4087bcef476c101e09",
      "new_mode": 33188,
      "new_path": "arch/x86_64/kernel/traps.c"
    }
  ]
}
