)]}'
{
  "log": [
    {
      "commit": "d184d6eb1dc3c9869e25a8e422be5c55ab0db4ac",
      "tree": "efb6fbc6339ba1ce3905e3343299a4d5141da3c6",
      "parents": [
        "dcace06cc29df927a74a6bc0e57b9bef87704377"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Jul 08 19:14:17 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sun Jul 17 20:23:52 2011 +0200"
      },
      "message": "ptrace: dont send SIGSTOP on auto-attach if PT_SEIZED\n\nThe fake SIGSTOP during attach has numerous problems. PTRACE_SEIZE\nis already fine, but we have basically the same problems is SIGSTOP\nis sent on auto-attach, the tracer can\u0027t know if this signal signal\nshould be cancelled or not.\n\nChange ptrace_event() to set JOBCTL_TRAP_STOP if the new child is\nPT_SEIZED, this triggers the PTRACE_EVENT_STOP report.\n\nThereafter a PT_SEIZED task can never report the bogus SIGSTOP.\n\nTest-case:\n\n\t#define PTRACE_SEIZE\t\t0x4206\n\t#define PTRACE_SEIZE_DEVEL\t0x80000000\n\t#define PTRACE_EVENT_STOP\t7\n\t#define WEVENT(s)\t\t((s \u0026 0xFF0000) \u003e\u003e 16)\n\n\tint main(void)\n\t{\n\t\tint child, grand_child, status;\n\t\tlong message;\n\n\t\tchild \u003d fork();\n\t\tif (!child) {\n\t\t\tkill(getpid(), SIGSTOP);\n\t\t\tfork();\n\t\t\tassert(0);\n\t\t\treturn 0x23;\n\t\t}\n\n\t\tassert(ptrace(PTRACE_SEIZE, child, 0,PTRACE_SEIZE_DEVEL) \u003d\u003d 0);\n\t\tassert(wait(\u0026status) \u003d\u003d child);\n\t\tassert(WIFSTOPPED(status) \u0026\u0026 WSTOPSIG(status) \u003d\u003d SIGSTOP);\n\n\t\tassert(ptrace(PTRACE_SETOPTIONS, child, 0, PTRACE_O_TRACEFORK) \u003d\u003d 0);\n\n\t\tassert(ptrace(PTRACE_CONT, child, 0,0) \u003d\u003d 0);\n\t\tassert(waitpid(child, \u0026status, 0) \u003d\u003d child);\n\t\tassert(WIFSTOPPED(status) \u0026\u0026 WSTOPSIG(status) \u003d\u003d SIGTRAP);\n\t\tassert(WEVENT(status) \u003d\u003d PTRACE_EVENT_FORK);\n\n\t\tassert(ptrace(PTRACE_GETEVENTMSG, child, 0, \u0026message) \u003d\u003d 0);\n\t\tgrand_child \u003d message;\n\n\t\tassert(waitpid(grand_child, \u0026status, 0) \u003d\u003d grand_child);\n\t\tassert(WIFSTOPPED(status) \u0026\u0026 WSTOPSIG(status) \u003d\u003d SIGTRAP);\n\t\tassert(WEVENT(status) \u003d\u003d PTRACE_EVENT_STOP);\n\n\t\tkill(child, SIGKILL);\n\t\tkill(grand_child, SIGKILL);\n\t\treturn 0;\n\t}\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "dcace06cc29df927a74a6bc0e57b9bef87704377",
      "tree": "9a04518032869b1ed79933026379ea0d7081e43a",
      "parents": [
        "6634ae1033ceaeca5877dd75723210f8c2648c17"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Jul 08 19:13:54 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sun Jul 17 20:23:51 2011 +0200"
      },
      "message": "ptrace: mv send-SIGSTOP from do_fork() to ptrace_init_task()\n\nIf the new child is traced, do_fork() adds the pending SIGSTOP.\nIt assumes that either it is traced because of auto-attach or the\ntracer attached later, in both cases sigaddset/set_thread_flag is\ncorrect even if SIGSTOP is already pending.\n\nNow that we have PTRACE_SEIZE this is no longer right in the latter\ncase. If the tracer does PTRACE_SEIZE after copy_process() makes the\nchild visible the queued SIGSTOP is wrong.\n\nWe could check PT_SEIZED bit and change ptrace_attach() to set both\nPT_PTRACED and PT_SEIZED bits simultaneously but see the next patch,\nwe need to know whether this child was auto-attached or not anyway.\n\nSo this patch simply moves this code to ptrace_init_task(), this\nway we can never race with ptrace_attach().\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "6634ae1033ceaeca5877dd75723210f8c2648c17",
      "tree": "2ddf9200593934ac0776bb1d3e3646f448dc38fe",
      "parents": [
        "961c4675c75112717705fa5c0c53cb9664051479"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Jul 08 19:13:39 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sun Jul 17 20:23:51 2011 +0200"
      },
      "message": "ptrace_init_task: initialize child-\u003ejobctl explicitly\n\nnew_child-\u003ejobctl is not initialized during the fork, it is copied\nfrom parent-\u003ejobctl. Currently this is harmless, the forking task\nis running and copy_process() can\u0027t succeed if signal_pending() is\ntrue, so only JOBCTL_STOP_DEQUEUED can be copied. Still this is a\nbit fragile, it would be more clean to set -\u003ejobctl \u003d 0 explicitly.\n\nAlso, check -\u003eptrace !\u003d 0 instead of PT_PTRACED, move the\nCONFIG_HAVE_HW_BREAKPOINT code up.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "0347e17739095c58c0194fed6a61aced3536d258",
      "tree": "9eaed0f012a7ee6890ccda9beddda2a1246c3111",
      "parents": [
        "087806b1281563e4ae7a5bce3155f894af5f4118"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Jun 24 17:34:06 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Jun 27 20:30:10 2011 +0200"
      },
      "message": "ptrace: ptrace_reparented() should check same_thread_group()\n\nptrace_reparented() naively does parent !\u003d real_parent, this means\nit returns true even if the tracer _is_ the real parent. This is per\nprocess thing, not per-thread. The only reason -\u003ereal_parent can\npoint to the non-leader thread is that we have __WNOTHREAD.\n\nChange it to check !same_thread_group(parent, real_parent).\n\nIt has two callers, and in both cases the current check does not\nlook right.\n\nexit_notify: we should respect -\u003eexit_signal if the exiting leader\nis traced by any thread from the parent thread group. It is the\nchild of the whole group, and we are going to send the signal to\nthe whole group.\n\nwait_task_zombie: without __WNOTHREAD do_wait() should do the same\nfor any thread, only sys_ptrace() is \"bound\" to the single thread.\nHowever do_wait(WEXITED) succeeds but does not release a traced\nnatural child unless the caller is the tracer.\n\nTest-case:\n\n\tvoid *tfunc(void *arg)\n\t{\n\t\tassert(ptrace(PTRACE_ATTACH, (long)arg, 0,0) \u003d\u003d 0);\n\t\tpause();\n\t\treturn NULL;\n\t}\n\n\tint main(void)\n\t{\n\t\tpthread_t thr;\n\t\tpid_t pid, stat, ret;\n\n\t\tpid \u003d fork();\n\t\tif (!pid) {\n\t\t\tpause();\n\t\t\tassert(0);\n\t\t}\n\n\t\tassert(pthread_create(\u0026thr, NULL, tfunc, (void*)(long)pid) \u003d\u003d 0);\n\n\t\tassert(waitpid(-1, \u0026stat, 0) \u003d\u003d pid);\n\t\tassert(WIFSTOPPED(stat));\n\n\t\tkill(pid, SIGKILL);\n\n\t\tassert(waitpid(-1, \u0026stat, 0) \u003d\u003d pid);\n\t\tassert(WIFSIGNALED(stat) \u0026\u0026 WTERMSIG(stat) \u003d\u003d SIGKILL);\n\n\t\tret \u003d waitpid(pid, \u0026stat, 0);\n\t\tif (ret \u003c 0)\n\t\t\treturn 0;\n\n\t\tprintf(\"WTF? %d is dead, but: wait\u003d%d stat\u003d%x\\n\",\n\t\t\t\tpid, ret, stat);\n\n\t\treturn 1;\n\t}\n\nNote that the main thread simply does\n\n\tpid \u003d fork();\n\tkill(pid, SIGKILL);\n\nand then without the patch wait4(WEXITED) succeeds twice and reports\nWTERMSIG(stat) \u003d\u003d SIGKILL.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "06d984737bac0545fe20bb5447ee488b95adb531",
      "tree": "b8d89d21a53c28a025dd42598bc3406e25db5ba8",
      "parents": [
        "4b9d33e6d83cc05a8005a8f9a8b9677fa0f53626"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jun 17 16:50:40 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 19:26:29 2011 +0200"
      },
      "message": "ptrace: s/tracehook_tracer_task()/ptrace_parent()/\n\ntracehook.h is on the way out.  Rename tracehook_tracer_task() to\nptrace_parent() and move it from tracehook.h to ptrace.h.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nCc: John Johansen \u003cjohn.johansen@canonical.com\u003e\nCc: Stephen Smalley \u003csds@tycho.nsa.gov\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "f3c04b934d429b1ace21866f011b66de328c0dc9",
      "tree": "16ac465b4f5294f71995554ca1e94913fdeda234",
      "parents": [
        "643ad8388e189dfd14ef76972cf7dc394b3cbebd"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jun 17 16:50:36 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 19:26:28 2011 +0200"
      },
      "message": "ptrace: move SIGTRAP on exec(2) logic to ptrace_event()\n\nMove SIGTRAP on exec(2) logic from tracehook_report_exec() to\nptrace_event().  This is part of changes to make ptrace_event()\nsmarter and handle ptrace event related details in one place.\n\nThis doesn\u0027t introduce any behavior change.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "643ad8388e189dfd14ef76972cf7dc394b3cbebd",
      "tree": "82d4787ddc09cf5a6fc9fc1345839973ab7763f5",
      "parents": [
        "d21142ece414ce1088cfcae760689aa60d6fee80"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jun 17 16:50:35 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 19:26:28 2011 +0200"
      },
      "message": "ptrace: introduce ptrace_event_enabled() and simplify ptrace_event() and tracehook_prepare_clone()\n\nThis patch implements ptrace_event_enabled() which tests whether a\ngiven PTRACE_EVENT_* is enabled and use it to simplify ptrace_event()\nand tracehook_prepare_clone().\n\nPT_EVENT_FLAG() macro is added which calculates PT_TRACE_* flag from\nPTRACE_EVENT_*.  This is used to define PT_TRACE_* flags and by\nptrace_event_enabled() to find the matching flag.\n\nThis is used to make ptrace_event() and tracehook_prepare_clone()\nsimpler.\n\n* ptrace_event() callers were responsible for providing mask to test\n  whether the event was enabled.  This patch implements\n  ptrace_event_enabled() and make ptrace_event() drop @mask and\n  determine whether the event is enabled from @event.  Note that\n  @event is constant and this conversion doesn\u0027t add runtime overhead.\n\n  All conversions except tracehook_report_clone_complete() are\n  trivial.  tracehook_report_clone_complete() used to use 0 for @mask\n  (always enabled) but now tests whether the specified event is\n  enabled.  This doesn\u0027t cause any behavior difference as it\u0027s\n  guaranteed that the event specified by @trace is enabled.\n\n* tracehook_prepare_clone() now only determines which event is\n  applicable and use ptrace_event_enabled() for enable test.\n\nThis doesn\u0027t introduce any behavior change.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "d21142ece414ce1088cfcae760689aa60d6fee80",
      "tree": "9f97b4518cd06fe695476fc6cc4ff9ed8d5bdd58",
      "parents": [
        "544b2c91a9f14f9565af1972203438b7f49afd48"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jun 17 16:50:34 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 19:26:27 2011 +0200"
      },
      "message": "ptrace: kill task_ptrace()\n\ntask_ptrace(task) simply dereferences task-\u003eptrace and isn\u0027t even used\nconsistently only adding confusion.  Kill it and directly access\n-\u003eptrace instead.\n\nThis doesn\u0027t introduce any behavior change.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "544b2c91a9f14f9565af1972203438b7f49afd48",
      "tree": "38615eeed1e50580a2341b5a9d15c98793d33c2d",
      "parents": [
        "fb1d910c178ba0c5bc32d3e5a9e82e05b7aad3cd"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jun 14 11:20:18 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Jun 16 21:41:54 2011 +0200"
      },
      "message": "ptrace: implement PTRACE_LISTEN\n\nThe previous patch implemented async notification for ptrace but it\nonly worked while trace is running.  This patch introduces\nPTRACE_LISTEN which is suggested by Oleg Nestrov.\n\nIt\u0027s allowed iff tracee is in STOP trap and puts tracee into\nquasi-running state - tracee never really runs but wait(2) and\nptrace(2) consider it to be running.  While ptracer is listening,\ntracee is allowed to re-enter STOP to notify an async event.\nListening state is cleared on the first notification.  Ptracer can\nalso clear it by issuing INTERRUPT - tracee will re-trap into STOP\nwith listening state cleared.\n\nThis allows ptracer to monitor group stop state without running tracee\n- use INTERRUPT to put tracee into STOP trap, issue LISTEN and then\nwait(2) to wait for the next group stop event.  When it happens,\nPTRACE_GETSIGINFO provides information to determine the current state.\n\nTest program follows.\n\n  #define PTRACE_SEIZE\t\t0x4206\n  #define PTRACE_INTERRUPT\t0x4207\n  #define PTRACE_LISTEN\t\t0x4208\n\n  #define PTRACE_SEIZE_DEVEL\t0x80000000\n\n  static const struct timespec ts1s \u003d { .tv_sec \u003d 1 };\n\n  int main(int argc, char **argv)\n  {\n\t  pid_t tracee, tracer;\n\t  int i;\n\n\t  tracee \u003d fork();\n\t  if (!tracee)\n\t\t  while (1)\n\t\t\t  pause();\n\n\t  tracer \u003d fork();\n\t  if (!tracer) {\n\t\t  siginfo_t si;\n\n\t\t  ptrace(PTRACE_SEIZE, tracee, NULL,\n\t\t\t (void *)(unsigned long)PTRACE_SEIZE_DEVEL);\n\t\t  ptrace(PTRACE_INTERRUPT, tracee, NULL, NULL);\n\t  repeat:\n\t\t  waitid(P_PID, tracee, NULL, WSTOPPED);\n\n\t\t  ptrace(PTRACE_GETSIGINFO, tracee, NULL, \u0026si);\n\t\t  if (!si.si_code) {\n\t\t\t  printf(\"tracer: SIG %d\\n\", si.si_signo);\n\t\t\t  ptrace(PTRACE_CONT, tracee, NULL,\n\t\t\t\t (void *)(unsigned long)si.si_signo);\n\t\t\t  goto repeat;\n\t\t  }\n\t\t  printf(\"tracer: stopped\u003d%d signo\u003d%d\\n\",\n\t\t\t si.si_signo !\u003d SIGTRAP, si.si_signo);\n\t\t  if (si.si_signo !\u003d SIGTRAP)\n\t\t\t  ptrace(PTRACE_LISTEN, tracee, NULL, NULL);\n\t\t  else\n\t\t\t  ptrace(PTRACE_CONT, tracee, NULL, NULL);\n\t\t  goto repeat;\n\t  }\n\n\t  for (i \u003d 0; i \u003c 3; i++) {\n\t\t  nanosleep(\u0026ts1s, NULL);\n\t\t  printf(\"mother: SIGSTOP\\n\");\n\t\t  kill(tracee, SIGSTOP);\n\t\t  nanosleep(\u0026ts1s, NULL);\n\t\t  printf(\"mother: SIGCONT\\n\");\n\t\t  kill(tracee, SIGCONT);\n\t  }\n\t  nanosleep(\u0026ts1s, NULL);\n\n\t  kill(tracer, SIGKILL);\n\t  kill(tracee, SIGKILL);\n\t  return 0;\n  }\n\nThis is identical to the program to test TRAP_NOTIFY except that\ntracee is PTRACE_LISTEN\u0027d instead of PTRACE_CONT\u0027d when group stopped.\nThis allows ptracer to monitor when group stop ends without running\ntracee.\n\n  # ./test-listen\n  tracer: stopped\u003d0 signo\u003d5\n  mother: SIGSTOP\n  tracer: SIG 19\n  tracer: stopped\u003d1 signo\u003d19\n  mother: SIGCONT\n  tracer: stopped\u003d0 signo\u003d5\n  tracer: SIG 18\n  mother: SIGSTOP\n  tracer: SIG 19\n  tracer: stopped\u003d1 signo\u003d19\n  mother: SIGCONT\n  tracer: stopped\u003d0 signo\u003d5\n  tracer: SIG 18\n  mother: SIGSTOP\n  tracer: SIG 19\n  tracer: stopped\u003d1 signo\u003d19\n  mother: SIGCONT\n  tracer: stopped\u003d0 signo\u003d5\n  tracer: SIG 18\n\n-v2: Moved JOBCTL_LISTENING check in wait_task_stopped() into\n     task_stopped_code() as suggested by Oleg.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "fca26f260c528ee51a2e451b5b200aeb528f3e09",
      "tree": "8c64ecdcece48b55e79bbb7f376a834fc99804a3",
      "parents": [
        "3544d72a0e10d0aa1c1bd59ed77a53a59cdc12f7"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jun 14 11:20:16 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Jun 16 21:41:53 2011 +0200"
      },
      "message": "ptrace: implement PTRACE_INTERRUPT\n\nCurrently, there\u0027s no way to trap a running ptracee short of sending a\nsignal which has various side effects.  This patch implements\nPTRACE_INTERRUPT which traps ptracee without any signal or job control\nrelated side effect.\n\nThe implementation is almost trivial.  It uses the group stop trap -\nSIGTRAP | PTRACE_EVENT_STOP \u003c\u003c 8.  A new trap flag\nJOBCTL_TRAP_INTERRUPT is added, which is set on PTRACE_INTERRUPT and\ncleared when any trap happens.  As INTERRUPT should be useable\nregardless of the current state of tracee, task_is_traced() test in\nptrace_check_attach() is skipped for INTERRUPT.\n\nPTRACE_INTERRUPT is available iff tracee is attached with\nPTRACE_SEIZE.\n\nTest program follows.\n\n  #define PTRACE_SEIZE\t\t0x4206\n  #define PTRACE_INTERRUPT\t0x4207\n\n  #define PTRACE_SEIZE_DEVEL\t0x80000000\n\n  static const struct timespec ts100ms \u003d { .tv_nsec \u003d 100000000 };\n  static const struct timespec ts1s \u003d { .tv_sec \u003d 1 };\n  static const struct timespec ts3s \u003d { .tv_sec \u003d 3 };\n\n  int main(int argc, char **argv)\n  {\n\t  pid_t tracee;\n\n\t  tracee \u003d fork();\n\t  if (tracee \u003d\u003d 0) {\n\t\t  nanosleep(\u0026ts100ms, NULL);\n\t\t  while (1) {\n\t\t\t  printf(\"tracee: alive pid\u003d%d\\n\", getpid());\n\t\t\t  nanosleep(\u0026ts1s, NULL);\n\t\t  }\n\t  }\n\n\t  if (argc \u003e 1)\n\t\t  kill(tracee, SIGSTOP);\n\n\t  nanosleep(\u0026ts100ms, NULL);\n\n\t  ptrace(PTRACE_SEIZE, tracee, NULL,\n\t\t (void *)(unsigned long)PTRACE_SEIZE_DEVEL);\n\t  if (argc \u003e 1) {\n\t\t  waitid(P_PID, tracee, NULL, WSTOPPED);\n\t\t  ptrace(PTRACE_CONT, tracee, NULL, NULL);\n\t  }\n\t  nanosleep(\u0026ts3s, NULL);\n\n\t  printf(\"tracer: INTERRUPT and DETACH\\n\");\n\t  ptrace(PTRACE_INTERRUPT, tracee, NULL, NULL);\n\t  waitid(P_PID, tracee, NULL, WSTOPPED);\n\t  ptrace(PTRACE_DETACH, tracee, NULL, NULL);\n\t  nanosleep(\u0026ts3s, NULL);\n\n\t  printf(\"tracer: exiting\\n\");\n\t  kill(tracee, SIGKILL);\n\t  return 0;\n  }\n\nWhen called without argument, tracee is seized from running state,\ninterrupted and then detached back to running state.\n\n  # ./test-interrupt\n  tracee: alive pid\u003d4546\n  tracee: alive pid\u003d4546\n  tracee: alive pid\u003d4546\n  tracer: INTERRUPT and DETACH\n  tracee: alive pid\u003d4546\n  tracee: alive pid\u003d4546\n  tracee: alive pid\u003d4546\n  tracer: exiting\n\nWhen called with argument, tracee is seized from stopped state,\ncontinued, interrupted and then detached back to stopped state.\n\n  # ./test-interrupt  1\n  tracee: alive pid\u003d4548\n  tracee: alive pid\u003d4548\n  tracee: alive pid\u003d4548\n  tracer: INTERRUPT and DETACH\n  tracer: exiting\n\nBefore PTRACE_INTERRUPT, once the tracee was running, there was no way\nto trap tracee and do PTRACE_DETACH without causing side effect.\n\n-v2: Updated to use task_set_jobctl_pending() so that it doesn\u0027t end\n     up scheduling TRAP_STOP if child is dying which may make the\n     child unkillable.  Spotted by Oleg.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "3544d72a0e10d0aa1c1bd59ed77a53a59cdc12f7",
      "tree": "27eb767b5cb98f58cccb5b7053a58bccd105f9d0",
      "parents": [
        "73ddff2bee159ffb580bd24faf625cd5e628f5ec"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jun 14 11:20:15 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Jun 16 21:41:53 2011 +0200"
      },
      "message": "ptrace: implement PTRACE_SEIZE\n\nPTRACE_ATTACH implicitly issues SIGSTOP on attach which has side\neffects on tracee signal and job control states.  This patch\nimplements a new ptrace request PTRACE_SEIZE which attaches a tracee\nwithout trapping it or affecting its signal and job control states.\n\nThe usage is the same with PTRACE_ATTACH but it takes PTRACE_SEIZE_*\nflags in @data.  Currently, the only defined flag is\nPTRACE_SEIZE_DEVEL which is a temporary flag to enable PTRACE_SEIZE.\nPTRACE_SEIZE will change ptrace behaviors outside of attach itself.\nThe changes will be implemented gradually and the DEVEL flag is to\nprevent programs which expect full SEIZE behavior from using it before\nall the behavior modifications are complete while allowing unit\ntesting.  The flag will be removed once SEIZE behaviors are completely\nimplemented.\n\n* PTRACE_SEIZE, unlike ATTACH, doesn\u0027t force tracee to trap.  After\n  attaching tracee continues to run unless a trap condition occurs.\n\n* PTRACE_SEIZE doesn\u0027t affect signal or group stop state.\n\n* If PTRACE_SEIZE\u0027d, group stop uses PTRACE_EVENT_STOP trap which uses\n  exit_code of (signr | PTRACE_EVENT_STOP \u003c\u003c 8) where signr is one of\n  the stopping signals if group stop is in effect or SIGTRAP\n  otherwise, and returns usual trap siginfo on PTRACE_GETSIGINFO\n  instead of NULL.\n\nSeizing sets PT_SEIZED in -\u003eptrace of the tracee.  This flag will be\nused to determine whether new SEIZE behaviors should be enabled.\n\nTest program follows.\n\n  #define PTRACE_SEIZE\t\t0x4206\n  #define PTRACE_SEIZE_DEVEL\t0x80000000\n\n  static const struct timespec ts100ms \u003d { .tv_nsec \u003d 100000000 };\n  static const struct timespec ts1s \u003d { .tv_sec \u003d 1 };\n  static const struct timespec ts3s \u003d { .tv_sec \u003d 3 };\n\n  int main(int argc, char **argv)\n  {\n\t  pid_t tracee;\n\n\t  tracee \u003d fork();\n\t  if (tracee \u003d\u003d 0) {\n\t\t  nanosleep(\u0026ts100ms, NULL);\n\t\t  while (1) {\n\t\t\t  printf(\"tracee: alive\\n\");\n\t\t\t  nanosleep(\u0026ts1s, NULL);\n\t\t  }\n\t  }\n\n\t  if (argc \u003e 1)\n\t\t  kill(tracee, SIGSTOP);\n\n\t  nanosleep(\u0026ts100ms, NULL);\n\n\t  ptrace(PTRACE_SEIZE, tracee, NULL,\n\t\t (void *)(unsigned long)PTRACE_SEIZE_DEVEL);\n\t  if (argc \u003e 1) {\n\t\t  waitid(P_PID, tracee, NULL, WSTOPPED);\n\t\t  ptrace(PTRACE_CONT, tracee, NULL, NULL);\n\t  }\n\t  nanosleep(\u0026ts3s, NULL);\n\t  printf(\"tracer: exiting\\n\");\n\t  return 0;\n  }\n\nWhen the above program is called w/o argument, tracee is seized while\nrunning and remains running.  When tracer exits, tracee continues to\nrun and print out messages.\n\n  # ./test-seize-simple\n  tracee: alive\n  tracee: alive\n  tracee: alive\n  tracer: exiting\n  tracee: alive\n  tracee: alive\n\nWhen called with an argument, tracee is seized from stopped state and\ncontinued, and returns to stopped state when tracer exits.\n\n  # ./test-seize\n  tracee: alive\n  tracee: alive\n  tracee: alive\n  tracer: exiting\n  # ps -el|grep test-seize\n  1 T     0  4720     1  0  80   0 -   941 signal ttyS0    00:00:00 test-seize\n\n-v2: SEIZE doesn\u0027t schedule TRAP_STOP and leaves tracee running as Jan\n     suggested.\n\n-v3: PTRACE_EVENT_STOP traps now report group stop state by signr.  If\n     group stop is in effect the stop signal number is returned as\n     part of exit_code; otherwise, SIGTRAP.  This was suggested by\n     Denys and Oleg.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Jan Kratochvil \u003cjan.kratochvil@redhat.com\u003e\nCc: Denys Vlasenko \u003cvda.linux@googlemail.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "755e276b3326f300585435d2f3876e66e248c476",
      "tree": "67ee93cf68a1ee0e307c0d8fcd4514a61dcdd697",
      "parents": [
        "a8f072c1d624a627b67f2ace2f0c25d856ef4e54"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jun 02 11:13:59 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sat Jun 04 18:17:10 2011 +0200"
      },
      "message": "ptrace: ptrace_check_attach(): rename @kill to @ignore_state and add comments\n\nPTRACE_INTERRUPT is going to be added which should also skip\ntask_is_traced() check in ptrace_check_attach().  Rename @kill to\n@ignore_state and make it bool.  Add function comment while at it.\n\nThis patch doesn\u0027t introduce any behavior difference.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "bf26c018490c2fce7fe9b629083b96ce0e6ad019",
      "tree": "ff595f6268cb6fc675beb6accf6abb0701829443",
      "parents": [
        "f4929bd37208540c2c6f416e9035ff1938f2dbc6"
      ],
      "author": {
        "name": "Frederic Weisbecker",
        "email": "fweisbec@gmail.com",
        "time": "Thu Apr 07 16:53:20 2011 +0200"
      },
      "committer": {
        "name": "Frederic Weisbecker",
        "email": "fweisbec@gmail.com",
        "time": "Mon Apr 25 17:28:24 2011 +0200"
      },
      "message": "ptrace: Prepare to fix racy accesses on task breakpoints\n\nWhen a task is traced and is in a stopped state, the tracer\nmay execute a ptrace request to examine the tracee state and\nget its task struct. Right after, the tracee can be killed\nand thus its breakpoints released.\nThis can happen concurrently when the tracer is in the middle\nof reading or modifying these breakpoints, leading to dereferencing\na freed pointer.\n\nHence, to prepare the fix, create a generic breakpoint reference\nholding API. When a reference on the breakpoints of a task is\nheld, the breakpoints won\u0027t be released until the last reference\nis dropped. After that, no more ptrace request on the task\u0027s\nbreakpoints can be serviced for the tracer.\n\nReported-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Will Deacon \u003cwill.deacon@arm.com\u003e\nCc: Prasad \u003cprasad@linux.vnet.ibm.com\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: v2.6.33.. \u003cstable@kernel.org\u003e\nLink: http://lkml.kernel.org/r/1302284067-7860-2-git-send-email-fweisbec@gmail.com\n"
    },
    {
      "commit": "e3e89cc535223433a619d0969db3fa05cdd946b8",
      "tree": "a0026ecf98617b7a7ab000339ed79a06ec03d038",
      "parents": [
        "b65a0e0c84cf489bfa00d6aa6c48abc5a237100f"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 04 09:23:30 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 04 09:23:30 2011 -0800"
      },
      "message": "Mark ptrace_{traceme,attach,detach} static\n\nThey are only used inside kernel/ptrace.c, and have been for a long\ntime.  We don\u0027t want to go back to the bad-old-days when architectures\ndid things on their own, so make them static and private.\n\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9b05a69e0534ec70bc94921936ffa05b330507cb",
      "tree": "4116a7b7db286edf9486a29a7742d47fa67baa68",
      "parents": [
        "9fed81dc40f5a1ac2783bcc78d4029873be72894"
      ],
      "author": {
        "name": "Namhyung Kim",
        "email": "namhyung@gmail.com",
        "time": "Wed Oct 27 15:33:47 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Oct 27 18:03:10 2010 -0700"
      },
      "message": "ptrace: change signature of arch_ptrace()\n\nFix up the arguments to arch_ptrace() to take account of the fact that\n@addr and @data are now unsigned long rather than long as of a preceding\npatch in this series.\n\nSigned-off-by: Namhyung Kim \u003cnamhyung@gmail.com\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nAcked-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Geert Uytterhoeven \u003cgeert@linux-m68k.org\u003e\nAcked-by: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4abf986960ecda6a87fc2f795aacf888a2f0127e",
      "tree": "39601ac75c3b92a3894722287bd9068a8b5e68d0",
      "parents": [
        "c4b5ed250eebf854d40f27b43362c80f115cb57a"
      ],
      "author": {
        "name": "Namhyung Kim",
        "email": "namhyung@gmail.com",
        "time": "Wed Oct 27 15:33:45 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Oct 27 18:03:10 2010 -0700"
      },
      "message": "ptrace: change signature of sys_ptrace() and friends\n\nSince userspace API of ptrace syscall defines @addr and @data as void\npointers, it would be more appropriate to define them as unsigned long in\nkernel.  Therefore related functions are changed also.\n\n\u0027unsigned long\u0027 is typically used in other places in kernel as an opaque\ndata type and that using this helps cleaning up a lot of warnings from\nsparse.\n\nSuggested-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nSigned-off-by: Namhyung Kim \u003cnamhyung@gmail.com\u003e\nAcked-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "faa4602e47690fb11221e00f9b9697c8dc0d4b19",
      "tree": "af667d1cdff7dc63b6893ee3f27a1f2503229ed1",
      "parents": [
        "7c5ecaf7666617889f337296c610815b519abfa9"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Thu Mar 25 14:51:50 2010 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Fri Mar 26 11:33:55 2010 +0100"
      },
      "message": "x86, perf, bts, mm: Delete the never used BTS-ptrace code\n\nSupport for the PMU\u0027s BTS features has been upstreamed in\nv2.6.32, but we still have the old and disabled ptrace-BTS,\nas Linus noticed it not so long ago.\n\nIt\u0027s buggy: TIF_DEBUGCTLMSR is trampling all over that MSR without\nregard for other uses (perf) and doesn\u0027t provide the flexibility\nneeded for perf either.\n\nIts users are ptrace-block-step and ptrace-bts, since ptrace-bts\nwas never used and ptrace-block-step can be implemented using a\nmuch simpler approach.\n\nSo axe all 3000 lines of it. That includes the *locked_memory*()\nAPIs in mm/mlock.c as well.\n\nReported-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Markus Metzger \u003cmarkus.t.metzger@intel.com\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nLKML-Reference: \u003c20100325135413.938004390@chello.nl\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "dacbe41f776db0a5a9aee1e41594f405c95778a5",
      "tree": "f6cb1436bd50a2572b7c5b44d44044be0e8005bd",
      "parents": [
        "b3c1e01a09d6af2dd7811a066ffcfc5171be2bed"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Wed Mar 10 15:22:46 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 12 15:52:38 2010 -0800"
      },
      "message": "ptrace: move user_enable_single_step \u0026 co prototypes to linux/ptrace.h\n\nWhile in theory user_enable_single_step/user_disable_single_step/\nuser_enable_blockstep could also be provided as an inline or macro there\u0027s\nno good reason to do so, and having the prototype in one places keeps code\nsize and confusion down.\n\nRoland said:\n\n  The original thought there was that user_enable_single_step() et al\n  might well be only an instruction or three on a sane machine (as if we\n  have any of those!), and since there is only one call site inlining\n  would be beneficial.  But I agree that there is no strong reason to care\n  about inlining it.\n\n  As to the arch changes, there is only one thought I\u0027d add to the\n  record.  It was always my thinking that for an arch where\n  PTRACE_SINGLESTEP does text-modifying breakpoint insertion,\n  user_enable_single_step() should not be provided.  That is,\n  arch_has_single_step()\u003d\u003etrue means that there is an arch facility with\n  \"pure\" semantics that does not have any unexpected side effects.\n  Inserting a breakpoint might do very unexpected strange things in\n  multi-threaded situations.  Aside from that, it is a peculiar side\n  effect that user_{enable,disable}_single_step() should cause COW\n  de-sharing of text pages and so forth.  For PTRACE_SINGLESTEP, all these\n  peculiarities are the status quo ante for that arch, so having\n  arch_ptrace() itself do those is one thing.  But for building other\n  things in the future, it is nicer to have a uniform \"pure\" semantics\n  that arch-independent code can expect.\n\n  OTOH, all such arch issues are really up to the arch maintainer.  As\n  of today, there is nothing but ptrace using user_enable_single_step() et\n  al so it\u0027s a distinction without a practical difference.  If/when there\n  are other facilities that use user_enable_single_step() and might care,\n  the affected arch\u0027s can revisit the question when someone cares about\n  the quality of the arch support for said new facility.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nAcked-by: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c6a0dd7ec6fb2d4927979ed4dc562fc5c122d826",
      "tree": "415f5e04788eb289820685b33dabcc7949d6196b",
      "parents": [
        "5e6dbc260704ce4d22fc9664f517f0bb6748feaa"
      ],
      "author": {
        "name": "Suresh Siddha",
        "email": "suresh.b.siddha@intel.com",
        "time": "Mon Feb 22 14:51:32 2010 -0800"
      },
      "committer": {
        "name": "H. Peter Anvin",
        "email": "hpa@zytor.com",
        "time": "Tue Feb 23 13:45:26 2010 -0800"
      },
      "message": "ptrace: Fix ptrace_regset() comments and diagnose errors specifically\n\nReturn -EINVAL for the bad size and for unrecognized NT_* type in\nptrace_regset() instead of -EIO.\n\nAlso update the comments for this ptrace interface with more clarifications.\n\nRequested-by: Roland McGrath \u003croland@redhat.com\u003e\nRequested-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nLKML-Reference: \u003c20100222225240.397523600@sbs-t61.sc.intel.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: H. Peter Anvin \u003chpa@zytor.com\u003e\n"
    },
    {
      "commit": "2225a122ae26d542bdce523d9d87a4a7ba10e07b",
      "tree": "861117cc1711cdf3c10f76212afe2e57b05d34c4",
      "parents": [
        "5b3efd500854d45d305b53c54c97db5970959980"
      ],
      "author": {
        "name": "Suresh Siddha",
        "email": "suresh.b.siddha@intel.com",
        "time": "Thu Feb 11 11:51:00 2010 -0800"
      },
      "committer": {
        "name": "H. Peter Anvin",
        "email": "hpa@zytor.com",
        "time": "Thu Feb 11 15:08:33 2010 -0800"
      },
      "message": "ptrace: Add support for generic PTRACE_GETREGSET/PTRACE_SETREGSET\n\nGeneric support for PTRACE_GETREGSET/PTRACE_SETREGSET commands which\nexport the regsets supported by each architecture using the correponding\nNT_* types. These NT_* types are already part of the userland ABI, used\nin representing the architecture specific register sets as different NOTES\nin an ELF core file.\n\n\u0027addr\u0027 parameter for the ptrace system call encode the REGSET type (using\nthe corresppnding NT_* type) and the \u0027data\u0027 parameter points to the\nstruct iovec having the user buffer and the length of that buffer.\n\n\tstruct iovec iov \u003d { buf, len};\n\tret \u003d ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, \u0026iov);\n\nOn successful completion, iov.len will be updated by the kernel specifying\nhow much the kernel has written/read to/from the user\u0027s iov.buf.\n\nx86 extended state registers are primarily exported using this interface.\n\nSigned-off-by: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nLKML-Reference: \u003c20100211195614.886724710@sbs-t61.sc.intel.com\u003e\nAcked-by: Hongjiu Lu \u003chjl.tools@gmail.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: H. Peter Anvin \u003chpa@zytor.com\u003e\n"
    },
    {
      "commit": "85ec7fd9f8e528c4f61d595cfe4df7681a19f252",
      "tree": "67c81a68f3302f02b6f769b9acede7efeb5edc8e",
      "parents": [
        "6580807da14c423f0d0a708108e6df6ebc8bc83d"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Tue Dec 15 16:47:17 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:08 2009 -0800"
      },
      "message": "ptrace: introduce user_single_step_siginfo() helper\n\nSuggested by Roland.\n\nCurrently there is no way to synthesize a single-stepping trap in the\narch-independent manner.  This patch adds the default helper which fills\nsiginfo_t, arch/ can can override it.\n\nArchitetures which implement user_enable_single_step() should add\nuser_single_step_siginfo() also.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c6a47cc2ccf9649ee09eeddd70a6d061bde69568",
      "tree": "b5ff696302607cd8f325199f84f88448e6475b84",
      "parents": [
        "aa20d489ceb024f91aae084ee00c47fc6a12255c"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Tue Dec 15 16:47:15 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:08 2009 -0800"
      },
      "message": "ptrace: cleanup ptrace_init_task()-\u003eptrace_link() path\n\nNo functional changes.\n\nptrace_init_task() looks confusing, as if we always auto-attach when \"bool\nptrace\" argument is true, while in fact we attach only if current is\ntraced.\n\nMake the code more explicit and kill now unused ptrace_link().\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8053bdd5ce15dcf043d41a4dd6cac4a5567effdc",
      "tree": "b139a0763d46143fbe5e36811b03c1987ef23b7a",
      "parents": [
        "4b105cbbaf7c06e01c27391957dc3c446328d087"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 17 16:27:34 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:51 2009 -0700"
      },
      "message": "ptrace_get_task_struct: s/tasklist/rcu/, make it static\n\n- Use rcu_read_lock() instead of tasklist_lock to find/get the task\n  in ptrace_get_task_struct().\n\n- Make it static, it has no callers outside of ptrace.c.\n\n- The comment doesn\u0027t match the reality, this helper does not do\n  any checks. Beacuse it is really trivial and static I removed the\n  whole comment.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0f4814065ff8c24ca8bfd75c9b73502be152c287",
      "tree": "f3816ecb64ee198235d2e9c1649de3241c3f2ac2",
      "parents": [
        "ee811517a5604aa63fae803b7c044712699e1303"
      ],
      "author": {
        "name": "Markus Metzger",
        "email": "markus.t.metzger@intel.com",
        "time": "Fri Apr 03 16:43:48 2009 +0200"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Tue Apr 07 13:36:31 2009 +0200"
      },
      "message": "x86, ptrace: add bts context unconditionally\n\nAdd the ptrace bts context field to task_struct unconditionally.\n\nInitialize the field directly in copy_process().\nRemove all the unneeded functionality used to initialize that field.\n\nSigned-off-by: Markus Metzger \u003cmarkus.t.metzger@intel.com\u003e\nCc: roland@redhat.com\nCc: eranian@googlemail.com\nCc: oleg@redhat.com\nCc: juan.villacis@intel.com\nCc: ak@linux.jf.intel.com\nLKML-Reference: \u003c20090403144603.292754000@intel.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "39c626ae47c469abdfd30c6e42eff884931380d6",
      "tree": "58cbe75bac79ce8ef55c94189df26448d0283918",
      "parents": [
        "7f5d3652d469cdf9eb2365dfea7ce3fb9e1409cc"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 02 16:58:18 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:05:00 2009 -0700"
      },
      "message": "forget_original_parent: split out the un-ptrace part\n\nBy discussion with Roland.\n\n- Rename ptrace_exit() to exit_ptrace(), and change it to do all the\n  necessary work with -\u003eptraced list by its own.\n\n- Move this code from exit.c to ptrace.c\n\n- Update the comment in ptrace_detach() to explain the rechecking of\n  the child-\u003eptrace.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: \"Metzger, Markus T\" \u003cmarkus.t.metzger@intel.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4576145c1ecdaaea9ef8976a48335206aa1ebf91",
      "tree": "b20b51848380b708f4158852b1bb4afa29ffc5f0",
      "parents": [
        "b1b4c6799fb59e710454bfe0ab477cb8523a8667"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 02 16:58:14 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:59 2009 -0700"
      },
      "message": "ptrace: fix possible zombie leak on PTRACE_DETACH\n\nWhen ptrace_detach() takes tasklist, the tracee can be SIGKILL\u0027ed.  If it\nhas already passed exit_notify() we can leak a zombie, because a) ptracing\ndisables the auto-reaping logic, and b) -\u003ereal_parent was not notified\nabout the child\u0027s death.\n\nptrace_detach() should follow the ptrace_exit\u0027s logic, change the code\naccordingly.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Jerome Marchand \u003cjmarchan@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nTested-by: Denys Vlasenko \u003cdvlasenk@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bf53de907dfdaac178c92d774aae7370d7b97d20",
      "tree": "738a07a8b4b22f7bb8ec2029c9ea9c635db6c62a",
      "parents": [
        "30cd324e9787ccc9a5ede59742d5409857550692"
      ],
      "author": {
        "name": "Markus Metzger",
        "email": "markus.t.metzger@intel.com",
        "time": "Fri Dec 19 15:10:24 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Sat Dec 20 09:15:46 2008 +0100"
      },
      "message": "x86, bts: add fork and exit handling\n\nImpact: introduce new ptrace facility\n\nAdd arch_ptrace_untrace() function that is called when the tracer\ndetaches (either voluntarily or when the tracing task dies);\nptrace_disable() is only called on a voluntary detach.\n\nAdd ptrace_fork() and arch_ptrace_fork(). They are called when a\ntraced task is forked.\n\nClear DS and BTS related fields on fork.\n\nRelease DS resources and reclaim memory in ptrace_untrace(). This\nreleases resources already when the tracing task dies. We used to do\nthat when the traced task dies.\n\nSigned-off-by: Markus Metzger \u003cmarkus.t.metzger@intel.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "b747c8c102cc0677a7a8056a093f58d7c9b500e7",
      "tree": "5b0a67f24117dee1c6169e6a5e2a912c1ea5c28f",
      "parents": [
        "c4596435404976b0ded9cdf18b456ca2e1408ddd"
      ],
      "author": {
        "name": "Adrian Bunk",
        "email": "bunk@kernel.org",
        "time": "Sat Oct 18 20:28:21 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:52:39 2008 -0700"
      },
      "message": "make ptrace_untrace() static\n\nptrace_untrace() can now become static.\n\nSigned-off-by: Adrian Bunk \u003cbunk@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5861bbfcc10fc0358abf52c7d22850c8d180f0b0",
      "tree": "066a66bd465741973879675b150f517032adcbfa",
      "parents": [
        "685d87f7ccc649ab92b55e18e507a65d0e694eb9"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Thu Aug 07 16:55:03 2008 -0700"
      },
      "committer": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Thu Aug 07 17:18:47 2008 -0700"
      },
      "message": "tracehook: fix CLONE_PTRACE\n\nIn the change in commit 09a05394fe2448a4139b014936330af23fa7ec83, I\noverlooked two nits in the logic and this broke using CLONE_PTRACE\nwhen PTRACE_O_TRACE* are not being used.\n\nA parent that is itself traced at all but not using PTRACE_O_TRACE*,\nusing CLONE_PTRACE would have its new child fail to be traced.\n\nA parent that is not itself traced at all that uses CLONE_PTRACE\n(which should be a no-op in this case) would confuse the bookkeeping\nand lead to a crash at exit time.\n\nThis restores the missing checks and fixes both failure modes.\n\nReported-by: Eduardo Habkost \u003cehabkost@redhat.com\u003e\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\n"
    },
    {
      "commit": "bbc698636ed48b6fcd323964e0f847a6a796325d",
      "tree": "c90d31c179aad154089a88d4845f1721ded40860",
      "parents": [
        "85ba2d862e521375a8ee01526c5c46b1f24bb4af"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Fri Jul 25 19:45:59 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Jul 26 12:00:10 2008 -0700"
      },
      "message": "task_current_syscall\n\nThis adds the new function task_current_syscall() on machines where the\nasm/syscall.h interface is supported (CONFIG_HAVE_ARCH_TRACEHOOK).  It\u0027s\nexported for modules to use in the future.  This function safely samples\nthe state of a blocked thread to collect what system call it is blocked\nin, and the six system call argument registers.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nReviewed-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dae33574dcf5211e1f43c7e45fa29f73ba3e00cb",
      "tree": "090eb4af17451836fb39cebf57fbee64a6bd23b5",
      "parents": [
        "daded34be96b1975ff8539ff62ad8b158ce7d842"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Fri Jul 25 19:45:48 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Jul 26 12:00:08 2008 -0700"
      },
      "message": "tracehook: release_task\n\nThis moves the ptrace-related logic from release_task into tracehook.h and\nptrace.h inlines.  It provides clean hooks both before and after locking\ntasklist_lock, for future tracing logic to do more cleanup without the\nlock.\n\nThis also changes release_task() itself in the rare \"zap_leader\" case to\nset the leader to EXIT_DEAD before iterating.  This maintains the\ninvariant that release_task() only ever handles a task in EXIT_DEAD.  This\nis a common-sense invariant that is already always true except in this one\narcane case of zombie leader whose parent ignores SIGCHLD.\n\nThis change is harmless and only costs one store in this one rare case.\nIt keeps the expected state more consisently sane, which is nicer when\ndebugging weirdness in release_task().  It also lets some future code in\nthe tracehook entry points rely on this invariant for bookkeeping.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nReviewed-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "09a05394fe2448a4139b014936330af23fa7ec83",
      "tree": "a7b3f0ffe271d4d35c3b98a99183d8792ea4db53",
      "parents": [
        "30199f5a46aee204bf437a4f5b0740f3efe448b7"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Fri Jul 25 19:45:47 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Jul 26 12:00:08 2008 -0700"
      },
      "message": "tracehook: clone\n\nThis moves all the ptrace initialization and tracing logic for task\ncreation into tracehook.h and ptrace.h inlines.  It reorganizes the code\nslightly, but should not change any behavior.\n\nThere are four tracehook entry points, at each important stage of task\ncreation.  This keeps the interface from the core fork.c code fairly\nclean, while supporting the complex setup required for ptrace or something\nlike it.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nReviewed-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "88ac2921a71f788ed693bcd44731dd6bc1994640",
      "tree": "db7039299713fec545061f884878563f8ae0caa6",
      "parents": [
        "267e2a9c71b8e088ac307f9549f71468e86e26c1"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Fri Jul 25 19:45:43 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Jul 26 12:00:08 2008 -0700"
      },
      "message": "tracehook: add linux/tracehook.h\n\nThis patch series introduces the \"tracehook\" interface layer of inlines in\n\u003clinux/tracehook.h\u003e.  There are more details in the log entry for patch\n01/23 and in the header file comments inside that patch.  Most of these\nchanges move code around with little or no change, and they should not\nbreak anything or change any behavior.\n\nThis sets a new standard for uniform arch support to enable clean\narch-independent implementations of new debugging and tracing stuff,\ndenoted by CONFIG_HAVE_ARCH_TRACEHOOK.  Patch 20/23 adds that symbol to\narch/Kconfig, with comments listing everything an arch has to do before\nsetting \"select HAVE_ARCH_TRACEHOOK\".  These are elaborted a bit at:\n\n\thttp://sourceware.org/systemtap/wiki/utrace/arch/HowTo\n\nThe new inlines that arch code must define or call have detailed kerneldoc\ncomments in the generic header files that say what is required.\n\nNo arch is obligated to do any work, and no arch\u0027s build should be broken\nby these changes.  There are several steps that each arch should take so\nit can set HAVE_ARCH_TRACEHOOK.  Most of these are simple.  Providing this\nsupport will let new things people add for doing debugging and tracing of\nuser-level threads \"just work\" for your arch in the future.  For an arch\nthat does not provide HAVE_ARCH_TRACEHOOK, some new options for such\nfeatures will not be available for config.\n\nI have done some arch work and will submit this to the arch maintainers\nafter the generic tracehook series settles in.  For now, that work is\navailable in my GIT repositories, and in patch and mbox-of-patches form at\nhttp://people.redhat.com/roland/utrace/2.6-current/\n\nThis paves the way for my \"utrace\" work, to be submitted later.  But it is\nnot innately tied to that.  I hope that the tracehook series can go in\nsoon regardless of what eventually does or doesn\u0027t go on top of it.  For\nanyone implementing any kind of new tracing/debugging plan, or just\nunderstanding all the context of the existing ptrace implementation,\nhaving tracehook.h makes things much easier to find and understand.\n\nThis patch:\n\nThis adds the new kernel-internal header file \u003clinux/tracehook.h\u003e.  This\nis not yet used at all.  The comments in the header introduce what the\nfollowing series of patches is about.\n\nThe aim is to formalize and consolidate all the places that the core\nkernel code and the arch code now ties into the ptrace implementation.\n\nThese patches mostly don\u0027t cause any functional change.  They just move\nthe details of ptrace logic out of core code into tracehook.h inlines,\nwhere they are mostly compiled away to the same as before.  All that\nchanges is that everything is thoroughly documented and any future\nreworking of ptrace, or addition of something new, would not have to touch\ncore code all over, just change the tracehook.h inlines.\n\nThe new linux/ptrace.h inlines are used by the following patches in the\nnew tracehook_*() inlines.  Using these helpers for the ptrace event stops\nmakes it simple to change or disable the old ptrace implementation of\nthese stops conditionally later.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nReviewed-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "006ebb40d3d65338bd74abb03b945f8d60e362bd",
      "tree": "c548c678b54b307e1fb9acf94676fb7bfd849501",
      "parents": [
        "feb2a5b82d87fbdc01c00b7e9413e4b5f4c1f0c1"
      ],
      "author": {
        "name": "Stephen Smalley",
        "email": "sds@tycho.nsa.gov",
        "time": "Mon May 19 08:32:49 2008 -0400"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Mon Jul 14 15:01:47 2008 +1000"
      },
      "message": "Security: split proc ptrace checking into read vs. attach\n\nEnable security modules to distinguish reading of process state via\nproc from full ptrace access by renaming ptrace_may_attach to\nptrace_may_access and adding a mode argument indicating whether only\nread access or full attach access is requested.  This allows security\nmodules to permit access to reading process state without granting\nfull ptrace access.  The base DAC/capability checking remains unchanged.\n\nRead access to /proc/pid/mem continues to apply a full ptrace attach\ncheck since check_mem_permission() already requires the current task\nto already be ptracing the target.  The other ptrace checks within\nproc for elements like environ, maps, and fds are changed to pass the\nread mode instead of attach.\n\nIn the SELinux case, we model such reading of process state as a\nreading of a proc file labeled with the target process\u0027 label.  This\nenables SELinux policy to permit such reading of process state without\npermitting control or manipulation of the target process, as there are\na number of cases where programs probe for such information via proc\nbut do not need to be able to control the target (e.g. procps,\nlsof, PolicyKit, ConsoleKit).  At present we have to choose between\nallowing full ptrace in policy (more permissive than required/desired)\nor breaking functionality (or in some cases just silencing the denials\nvia dontaudit rules but this can hide genuine attacks).\n\nThis version of the patch incorporates comments from Casey Schaufler\n(change/replace existing ptrace_may_attach interface, pass access\nmode), and Chris Wright (provide greater consistency in the checking).\n\nNote that like their predecessors __ptrace_may_attach and\nptrace_may_attach, the __ptrace_may_access and ptrace_may_access\ninterfaces use different return value conventions from each other (0\nor -errno vs. 1 or 0).  I retained this difference to avoid any\nchanges to the caller logic but made the difference clearer by\nchanging the latter interface to return a bool rather than an int and\nby adding a comment about it to ptrace.h for any future callers.\n\nSigned-off-by:  Stephen Smalley \u003csds@tycho.nsa.gov\u003e\nAcked-by: Chris Wright \u003cchrisw@sous-sol.org\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "53b6f9fbd3b63af14b4f6268e8b5b80d178d05bc",
      "tree": "93a5bd26974e07a3d7fa20dc17c8b70daacc1d85",
      "parents": [
        "2800d8d19e51414403df8144eaa214bb03400b87"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Wed Apr 30 00:53:13 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 30 08:29:38 2008 -0700"
      },
      "message": "ptrace: introduce ptrace_reparented() helper\n\nAdd another trivial helper for the sake of grep.  It also auto-documents the\nfact that -\u003eparent !\u003d real_parent implies -\u003eptrace.\n\nNo functional changes.\n\nSigned-off-by: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "6b39c7bfbd1436836c0fb34c5b437fda1a7a3dd4",
      "tree": "60d3d9719eef3076527fcbf9c3cb362fe0f52d61",
      "parents": [
        "01b8b07a5d77d22e609267dcae74d15e3e9c5f13"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Fri Feb 08 04:18:58 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri Feb 08 09:22:26 2008 -0800"
      },
      "message": "kill PT_ATTACHED\n\nSince the patch\n\n\t\"Fix ptrace_attach()/ptrace_traceme()/de_thread() race\"\n\tcommit f5b40e363ad6041a96e3da32281d8faa191597b9\n\nwe set PT_ATTACHED and change child-\u003eparent \"atomically\" wrt task_list lock.\n\nThis means we can remove the checks like \"PT_ATTACHED \u0026\u0026 -\u003eparent !\u003d ptracer\"\nwhich were needed to catch the \"ptrace attach is in progress\" case.  We can\nalso remove the flag itself since nobody else uses it.\n\nSigned-off-by: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1a669c2f16d478cb7f4452e5fb8d09320831f4a1",
      "tree": "b13f0aa0aebc51d1795203658053484b7c97b8cb",
      "parents": [
        "941d2380e979dfefb6c824452e9f42be3ef948ee"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Feb 06 01:37:37 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Feb 06 10:41:07 2008 -0800"
      },
      "message": "Add arch_ptrace_stop\n\nThis adds support to allow asm/ptrace.h to define two new macros,\narch_ptrace_stop_needed and arch_ptrace_stop.  These control special\nmachine-specific actions to be done before a ptrace stop.  The new code\ncompiles away to nothing when the new macros are not defined.  This is the\ncase on all machines to begin with.\n\nOn ia64, these macros will be defined to solve the long-standing issue of\nptrace vs register backing store.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Petr Tesarik \u003cptesarik@suse.cz\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: Matthew Wilcox \u003cwilly@debian.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5b88abbf770a0e1975c668743100f42934f385e8",
      "tree": "ae6af4df76e71682efb4d90620182bfaf541e9c8",
      "parents": [
        "dc802c2d2e66e2d1544e023bfd4be6cdee48d57b"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:30:53 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:30:53 2008 +0100"
      },
      "message": "ptrace: generic PTRACE_SINGLEBLOCK\n\nThis makes ptrace_request handle PTRACE_SINGLEBLOCK along with\nPTRACE_CONT et al.  The new generic code makes use of the\narch_has_block_step macro and generic entry points on machines\nthat define them.\n\n[ mingo@elte.hu: bugfix ]\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n"
    },
    {
      "commit": "dc802c2d2e66e2d1544e023bfd4be6cdee48d57b",
      "tree": "f3b2f58da24d67e70fee9c9e0ef2146c12ea13c2",
      "parents": [
        "d9771e8c50020bb1b4ca9eca9c188874ff126aa4"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:30:53 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:30:53 2008 +0100"
      },
      "message": "ptrace: arch_has_block_step\n\nThis defines the new macro arch_has_block_step() in linux/ptrace.h, a\ndefault for when asm/ptrace.h does not define it.  This is the analog\nof arch_has_single_step() for step-until-branch on machines that have\nit.  It declares the new user_enable_block_step function, which goes\nwith the existing user_enable_single_step and user_disable_single_step.\nThis is not used yet, but paves the way to harmonize on this interface\nfor the arch-specific calls on all machines.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n"
    },
    {
      "commit": "fb7fa8f1741c91f6c6e958762155abe9339476ca",
      "tree": "ce916e9e735cdd0202015cd52f5e93b7a2df7011",
      "parents": [
        "022eb43419f896a3647f769cdc3b5e13a8fb8ee7"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:30:47 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:30:47 2008 +0100"
      },
      "message": "ptrace: arch_has_single_step\n\nThis defines the new macro arch_has_single_step() in linux/ptrace.h, a\ndefault for when asm/ptrace.h does not define it.  It declares the new\nuser_enable_single_step and user_disable_single_step functions.\nThis is not used yet, but paves the way to harmonize on this interface\nfor the arch-specific calls on all machines.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n"
    },
    {
      "commit": "831830b5a2b5d413407adf380ef62fe17d6fcbf2",
      "tree": "b08f54f15374b5b98b0b3bea20a1d2ea8d1f50e0",
      "parents": [
        "ac40532ef0b8649e6f7f83859ea0de1c4ed08a19"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@ZenIV.linux.org.uk",
        "time": "Wed Jan 02 14:09:57 2008 +0000"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Jan 02 13:13:27 2008 -0800"
      },
      "message": "restrict reading from /proc/\u003cpid\u003e/maps to those who share -\u003emm or can ptrace pid\n\nContents of /proc/*/maps is sensitive and may become sensitive after\nopen() (e.g.  if target originally shares our -\u003emm and later does exec\non suid-root binary).\n\nCheck at read() (actually, -\u003estart() of iterator) time that mm_struct\nwe\u0027d grabbed and locked is\n - still the -\u003emm of target\n - equal to reader\u0027s -\u003emm or the target is ptracable by reader.\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f284ce7269031947326bac6bb19a977705276222",
      "tree": "8b145d42d4da182fb185dacc53b24ca7a2546114",
      "parents": [
        "7664732315c97f48dba9d1e7339ad16fc5a320ac"
      ],
      "author": {
        "name": "Alexey Dobriyan",
        "email": "adobriyan@gmail.com",
        "time": "Tue Jul 17 04:03:44 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Tue Jul 17 10:23:03 2007 -0700"
      },
      "message": "PTRACE_POKEDATA consolidation\n\nIdentical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata()\nfunction.\n\nAFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless\nreturn EPERM.\n\nSigned-off-by: Alexey Dobriyan \u003cadobriyan@gmail.com\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7664732315c97f48dba9d1e7339ad16fc5a320ac",
      "tree": "1eb9639b0fbe3f24341cecf1dafcae192cb7bde7",
      "parents": [
        "bcdcd8e725b923ad7c0de809680d5d5658a7bf8c"
      ],
      "author": {
        "name": "Alexey Dobriyan",
        "email": "adobriyan@gmail.com",
        "time": "Tue Jul 17 04:03:43 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Tue Jul 17 10:23:03 2007 -0700"
      },
      "message": "PTRACE_PEEKDATA consolidation\n\nIdentical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata()\nfunction.\n\nSigned-off-by: Alexey Dobriyan \u003cadobriyan@gmail.com\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "416bc51292f977b43b010c6dd937522b90062390",
      "tree": "012c8df7f762fedb8a2bcd027fa3e8a228bc49d0",
      "parents": [
        "cf3e43dbe0cc4a7ee7f6ab1bb5231dcfda164e02"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Fri Sep 29 02:00:45 2006 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Fri Sep 29 09:18:16 2006 -0700"
      },
      "message": "[PATCH] Use decimal for PTRACE_ATTACH and PTRACE_DETACH.\n\nIt is sure confusing that linux/ptrace.h has:\n\t#define PTRACE_SINGLESTEP\t   9\n\t#define PTRACE_ATTACH\t\t0x10\n\t#define PTRACE_DETACH\t\t0x11\n\t#define PTRACE_SYSCALL\t\t  24\nAll the low-numbered constants are in decimal, but the last two in hex.\nIt sure makes it likely that someone will look at this and think that\n9, 10, 11 are used, and that 16 and 17 are not used.\n\nHow about we use the same notation for all the numbers [0,24] in the\nsame short list?\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "d5f70c00ad24cd1158d3678b44ff969b4c971d49",
      "tree": "b4b71a71b413250fb24cb2d83cbbfd7507da9efc",
      "parents": [
        "281de339ceb822ca6c04d4373ecb9a45c1890ce4"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Mon Jun 26 00:26:07 2006 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Mon Jun 26 09:58:27 2006 -0700"
      },
      "message": "[PATCH] coredump: kill ptrace related stuff\n\nWith this patch zap_process() sets SIGNAL_GROUP_EXIT while sending SIGKILL to\nthe thread group.  This means that a TASK_TRACED task\n\n\t1. Will be awakened by signal_wake_up(1)\n\n\t2. Can\u0027t sleep again via ptrace_notify()\n\n\t3. Can\u0027t go to do_signal_stop() after return\n\t   from ptrace_stop() in get_signal_to_deliver()\n\nSo we can remove all ptrace related stuff from coredump path.\n\nSigned-off-by: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "260ea1013283d8acbb451459ed1ca560c1445c20",
      "tree": "35819d28dbfa8600ac0de336147323e660b0390c",
      "parents": [
        "4a4b69f79ba7286794765a856349e380f984a6cb"
      ],
      "author": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Fri Jun 23 02:05:18 2006 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Fri Jun 23 07:43:03 2006 -0700"
      },
      "message": "[PATCH] ptrace: document the locking rules\n\nAfter a lot of reading the code and thinking about how it behaves I have\nmanaged to figure out what the current ptrace locking rules are.  The\ncurrent code is in much better that it appears at first glance.  The\ntroublesome code paths are actually the code paths that violate the current\nrules.\n\nptrace uses simple exclusive access as it\u0027s locking.  You can only touch\ntask-\u003eptrace if the task is stopped and you are the ptracer, or if the task\nis running and are the task itself.\n\nVery simple, very easy to maintain.  It just needs to be documented so\npeople know not to touch ptrace from elsewhere.\n\nCurrently we do have a few pieces of code that are in violation of this\nrule.  Particularly the core dump code, and ptrace_attach.  But so far the\ncode looks fixable.\n\nSigned-off-by: Eric W. Biederman \u003cebiederm@xmission.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "5ecfbae093f0c37311e89b29bfc0c9d586eace87",
      "tree": "eabd0a145af64e26c900578c95175ab313828661",
      "parents": [
        "dadac81b1b86196fcc48fb87620403c4a7174f06"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Wed Feb 15 22:50:10 2006 +0300"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Wed Feb 15 11:05:43 2006 -0800"
      },
      "message": "[PATCH] fix zap_thread\u0027s ptrace related problems\n\n1. The tracee can go from ptrace_stop() to do_signal_stop()\n   after __ptrace_unlink(p).\n\n2. It is unsafe to __ptrace_unlink(p) while p-\u003eparent may wait\n   for tasklist_lock in ptrace_detach().\n\nSigned-off-by: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nCc: Eric W. Biederman \u003cebiederm@xmission.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "a12dea7af93ae83bd868c0dc09367090ead7cc1e",
      "tree": "90220072dddc951f75ecbcb9b442b8b8a9b774f7",
      "parents": [
        "eb46996f90a0826921f1a0d81535537a9c7f91b0"
      ],
      "author": {
        "name": "Paolo \u0027Blaisorblade\u0027 Giarrusso",
        "email": "blaisorblade@yahoo.it",
        "time": "Sun Jan 08 01:04:49 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Sun Jan 08 20:14:04 2006 -0800"
      },
      "message": "[PATCH] PTRACE_SYSEMU is only for i386 and clashes with other ptrace codes of other archs\n\nPTRACE_SYSEMU{,_SINGLESTEP} is actually arch specific, for now, and the\ncurrent allocated number clashes with a ptrace code of frv, i.e.\nPTRACE_GETFDPIC.  I should have submitted this much earlier, anyway we get no\nbreakage for this.\n\nCC: Daniel Jacobowitz \u003cdan@debian.org\u003e\nSigned-off-by: Paolo \u0027Blaisorblade\u0027 Giarrusso \u003cblaisorblade@yahoo.it\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "6b9c7ed84837753a436415097063232422e29a35",
      "tree": "6ad59a7bebcec359e08b3a211701781db819450d",
      "parents": [
        "6b34350f490b2c8508717541ec1fd2bbaadded94"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Sun Jan 08 01:02:33 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Sun Jan 08 20:13:51 2006 -0800"
      },
      "message": "[PATCH] use ptrace_get_task_struct in various places\n\nThe ptrace_get_task_struct() helper that I added as part of the ptrace\nconsolidation is useful in variety of places that currently opencode it.\nSwitch them to the common helpers.\n\nAdd a ptrace_traceme() helper that needs to be explicitly called, and simplify\nthe ptrace_get_task_struct() interface.  We don\u0027t need the request argument\nnow, and we return the task_struct directly, using ERR_PTR() for error\nreturns.  It\u0027s a bit more code in the callers, but we have two sane routines\nthat do one thing well now.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "481bed454247538e9f57d4ea37b153ccba24ba7b",
      "tree": "bb4198296962c08dbf52e8f377dc27206f621640",
      "parents": [
        "db73e9aa99bf093427b79877f9475392724fd5e5"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Mon Nov 07 00:59:47 2005 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Mon Nov 07 07:53:42 2005 -0800"
      },
      "message": "[PATCH] consolidate sys_ptrace()\n\nThe sys_ptrace boilerplate code (everything outside the big switch\nstatement for the arch-specific requests) is shared by most architectures.\nThis patch moves it to kernel/ptrace.c and leaves the arch-specific code as\narch_ptrace.\n\nSome architectures have a too different ptrace so we have to exclude them.\nThey continue to keep their implementations.  For sh64 I had to add a\nsh64_ptrace wrapper because it does some initialization on the first call.\nFor um I removed an ifdefed SUBARCH_PTRACE_SPECIAL block, but\nSUBARCH_PTRACE_SPECIAL isn\u0027t defined anywhere in the tree.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nAcked-by: Paul Mackerras \u003cpaulus@samba.org\u003e\nAcked-by: Ralf Baechle \u003cralf@linux-mips.org\u003e\nAcked-By: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Russell King \u003crmk+kernel@arm.linux.org.uk\u003e\nAcked-by: Paul Mundt \u003clethal@linux-sh.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "ab8d11beb46f0bd0617e04205c01f5c1fe845b61",
      "tree": "33b5aa5b63268b8f4d1428d74547fd351bb37113",
      "parents": [
        "5e21ccb136047e556acf0fdf227cab5db05c1c25"
      ],
      "author": {
        "name": "Miklos Szeredi",
        "email": "miklos@szeredi.hu",
        "time": "Tue Sep 06 15:18:24 2005 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Wed Sep 07 16:57:43 2005 -0700"
      },
      "message": "[PATCH] remove duplicated code from proc and ptrace\n\nExtract common code used by ptrace_attach() and may_ptrace_attach()\ninto a separate function.\n\nSigned-off-by: Miklos Szeredi \u003cmiklos@szeredi.hu\u003e\nCc: \u003cviro@parcelfarce.linux.theplanet.co.uk\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "1b38f0064e4e0b9ec626e39f0740b1cf2e295743",
      "tree": "b5e3af88b23bd47d91c4745a3e0c61512f58ff21",
      "parents": [
        "c8c86cecd1d1a2722acb28a01d1babf7b6993697"
      ],
      "author": {
        "name": "Bodo Stroesser",
        "email": "bstroesser@fujitsu-siemens.com",
        "time": "Sat Sep 03 15:57:20 2005 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@evo.osdl.org",
        "time": "Mon Sep 05 00:06:20 2005 -0700"
      },
      "message": "[PATCH] Uml support: add PTRACE_SYSEMU_SINGLESTEP option to i386\n\nThis patch implements the new ptrace option PTRACE_SYSEMU_SINGLESTEP, which\ncan be used by UML to singlestep a process: it will receive SINGLESTEP\ninterceptions for normal instructions and syscalls, but syscall execution will\nbe skipped just like with PTRACE_SYSEMU.\n\nSigned-off-by: Bodo Stroesser \u003cbstroesser@fujitsu-siemens.com\u003e\nSigned-off-by: Paolo \u0027Blaisorblade\u0027 Giarrusso \u003cblaisorblade@yahoo.it\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "ed75e8d58010fdc06e2c3a81bfbebae92314c7e3",
      "tree": "3f6f8dc5a34c9e03f613d4b907e02802ab075a9e",
      "parents": [
        "94c80b2598dbd2b8a6fe5f5c2c3af1beb37f66c7"
      ],
      "author": {
        "name": "Laurent Vivier",
        "email": "LaurentVivier@wanadoo.fr",
        "time": "Sat Sep 03 15:57:18 2005 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@evo.osdl.org",
        "time": "Mon Sep 05 00:06:20 2005 -0700"
      },
      "message": "[PATCH] UML Support - Ptrace: adds the host SYSEMU support, for UML and general usage\n\n      Jeff Dike \u003cjdike@addtoit.com\u003e,\n      Paolo \u0027Blaisorblade\u0027 Giarrusso \u003cblaisorblade_spam@yahoo.it\u003e,\n      Bodo Stroesser \u003cbstroesser@fujitsu-siemens.com\u003e\n\nAdds a new ptrace(2) mode, called PTRACE_SYSEMU, resembling PTRACE_SYSCALL\nexcept that the kernel does not execute the requested syscall; this is useful\nto improve performance for virtual environments, like UML, which want to run\nthe syscall on their own.\n\nIn fact, using PTRACE_SYSCALL means stopping child execution twice, on entry\nand on exit, and each time you also have two context switches; with SYSEMU you\navoid the 2nd stop and so save two context switches per syscall.\n\nAlso, some architectures don\u0027t have support in the host for changing the\nsyscall number via ptrace(), which is currently needed to skip syscall\nexecution (UML turns any syscall into getpid() to avoid it being executed on\nthe host).  Fixing that is hard, while SYSEMU is easier to implement.\n\n* This version of the patch includes some suggestions of Jeff Dike to avoid\n  adding any instructions to the syscall fast path, plus some other little\n  changes, by myself, to make it work even when the syscall is executed with\n  SYSENTER (but I\u0027m unsure about them). It has been widely tested for quite a\n  lot of time.\n\n* Various fixed were included to handle the various switches between\n  various states, i.e. when for instance a syscall entry is traced with one of\n  PT_SYSCALL / _SYSEMU / _SINGLESTEP and another one is used on exit.\n  Basically, this is done by remembering which one of them was used even after\n  the call to ptrace_notify().\n\n* We\u0027re combining TIF_SYSCALL_EMU with TIF_SYSCALL_TRACE or TIF_SINGLESTEP\n  to make do_syscall_trace() notice that the current syscall was started with\n  SYSEMU on entry, so that no notification ought to be done in the exit path;\n  this is a bit of a hack, so this problem is solved in another way in next\n  patches.\n\n* Also, the effects of the patch:\n\"Ptrace - i386: fix Syscall Audit interaction with singlestep\"\nare cancelled; they are restored back in the last patch of this series.\n\nDetailed descriptions of the patches doing this kind of processing follow (but\nI\u0027ve already summed everything up).\n\n* Fix behaviour when changing interception kind #1.\n\n  In do_syscall_trace(), we check the status of the TIF_SYSCALL_EMU flag\n  only after doing the debugger notification; but the debugger might have\n  changed the status of this flag because he continued execution with\n  PTRACE_SYSCALL, so this is wrong.  This patch fixes it by saving the flag\n  status before calling ptrace_notify().\n\n* Fix behaviour when changing interception kind #2:\n  avoid intercepting syscall on return when using SYSCALL again.\n\n  A guest process switching from using PTRACE_SYSEMU to PTRACE_SYSCALL\n  crashes.\n\n  The problem is in arch/i386/kernel/entry.S.  The current SYSEMU patch\n  inhibits the syscall-handler to be called, but does not prevent\n  do_syscall_trace() to be called after this for syscall completion\n  interception.\n\n  The appended patch fixes this.  It reuses the flag TIF_SYSCALL_EMU to\n  remember \"we come from PTRACE_SYSEMU and now are in PTRACE_SYSCALL\", since\n  the flag is unused in the depicted situation.\n\n* Fix behaviour when changing interception kind #3:\n  avoid intercepting syscall on return when using SINGLESTEP.\n\n  When testing 2.6.9 and the skas3.v6 patch, with my latest patch and had\n  problems with singlestepping on UML in SKAS with SYSEMU.  It looped\n  receiving SIGTRAPs without moving forward.  EIP of the traced process was\n  the same for all SIGTRAPs.\n\nWhat\u0027s missing is to handle switching from PTRACE_SYSCALL_EMU to\nPTRACE_SINGLESTEP in a way very similar to what is done for the change from\nPTRACE_SYSCALL_EMU to PTRACE_SYSCALL_TRACE.\n\nI.e., after calling ptrace(PTRACE_SYSEMU), on the return path, the debugger is\nnotified and then wake ups the process; the syscall is executed (or skipped,\nwhen do_syscall_trace() returns 0, i.e.  when using PTRACE_SYSEMU), and\ndo_syscall_trace() is called again.  Since we are on the return path of a\nSYSEMU\u0027d syscall, if the wake up is performed through ptrace(PTRACE_SYSCALL),\nwe must still avoid notifying the parent of the syscall exit.  Now, this\nbehaviour is extended even to resuming with PTRACE_SINGLESTEP.\n\nSigned-off-by: Paolo \u0027Blaisorblade\u0027 Giarrusso \u003cblaisorblade@yahoo.it\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
      "tree": "0bba044c4ce775e45a88a51686b5d9f90697ea9d",
      "parents": [],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@ppc970.osdl.org",
        "time": "Sat Apr 16 15:20:36 2005 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@ppc970.osdl.org",
        "time": "Sat Apr 16 15:20:36 2005 -0700"
      },
      "message": "Linux-2.6.12-rc2\n\nInitial git repository build. I\u0027m not bothering with the full history,\neven though we have it. We can create a separate \"historical\" git\narchive of that later if we want to, and in the meantime it\u0027s about\n3.2GB when imported into git - space that would just make the early\ngit days unnecessarily complicated, when we don\u0027t have a lot of good\ninfrastructure for it.\n\nLet it rip!\n"
    }
  ]
}
