)]}'
{
  "log": [
    {
      "commit": "8a88951b5878dc475dcd841cefc767e36397d14e",
      "tree": "c31fd8cdfa08dce4768f42e556d97929deac2343",
      "parents": [
        "50b8d257486a45cba7b65ca978986ed216bbcc10"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jan 04 17:29:20 2012 +0100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jan 04 15:01:59 2012 -0800"
      },
      "message": "ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach\n\nThis is the temporary simple fix for 3.2, we need more changes in this\narea.\n\n1. do_signal_stop() assumes that the running untraced thread in the\n   stopped thread group is not possible. This was our goal but it is\n   not yet achieved: a stopped-but-resumed tracee can clone the running\n   thread which can initiate another group-stop.\n\n   Remove WARN_ON_ONCE(!current-\u003eptrace).\n\n2. A new thread always starts with -\u003ejobctl \u003d 0. If it is auto-attached\n   and this group is stopped, __ptrace_unlink() sets JOBCTL_STOP_PENDING\n   but JOBCTL_STOP_SIGMASK part is zero, this triggers WANR_ON(!signr)\n   in do_jobctl_trap() if another debugger attaches.\n\n   Change __ptrace_unlink() to set the artificial SIGSTOP for report.\n\n   Alternatively we could change ptrace_init_task() to copy signr from\n   current, but this means we can copy it for no reason and hide the\n   possible similar problems.\n\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[3.1]\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9984de1a5a8a96275fcab818f7419af5a3c86e71",
      "tree": "1935d411752707a1621c5caf64f75dfe105beb3a",
      "parents": [
        "7c77509c542927ee2a3c8812fad84957e51bf67d"
      ],
      "author": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon May 23 14:51:41 2011 -0400"
      },
      "committer": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon Oct 31 09:20:12 2011 -0400"
      },
      "message": "kernel: Map most files to use export.h instead of module.h\n\nThe changed files were only including linux/module.h for the\nEXPORT_SYMBOL infrastructure, and nothing else.  Revector them\nonto the isolated export header for faster compile times.\n\nNothing to see here but a whole lot of instances of:\n\n  -#include \u003clinux/module.h\u003e\n  +#include \u003clinux/export.h\u003e\n\nThis commit is only changing the kernel dir; next targets\nwill probably be mm, fs, the arch dirs, etc.\n\nSigned-off-by: Paul Gortmaker \u003cpaul.gortmaker@windriver.com\u003e\n"
    },
    {
      "commit": "f9d81f61c84aca693bc353dfef4b8c36c2e5e1b5",
      "tree": "adf2453955649221a9a178d7d19d5b1e71f3fe67",
      "parents": [
        "b172e38e435a158cc84169d5b9127a8dd8d21e76"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sun Sep 25 19:46:22 2011 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Sep 25 11:02:00 2011 -0700"
      },
      "message": "ptrace: PTRACE_LISTEN forgets to unlock -\u003esiglock\n\nIf PTRACE_LISTEN fails after lock_task_sighand() it doesn\u0027t drop -\u003esiglock.\n\nReported-by: Matt Fleming \u003cmatt.fleming@intel.com\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f701e5b73a1a79ea62ffd45d9e2bed4c7d5c1fd2",
      "tree": "10940ea680a1c8c69cbd9f9aa9aca23a1199aa0e",
      "parents": [
        "d184d6eb1dc3c9869e25a8e422be5c55ab0db4ac"
      ],
      "author": {
        "name": "Vladimir Zapolskiy",
        "email": "vzapolskiy@gmail.com",
        "time": "Fri Jul 15 20:45:18 2011 +0300"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Jul 18 21:38:33 2011 +0200"
      },
      "message": "connector: add an event for monitoring process tracers\n\nThis change adds a procfs connector event, which is emitted on every\nsuccessful process tracer attach or detach.\n\nIf some process connects to other one, kernelspace connector reports\nprocess id and thread group id of both these involved processes. On\ndisconnection null process id is returned.\n\nSuch an event allows to create a simple automated userspace mechanism\nto be aware about processes connecting to others, therefore predefined\nprocess policies can be applied to them if needed.\n\nNote, a detach signal is emitted only in case, if a tracer process\nexplicitly executes PTRACE_DETACH request. In other cases like tracee\nor tracer exit detach event from proc connector is not reported.\n\nSigned-off-by: Vladimir Zapolskiy \u003cvzapolskiy@gmail.com\u003e\nAcked-by: Evgeniy Polyakov \u003czbr@ioremap.net\u003e\nCc: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "d4f7c511c1c2a67eb287987cf1ce9554149030e6",
      "tree": "0756b300e8f558a923782a9ccea9a8b532e39159",
      "parents": [
        "e550f14dc6322e794d4e70825f63c9c99177ae8b"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 23:10:11 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Jun 27 20:30:10 2011 +0200"
      },
      "message": "do not change dead_task-\u003eexit_signal\n\n__ptrace_detach() and do_notify_parent() set task-\u003eexit_signal \u003d -1\nto mark the task dead. This is no longer needed, nobody checks\nexit_signal to detect the EXIT_DEAD task.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nReviewed-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "9843a1e977977986d0a4c1000f2229b032572534",
      "tree": "8c3d8a77ed8b2a021451a493aa47162977c8001b",
      "parents": [
        "45cdf5cc0703c537194588c63d53bad1f2539d36"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 23:08:53 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Jun 27 20:30:08 2011 +0200"
      },
      "message": "__ptrace_detach: avoid task_detached(), check do_notify_parent()\n\n__ptrace_detach() relies on the current obscure behaviour of\ndo_notify_parent(tsk) which changes tsk-\u003eexit_signal if this child\nshould be silently reaped. That is why we check task_detached(), it\nis true if the task is sub-thread, or it is the group_leader but\nits exit_signal was changed by do_notify_parent().\n\nThis is confusing, change the code to rely on !thread_group_leader()\nor the value returned by do_notify_parent().\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\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": "73ddff2bee159ffb580bd24faf625cd5e628f5ec",
      "tree": "218cf5101b67c98ef99814e59706976d3ad245c2",
      "parents": [
        "dd1d6772692316fe35094085c5e4d9a370ad3462"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jun 14 11:20:14 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Jun 16 21:41:52 2011 +0200"
      },
      "message": "job control: introduce JOBCTL_TRAP_STOP and use it for group stop trap\n\ndo_signal_stop() implemented both normal group stop and trap for group\nstop while ptraced.  This approach has been enough but scheduled\nchanges require trap mechanism which can be used in more generic\nmanner and using group stop trap for generic trap site simplifies both\nuserland visible interface and implementation.\n\nThis patch adds a new jobctl flag - JOBCTL_TRAP_STOP.  When set, it\ntriggers a trap site, which behaves like group stop trap, in\nget_signal_to_deliver() after checking for pending signals.  While\nptraced, do_signal_stop() doesn\u0027t stop itself.  It initiates group\nstop if requested and schedules JOBCTL_TRAP_STOP and returns.  The\ncaller - get_signal_to_deliver() - is responsible for checking whether\nTRAP_STOP is pending afterwards and handling it.\n\nptrace_attach() is updated to use JOBCTL_TRAP_STOP instead of\nJOBCTL_STOP_PENDING and __ptrace_unlink() to clear all pending trap\nbits and TRAPPING so that TRAP_STOP and future trap bits don\u0027t linger\nafter detach.\n\nWhile at it, add proper function comment to do_signal_stop() and make\nit return bool.\n\n-v2: __ptrace_unlink() updated to clear JOBCTL_TRAP_MASK and TRAPPING\n     instead of JOBCTL_PENDING_MASK.  This avoids accidentally\n     clearing JOBCTL_STOP_CONSUME.  Spotted by Oleg.\n\n-v3: do_signal_stop() updated to return %false without dropping\n     siglock while ptraced and TRAP_STOP check moved inside for(;;)\n     loop after group stop participation.  This avoids unnecessary\n     relocking and also will help avoiding unnecessary traps by\n     consuming group stop before handling pending traps.\n\n-v4: Jobctl trap handling moved into a separate function -\n     do_jobctl_trap().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "62c124ff3bcdb414af635c2bf822c9e4f2a5abfa",
      "tree": "5d279211e098d24245d49e394d84aa8cfdb6f277",
      "parents": [
        "7dd3db54e77d21eb95e145f19ba53f68250d0e73"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jun 02 11:14:00 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sat Jun 04 18:17:11 2011 +0200"
      },
      "message": "ptrace: use bit_waitqueue for TRAPPING instead of wait_chldexit\n\nptracer-\u003esignal-\u003ewait_chldexit was used to wait for TRAPPING; however,\n-\u003ewait_chldexit was already complicated with waker-side filtering\nwithout adding TRAPPING wait on top of it.  Also, it unnecessarily\nmade TRAPPING clearing depend on the current ptrace relationship - if\nthe ptracee is detached, wakeup is lost.\n\nThere is no reason to use signal-\u003ewait_chldexit here.  We\u0027re just\nwaiting for JOBCTL_TRAPPING bit to clear and given the relatively\ninfrequent use of ptrace, bit_waitqueue can serve it perfectly.\n\nThis patch makes JOBCTL_TRAPPING wait use bit_waitqueue instead of\nsignal-\u003ewait_chldexit.\n\n-v2: Use JOBCTL_*_BIT macros instead of ilog2() as suggested by Linus.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "7dd3db54e77d21eb95e145f19ba53f68250d0e73",
      "tree": "628e44b22e6fbf2828cf2c533c41b3d24f3e3ec9",
      "parents": [
        "6dfca32984237a8a011b5bf367e53341a265b2a4"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jun 02 11:14:00 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sat Jun 04 18:17:11 2011 +0200"
      },
      "message": "job control: introduce task_set_jobctl_pending()\n\ntask-\u003ejobctl currently hosts JOBCTL_STOP_PENDING and will host TRAP\npending bits too.  Setting pending conditions on a dying task may make\nthe task unkillable.  Currently, each setting site is responsible for\nchecking for the condition but with to-be-added job control traps this\nbecomes too fragile.\n\nThis patch adds task_set_jobctl_pending() which should be used when\nsetting task-\u003ejobctl bits to schedule a stop or trap.  The function\nperforms the followings to ease setting pending bits.\n\n* Sanity checks.\n\n* If fatal signal is pending or PF_EXITING is set, no bit is set.\n\n* STOP_SIGMASK is automatically cleared if new value is being set.\n\ndo_signal_stop() and ptrace_attach() are updated to use\ntask_set_jobctl_pending() instead of setting STOP_PENDING explicitly.\nThe surrounding structures around setting are changed to fit\ntask_set_jobctl_pending() better but there should be no userland\nvisible behavior difference.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: 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": "a8f072c1d624a627b67f2ace2f0c25d856ef4e54",
      "tree": "9ba3e96aa874b08c7156a3584f27187bcdbdd9cd",
      "parents": [
        "0b1007c3578569469a6fab6ae5cca918ccdc3ee1"
      ],
      "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:09 2011 +0200"
      },
      "message": "job control: rename signal-\u003egroup_stop and flags to jobctl and update them\n\nsignal-\u003egroup_stop currently hosts mostly group stop related flags;\nhowever, it\u0027s gonna be used for wider purposes and the GROUP_STOP_\nflag prefix becomes confusing.  Rename signal-\u003egroup_stop to\nsignal-\u003ejobctl and rename all GROUP_STOP_* flags to JOBCTL_*.\n\nBit position macros JOBCTL_*_BIT are defined and JOBCTL_* flags are\ndefined in terms of them to allow using bitops later.\n\nWhile at it, reassign JOBCTL_TRAPPING to bit 22 to better accomodate\nfuture additions.\n\nThis doesn\u0027t cause any functional change.\n\n-v2: JOBCTL_*_BIT macros added as suggested by Linus.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "0b1007c3578569469a6fab6ae5cca918ccdc3ee1",
      "tree": "f6a5254c6f8caeb843fc1a130f7642b9a55a2694",
      "parents": [
        "23c79d31a3dd2602ee1a5ff31303b2d7a2d3c159"
      ],
      "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:09 2011 +0200"
      },
      "message": "ptrace: remove silly wait_trap variable from ptrace_attach()\n\nRemove local variable wait_trap which determines whether to wait for\n!TRAPPING or not and simply wait for it if attach was successful.\n\n-v2: Oleg pointed out wait should happen iff attach was successful.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "0666fb51b1483f27506e212cc7f7b2645b5c7acc",
      "tree": "ceb625d70f0c730a46e2d954b74d687cc36b0030",
      "parents": [
        "22e12bbc9bc38c6d0bd541d061a0f547596fc19d"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed May 25 19:20:21 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed May 25 19:20:21 2011 +0200"
      },
      "message": "ptrace: ptrace_resume() shouldn\u0027t wake up !TASK_TRACED thread\n\nIt is not clear why ptrace_resume() does wake_up_process(). Unless the\ncaller is PTRACE_KILL the tracee should be TASK_TRACED so we can use\nwake_up_state(__TASK_TRACED). If sys_ptrace() races with SIGKILL we do\nnot need the extra and potentionally spurious wakeup.\n\nIf the caller is PTRACE_KILL, wake_up_process() is even more wrong.\nThe tracee can sleep in any state in any place, and if we have a buggy\ncode which doesn\u0027t handle a spurious wakeup correctly PTRACE_KILL can\nbe used to exploit it. For example:\n\n\tint main(void)\n\t{\n\t\tint child, status;\n\n\t\tchild \u003d fork();\n\t\tif (!child) {\n\t\t\tint ret;\n\n\t\t\tassert(ptrace(PTRACE_TRACEME, 0,0,0) \u003d\u003d 0);\n\n\t\t\tret \u003d pause();\n\t\t\tprintf(\"pause: %d %m\\n\", ret);\n\n\t\t\treturn 0x23;\n\t\t}\n\n\t\tsleep(1);\n\t\tassert(ptrace(PTRACE_KILL, child, 0,0) \u003d\u003d 0);\n\n\t\tassert(child \u003d\u003d wait(\u0026status));\n\t\tprintf(\"wait: %x\\n\", status);\n\n\t\treturn 0;\n\t}\n\nprints \"pause: -1 Unknown error 514\", -ERESTARTNOHAND leaks to the\nuserland. In this case sys_pause() is buggy as well and should be\nfixed.\n\nI do not know what was the original rationality behind PTRACE_KILL.\nThe man page is simply wrong and afaics it was always wrong. Imho\nit should be deprecated, or may be it should do send_sig(SIGKILL)\nas Denys suggests, but in any case I do not think that the current\nbehaviour was intentional.\n\nNote: there is another problem, ptrace_resume() changes -\u003eexit_code\nand this can race with SIGKILL too. Eventually we should change ptrace\nto not use -\u003eexit_code.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "3ed4c0583daa34dedb568b26ff99e5a7b58db612",
      "tree": "a531d4cc94acaa58fe0600cf83da9fb8b77f6e50",
      "parents": [
        "ad9471752ebae25daa133b4e5d9299809c35e155",
        "bd715d9a4f13f87bad5526c2cd41370949473b16"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri May 20 13:33:21 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri May 20 13:33:21 2011 -0700"
      },
      "message": "Merge branch \u0027ptrace\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc\n\n* \u0027ptrace\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc: (41 commits)\n  signal: trivial, fix the \"timespec declared inside parameter list\" warning\n  job control: reorganize wait_task_stopped()\n  ptrace: fix signal-\u003ewait_chldexit usage in task_clear_group_stop_trapping()\n  signal: sys_sigprocmask() needs retarget_shared_pending()\n  signal: cleanup sys_sigprocmask()\n  signal: rename signandsets() to sigandnsets()\n  signal: do_sigtimedwait() needs retarget_shared_pending()\n  signal: introduce do_sigtimedwait() to factor out compat/native code\n  signal: sys_rt_sigtimedwait: simplify the timeout logic\n  signal: cleanup sys_rt_sigprocmask()\n  x86: signal: sys_rt_sigreturn() should use set_current_blocked()\n  x86: signal: handle_signal() should use set_current_blocked()\n  signal: sigprocmask() should do retarget_shared_pending()\n  signal: sigprocmask: narrow the scope of -\u003esiglock\n  signal: retarget_shared_pending: optimize while_each_thread() loop\n  signal: retarget_shared_pending: consider shared/unblocked signals only\n  signal: introduce retarget_shared_pending()\n  ptrace: ptrace_check_attach() should not do s/STOPPED/TRACED/\n  signal: Turn SIGNAL_STOP_DEQUEUED into GROUP_STOP_DEQUEUED\n  signal: do_signal_stop: Remove the unneeded task_clear_group_stop_pending()\n  ...\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": "e46bc9b6fd65bc9f406a4211fbf95683cc9c2937",
      "tree": "57046f6b2f4674a0c9048ab1ad1ff50fae7e373a",
      "parents": [
        "2b9accbee563f535046ff2cd382d0acaa92e130c",
        "321fb561971ba0f10ce18c0f8a4b9fbfc7cef4b9"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 07 20:44:11 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 07 20:44:11 2011 +0200"
      },
      "message": "Merge branch \u0027ptrace\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into ptrace\n"
    },
    {
      "commit": "321fb561971ba0f10ce18c0f8a4b9fbfc7cef4b9",
      "tree": "4123410887b549284ed32cf5e8fb799fd2540c14",
      "parents": [
        "ee77f075921730b2b465880f9fd4367003bdab39"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Apr 01 20:13:01 2011 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 04 02:11:05 2011 +0200"
      },
      "message": "ptrace: ptrace_check_attach() should not do s/STOPPED/TRACED/\n\nAfter \"ptrace: Clean transitions between TASK_STOPPED and TRACED\"\nd79fdd6d96f46fabb779d86332e3677c6f5c2a4f, ptrace_check_attach()\nshould never see a TASK_STOPPED tracee and s/STOPPED/TRACED/ is\nno longer legal. Add the warning.\n\nNote: ptrace_check_attach() can be greatly simplified, in particular\nit doesn\u0027t need tasklist. But I\u0027d prefer another patch for that.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8409cca7056113bee3236cb6a8e4d8d4d1eef102",
      "tree": "d9f1ced0d47070fcdf8b399021f33770c150b1ec",
      "parents": [
        "39fd33933b0209e4b6254743f2cede07c5ad4c52"
      ],
      "author": {
        "name": "Serge E. Hallyn",
        "email": "serge@hallyn.com",
        "time": "Wed Mar 23 16:43:20 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 23 19:47:05 2011 -0700"
      },
      "message": "userns: allow ptrace from non-init user namespaces\n\nptrace is allowed to tasks in the same user namespace according to the\nusual rules (i.e.  the same rules as for two tasks in the init user\nnamespace).  ptrace is also allowed to a user namespace to which the\ncurrent task the has CAP_SYS_PTRACE capability.\n\nChangelog:\n\tDec 31: Address feedback by Eric:\n\t\t. Correct ptrace uid check\n\t\t. Rename may_ptrace_ns to ptrace_capable\n\t\t. Also fix the cap_ptrace checks.\n\tJan  1: Use const cred struct\n\tJan 11: use task_ns_capable() in place of ptrace_capable().\n\tFeb 23: same_or_ancestore_user_ns() was not an appropriate\n\t\tcheck to constrain cap_issubset.  Rather, cap_issubset()\n\t\tonly is meaningful when both capsets are in the same\n\t\tuser_ns.\n\nSigned-off-by: Serge E. Hallyn \u003cserge.hallyn@canonical.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nAcked-by: Daniel Lezcano \u003cdaniel.lezcano@free.fr\u003e\nAcked-by: David Howells \u003cdhowells@redhat.com\u003e\nCc: James Morris \u003cjmorris@namei.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0e9f0a4abfd80f8adca624538d479d95159b16d8",
      "tree": "6b9910140f4755cd95970a5c559e8f00d60dfede",
      "parents": [
        "e3bd058f62896ec7a2c605ed62a0a811e9147947"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:01 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:01 2011 +0100"
      },
      "message": "ptrace: Always put ptracee into appropriate execution state\n\nCurrently, __ptrace_unlink() wakes up the tracee iff it\u0027s in\nTASK_TRACED.  For unlinking from PTRACE_DETACH, this is correct as the\ntracee is guaranteed to be in TASK_TRACED or dead; however, unlinking\nalso happens when the ptracer exits and in this case the ptracee can\nbe in any state and ptrace might be left running even if the group it\nbelongs to is stopped.\n\nThis patch updates __ptrace_unlink() such that GROUP_STOP_PENDING is\nreinstated regardless of the ptracee\u0027s current state as long as it\u0027s\nalive and makes sure that signal_wake_up() is called if execution\nstate transition is necessary.\n\nTest case follows.\n\n  #include \u003cunistd.h\u003e\n  #include \u003ctime.h\u003e\n  #include \u003csys/types.h\u003e\n  #include \u003csys/ptrace.h\u003e\n  #include \u003csys/wait.h\u003e\n\n  static const struct timespec ts1s \u003d { .tv_sec \u003d 1 };\n\n  int main(void)\n  {\n\t  pid_t tracee;\n\t  siginfo_t si;\n\n\t  tracee \u003d fork();\n\t  if (tracee \u003d\u003d 0) {\n\t\t  while (1) {\n\t\t\t  nanosleep(\u0026ts1s, NULL);\n\t\t\t  write(1, \".\", 1);\n\t\t  }\n\t  }\n\n\t  ptrace(PTRACE_ATTACH, tracee, NULL, NULL);\n\t  waitid(P_PID, tracee, \u0026si, WSTOPPED);\n\t  ptrace(PTRACE_CONT, tracee, NULL, (void *)(long)si.si_status);\n\t  waitid(P_PID, tracee, \u0026si, WSTOPPED);\n\t  ptrace(PTRACE_CONT, tracee, NULL, (void *)(long)si.si_status);\n\t  write(1, \"exiting\", 7);\n\t  return 0;\n  }\n\nBefore the patch, after the parent process exits, the child is left\nrunning and prints out \".\" every second.\n\n  exiting..... (continues)\n\nAfter the patch, the group stop initiated by the implied SIGSTOP from\nPTRACE_ATTACH is re-established when the parent exits.\n\n  exiting\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "e3bd058f62896ec7a2c605ed62a0a811e9147947",
      "tree": "bd7b5d3e495221c78666421af1f73ee15af7531b",
      "parents": [
        "d79fdd6d96f46fabb779d86332e3677c6f5c2a4f"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:01 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:01 2011 +0100"
      },
      "message": "ptrace: Collapse ptrace_untrace() into __ptrace_unlink()\n\nRemove the extra task_is_traced() check in __ptrace_unlink() and\ncollapse ptrace_untrace() into __ptrace_unlink().  This is to prepare\nfor further changes.\n\nWhile at it, drop the comment on top of ptrace_untrace() and convert\n__ptrace_unlink() comment to docbook format.  Detailed comment will be\nadded by the next patch.\n\nThis patch doesn\u0027t cause any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "d79fdd6d96f46fabb779d86332e3677c6f5c2a4f",
      "tree": "2797e34888c687b47997b7c7ea3150468bcbb737",
      "parents": [
        "5224fa3660ad3881d2f2ad726d22614117963f10"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:00 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:00 2011 +0100"
      },
      "message": "ptrace: Clean transitions between TASK_STOPPED and TRACED\n\nCurrently, if the task is STOPPED on ptrace attach, it\u0027s left alone\nand the state is silently changed to TRACED on the next ptrace call.\nThe behavior breaks the assumption that arch_ptrace_stop() is called\nbefore any task is poked by ptrace and is ugly in that a task\nmanipulates the state of another task directly.\n\nWith GROUP_STOP_PENDING, the transitions between TASK_STOPPED and\nTRACED can be made clean.  The tracer can use the flag to tell the\ntracee to retry stop on attach and detach.  On retry, the tracee will\nenter the desired state in the correct way.  The lower 16bits of\ntask-\u003egroup_stop is used to remember the signal number which caused\nthe last group stop.  This is used while retrying for ptrace attach as\nthe original group_exit_code could have been consumed with wait(2) by\nthen.\n\nAs the real parent may wait(2) and consume the group_exit_code\nanytime, the group_exit_code needs to be saved separately so that it\ncan be used when switching from regular sleep to ptrace_stop().  This\nis recorded in the lower 16bits of task-\u003egroup_stop.\n\nIf a task is already stopped and there\u0027s no intervening SIGCONT, a\nptrace request immediately following a successful PTRACE_ATTACH should\nalways succeed even if the tracer doesn\u0027t wait(2) for attach\ncompletion; however, with this change, the tracee might still be\nTASK_RUNNING trying to enter TASK_TRACED which would cause the\nfollowing request to fail with -ESRCH.\n\nThis intermediate state is hidden from the ptracer by setting\nGROUP_STOP_TRAPPING on attach and making ptrace_check_attach() wait\nfor it to clear on its signal-\u003ewait_chldexit.  Completing the\ntransition or getting killed clears TRAPPING and wakes up the tracer.\n\nNote that the STOPPED -\u003e RUNNING -\u003e TRACED transition is still visible\nto other threads which are in the same group as the ptracer and the\nreverse transition is visible to all.  Please read the comments for\ndetails.\n\nOleg:\n\n* Spotted a race condition where a task may retry group stop without\n  proper bookkeeping.  Fixed by redoing bookkeeping on retry.\n\n* Spotted that the transition is visible to userland in several\n  different ways.  Most are fixed with GROUP_STOP_TRAPPING.  Unhandled\n  corner case is documented.\n\n* Pointed out not setting GROUP_STOP_SIGMASK on an already stopped\n  task would result in more consistent behavior.\n\n* Pointed out that calling ptrace_stop() from do_signal_stop() in\n  TASK_STOPPED can race with group stop start logic and then confuse\n  the TRAPPING wait in ptrace_check_attach().  ptrace_stop() is now\n  called with TASK_RUNNING.\n\n* Suggested using signal-\u003ewait_chldexit instead of bit wait.\n\n* Spotted a race condition between TRACED transition and clearing of\n  TRAPPING.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: Jan Kratochvil \u003cjan.kratochvil@redhat.com\u003e\n"
    },
    {
      "commit": "9f2bf6513a6cca0b00cbbf67ba6197017cfba548",
      "tree": "da20b400d446248fb9a578cc40da08d4398830bc",
      "parents": [
        "c672af35d54992b88d3c48133bd62cc3386fb2f9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:00 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 23 10:37:00 2011 +0100"
      },
      "message": "ptrace: Remove the extra wake_up_state() from ptrace_detach()\n\nThis wake_up_state() has a turbulent history.  This is a remnant from\nancient ptrace implementation and patently wrong.  Commit 95a3540d\n(ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic) removed\nit but the change was reverted later by commit edaba2c5 (ptrace:\nrevert \"ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic\")\nciting compatibility breakage and general brokeness of the whole group\nstop / ptrace interaction.  Then, recently, it got converted from\nwake_up_process() to wake_up_state() to make it less dangerous.\n\nDigging through the mailing archives, the compatibility breakage\ndoesn\u0027t seem to be critical in the sense that the behavior isn\u0027t well\ndefined or reliable to begin with and it seems to have been agreed to\nremove the wakeup with proper cleanup of the whole thing.\n\nNow that the group stop and its interaction with ptrace are being\ncleaned up, it\u0027s high time to finally kill this silliness.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\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": "01e05e9a90b8f4c3997ae0537e87720eb475e532",
      "tree": "e5bace65224c8b026cfd06a28cd00c3f3a69a0c8",
      "parents": [
        "d863b50ab01333659314c2034890cb76d9fdc3c7"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Feb 10 15:01:22 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 11 16:12:19 2011 -0800"
      },
      "message": "ptrace: use safer wake up on ptrace_detach()\n\nThe wake_up_process() call in ptrace_detach() is spurious and not\ninterlocked with the tracee state.  IOW, the tracee could be running or\nsleeping in any place in the kernel by the time wake_up_process() is\ncalled.  This can lead to the tracee waking up unexpectedly which can be\ndangerous.\n\nThe wake_up is spurious and should be removed but for now reduce its\ntoxicity by only waking up if the tracee is in TRACED or STOPPED state.\n\nThis bug can possibly be used as an attack vector.  I don\u0027t think it\nwill take too much effort to come up with an attack which triggers oops\nsomewhere.  Most sleeps are wrapped in condition test loops and should\nbe safe but we have quite a number of places where sleep and wakeup\nconditions are expected to be interlocked.  Although the window of\nopportunity is tiny, ptrace can be used by non-privileged users and with\nsome loading the window can definitely be extended and exploited.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: \u003cstable@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": "9b1bf12d5d51bca178dea21b04a0805e29d60cf1",
      "tree": "902a2c0e5882a2152da59a589958d6426dc84643",
      "parents": [
        "b84011508360d6885a9d95a235ec77d56f133377"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Oct 27 15:34:08 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Oct 27 18:03:12 2010 -0700"
      },
      "message": "signals: move cred_guard_mutex from task_struct to signal_struct\n\nOleg Nesterov pointed out we have to prevent multiple-threads-inside-exec\nitself and we can reuse -\u003ecred_guard_mutex for it.  Yes, concurrent\nexecve() has no worth.\n\nLet\u0027s move -\u003ecred_guard_mutex from task_struct to signal_struct.  It\nnaturally prevent multiple-threads-inside-exec.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: 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": "9fed81dc40f5a1ac2783bcc78d4029873be72894",
      "tree": "6eee883c2a782380f277e045f6a7258ef949a9a6",
      "parents": [
        "4abf986960ecda6a87fc2f795aacf888a2f0127e"
      ],
      "author": {
        "name": "Namhyung Kim",
        "email": "namhyung@gmail.com",
        "time": "Wed Oct 27 15:33:46 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Oct 27 18:03:10 2010 -0700"
      },
      "message": "ptrace: cleanup ptrace_request()\n\nUse new \u0027datavp\u0027 and \u0027datalp\u0027 variables to remove unnecesary castings.\n\nSigned-off-by: Namhyung Kim \u003cnamhyung@gmail.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": "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": "c4b5ed250eebf854d40f27b43362c80f115cb57a",
      "tree": "870b5385ea51c0afbf3865fe6d7e3de3130dbbbe",
      "parents": [
        "26174efd42100eefac67732c0c12f41a205fa335"
      ],
      "author": {
        "name": "Namhyung Kim",
        "email": "namhyung@gmail.com",
        "time": "Wed Oct 27 15:33:44 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Oct 27 18:03:10 2010 -0700"
      },
      "message": "ptrace: annotate lock context change on exit_ptrace()\n\nexit_ptrace() releases and regrabs tasklist_lock but was missing proper\nannotation.  Add it.\n\nSigned-off-by: Namhyung Kim \u003cnamhyung@gmail.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c7e49c1488ab20342eaaf38f1ca35a207f4c051d",
      "tree": "43876a69cafbb49ce86f71ba5db88018ca7cc036",
      "parents": [
        "13d7e3a2dba6a79589ed34dc0b9114d7b5ff9eab"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Tue Aug 10 18:03:07 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 11 08:59:19 2010 -0700"
      },
      "message": "ptrace: optimize exit_ptrace() for the likely case\n\nexit_ptrace() takes tasklist_lock unconditionally.  We need this lock to\navoid the race with ptrace_traceme(), it acts as a barrier.\n\nChange its caller, forget_original_parent(), to call exit_ptrace() under\ntasklist_lock.  Change exit_ptrace() to drop and reacquire this lock if\nneeded.\n\nThis allows us to add the fastpath list_empty(ptraced) check.  In the\nlikely no-tracees case exit_ptrace() just returns and we avoid the lock()\n+ unlock() sequence.\n\n\"Zhang, Yanmin\" \u003cyanmin_zhang@linux.intel.com\u003e suggested to add this\ncheck, and he reports that this change adds about 11% improvement in some\ntests.\n\nSuggested-and-tested-by: \"Zhang, Yanmin\" \u003cyanmin_zhang@linux.intel.com\u003e\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": "e0129ef91ed758c06b6557c36124acfb2e1c7305",
      "tree": "e47392371ed106f2241d18ac6339bedd6c699c9b",
      "parents": [
        "9c1a125921d146f22cf28ff366ff69fd602a0e9b"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed May 26 14:42:53 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 27 09:12:44 2010 -0700"
      },
      "message": "ptrace: PTRACE_GETFDPIC: fix the unsafe usage of child-\u003emm\n\nNow that Mike Frysinger unified the FDPIC ptrace code, we can fix the\nunsafe usage of child-\u003emm in ptrace_request(PTRACE_GETFDPIC).\n\nWe have the reference to task_struct, and ptrace_check_attach() verified\nthe tracee is stopped.  But nothing can protect from SIGKILL after that,\nwe must not assume child-\u003emm !\u003d NULL.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Mike Frysinger \u003cvapier.adi@gmail.com\u003e\nAcked-by: David Howells \u003cdhowells@redhat.com\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Greg Ungerer \u003cgerg@snapgear.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": "9c1a125921d146f22cf28ff366ff69fd602a0e9b",
      "tree": "37df1b2ae74c23371de7e8b46427fc0a16727cdb",
      "parents": [
        "0ac0c0d0f837c499afd02a802f9cf52d3027fa3b"
      ],
      "author": {
        "name": "Mike Frysinger",
        "email": "vapier@gentoo.org",
        "time": "Wed May 26 14:42:52 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 27 09:12:44 2010 -0700"
      },
      "message": "ptrace: unify FDPIC implementations\n\nThe Blackfin/FRV/SuperH guys all have the same exact FDPIC ptrace code in\ntheir arch handlers (since they were probably copied \u0026 pasted).  Since\nthese ptrace interfaces are an arch independent aspect of the FDPIC code,\nunify them in the common ptrace code so new FDPIC ports don\u0027t need to copy\nand paste this fundamental stuff yet again.\n\nSigned-off-by: Mike Frysinger \u003cvapier@gentoo.org\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nAcked-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Oleg Nesterov \u003coleg@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": "4d7b4ac22fbec1a03206c6cde353f2fd6942f828",
      "tree": "2d96a9e9c28cf6fa628a278decc00ad55a8b043b",
      "parents": [
        "3aaf51ace5975050ab43c7d4d7e439e0ae7d13d7",
        "94f3ca95787ada3d64339a4ecb2754236ab563f6"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 18 08:19:03 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 18 08:19:03 2010 -0700"
      },
      "message": "Merge branch \u0027perf-core-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip\n\n* \u0027perf-core-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (311 commits)\n  perf tools: Add mode to build without newt support\n  perf symbols: symbol inconsistency message should be done only at verbose\u003d1\n  perf tui: Add explicit -lslang option\n  perf options: Type check all the remaining OPT_ variants\n  perf options: Type check OPT_BOOLEAN and fix the offenders\n  perf options: Check v type in OPT_U?INTEGER\n  perf options: Introduce OPT_UINTEGER\n  perf tui: Add workaround for slang \u003c 2.1.4\n  perf record: Fix bug mismatch with -c option definition\n  perf options: Introduce OPT_U64\n  perf tui: Add help window to show key associations\n  perf tui: Make \u003c- exit menus too\n  perf newt: Add single key shortcuts for zoom into DSO and threads\n  perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed\n  perf newt: Fix the \u0027A\u0027/\u0027a\u0027 shortcut for annotate\n  perf newt: Make \u003c- exit the ui_browser\n  x86, perf: P4 PMU - fix counters management logic\n  perf newt: Make \u003c- zoom out filters\n  perf report: Report number of events, not samples\n  perf hist: Clarify events_stats fields usage\n  ...\n\nFix up trivial conflicts in kernel/fork.c and tools/perf/builtin-record.c\n"
    },
    {
      "commit": "b8bc1389b74c2b66255651a6fcfae56c78b6e63f",
      "tree": "dc3d2b1d6beab0dd44ed0dda2e0aa1cc2a99be44",
      "parents": [
        "5534ecb2dda04345e8243901e0e49599228b4273"
      ],
      "author": {
        "name": "Alessio Igor Bogani",
        "email": "abogani@texware.it",
        "time": "Sun Apr 25 13:18:48 2010 +0200"
      },
      "committer": {
        "name": "Frederic Weisbecker",
        "email": "fweisbec@gmail.com",
        "time": "Mon Apr 26 23:42:51 2010 +0200"
      },
      "message": "ptrace: Cleanup useless header\n\nBKL isn\u0027t present anymore into this file thus we can safely remove\nsmp_lock.h inclusion.\n\nSigned-off-by: Alessio Igor Bogani \u003cabogani@texware.it\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: James Morris \u003cjmorris@namei.org\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\n"
    },
    {
      "commit": "5534ecb2dda04345e8243901e0e49599228b4273",
      "tree": "1d09ca0bcc6fcac12310300a306c233e350151c7",
      "parents": [
        "2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6"
      ],
      "author": {
        "name": "Arnd Bergmann",
        "email": "arnd@arndb.de",
        "time": "Sat Feb 27 19:49:37 2010 +0100"
      },
      "committer": {
        "name": "Frederic Weisbecker",
        "email": "fweisbec@gmail.com",
        "time": "Sat Apr 10 15:34:21 2010 +0200"
      },
      "message": "ptrace: kill BKL in ptrace syscall\n\nThe comment suggests that this usage is stale. There is no bkl in the\nexec path so if there is a race lurking there, the bkl in ptrace is\nnot going to help in this regard.\n\nOverview of the possibility of \"accidental\" races this bkl might\nprotect:\n\n- ptrace_traceme() is protected against task removal and concurrent\nread/write on current-\u003eptrace as it locks write tasklist_lock.\n\n- arch_ptrace_attach() is serialized by ptrace_traceme() against\nconcurrent PTRACE_TRACEME or PTRACE_ATTACH\n\n- ptrace_attach() is protected the same way ptrace_traceme() and\nin turn serializes arch_ptrace_attach()\n\n- ptrace_check_attach() does its own well described serializing too.\n\nThere is no obvious race here.\n\nSigned-off-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Roland McGrath \u003croland@redhat.com\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": "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": "a7f0765edfd53aed09cb7b0e15863688b39447de",
      "tree": "c89adfe418f9988ad4044e0f22827458bdf6b155",
      "parents": [
        "1dd3a27326d307952f8ad2499478c84dc7311517"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Sep 23 15:56:44 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "ptrace: __ptrace_detach: do __wake_up_parent() if we reap the tracee\n\nThe bug is old, it wasn\u0027t cause by recent changes.\n\nTest case:\n\n\tstatic void *tfunc(void *arg)\n\t{\n\t\tint pid \u003d (long)arg;\n\n\t\tassert(ptrace(PTRACE_ATTACH, pid, NULL, NULL) \u003d\u003d 0);\n\t\tkill(pid, SIGKILL);\n\n\t\tsleep(1);\n\t\treturn NULL;\n\t}\n\n\tint main(void)\n\t{\n\t\tpthread_t th;\n\t\tlong pid \u003d fork();\n\n\t\tif (!pid)\n\t\t\tpause();\n\n\t\tsignal(SIGCHLD, SIG_IGN);\n\t\tassert(pthread_create(\u0026th, NULL, tfunc, (void*)pid) \u003d\u003d 0);\n\n\t\tint r \u003d waitpid(-1, NULL, __WNOTHREAD);\n\t\tprintf(\"waitpid: %d %m\\n\", r);\n\n\t\treturn 0;\n\t}\n\nBefore the patch this program hangs, after this patch waitpid() correctly\nfails with errno \u003d\u003d -ECHILD.\n\nThe problem is, __ptrace_detach() reaps the EXIT_ZOMBIE tracee if its\n-\u003ereal_parent is our sub-thread and we ignore SIGCHLD.  But in this case\nwe should wake up other threads which can sleep in do_wait().\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: Vitaly Mayatskikh \u003cvmayatsk@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": "7d45ecafb6792ca68da9517969d37d910601845f",
      "tree": "a98b1074e5577e66a97963745f975404d0aac266",
      "parents": [
        "be940d6279c30a2d7c4e8d1d5435f957f594d66d",
        "7638d5322bd89d49e013a03fe2afaeb6d214fabd"
      ],
      "author": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Tue Jul 14 00:30:40 2009 +1000"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Tue Jul 14 00:30:40 2009 +1000"
      },
      "message": "Merge branch \u0027master\u0027 into next\n\nConflicts:\n\tinclude/linux/personality.h\n\nUse Linus\u0027 version.\n\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "793285fcafce4719a05e0c99fa74b188157fe7fe",
      "tree": "3395530c1d4e604beac506c703b3093bb13f23ee",
      "parents": [
        "82e3310ace59794ecf0f531eca94647b2863dfda"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sun Jul 05 12:08:26 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jul 06 13:57:04 2009 -0700"
      },
      "message": "cred_guard_mutex: do not return -EINTR to user-space\n\ndo_execve() and ptrace_attach() return -EINTR if\nmutex_lock_interruptible(-\u003ecred_guard_mutex) fails.\n\nThis is not right, change the code to return ERESTARTNOINTR.\n\nPerhaps we should also change proc_pid_attr_write().\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: James Morris \u003cjmorris@namei.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9e48858f7d36a6a3849f1d1b40c3bf5624b4ee7c",
      "tree": "5d8fe586c5b1bbab36acc3b76b2b4dd1bc538968",
      "parents": [
        "86abcf9cebf7b5ceb33facde297face5ec4d2260"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Thu May 07 19:26:19 2009 +1000"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Thu Jun 25 00:18:05 2009 +1000"
      },
      "message": "security: rename ptrace_may_access \u003d\u003e ptrace_access_check\n\nThe -\u003eptrace_may_access() methods are named confusingly - the real\nptrace_may_access() returns a bool, while these security checks have\na retval convention.\n\nRename it to ptrace_access_check, to reduce the confusion factor.\n\n[ Impact: cleanup, no code changed ]\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "e49612544c695117644af48bb4625264a3d2918f",
      "tree": "7fe576d195533fb671c7a610cc35e9608e48c87e",
      "parents": [
        "d92656633b8352c6d4b14afcb7beb154d76e7aa6"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 17 16:27:36 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:52 2009 -0700"
      },
      "message": "ptrace: don\u0027t take tasklist to get/set -\u003elast_siginfo\n\nChange ptrace_getsiginfo/ptrace_setsiginfo to use lock_task_sighand()\nwithout tasklist_lock.  Perhaps it makes sense to make a single helper\nwith \"bool rw\" argument.\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": "4b105cbbaf7c06e01c27391957dc3c446328d087",
      "tree": "4b6a65061a7bf46baea9d8867fdda0c22c8a3d45",
      "parents": [
        "f2f0b00ad61d53adfecb8bdf8f3cf8f05f6ed548"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 17 16:27:33 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:51 2009 -0700"
      },
      "message": "ptrace: do not use task_lock() for attach\n\nRemove the \"Nasty, nasty\" lock dance in ptrace_attach()/ptrace_traceme() -\nfrom now task_lock() has nothing to do with ptrace at all.\n\nWith the recent changes nobody uses task_lock() to serialize with ptrace,\nbut in fact it was never needed and it was never used consistently.\n\nHowever ptrace_attach() calls __ptrace_may_access() and needs task_lock()\nto pin task-\u003emm for get_dumpable().  But we can call __ptrace_may_access()\nbefore we take tasklist_lock, -\u003ecred_exec_mutex protects us against\ndo_execve() path which can change creds and MMF_DUMP* flags.\n\n(ugly, but we can\u0027t use ptrace_may_access() because it hides the error\ncode, so we have to take task_lock() and use __ptrace_may_access()).\n\nNOTE: this change assumes that LSM hooks, security_ptrace_may_access() and\nsecurity_ptrace_traceme(), can be called without task_lock() held.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Chris Wright \u003cchrisw@sous-sol.org\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": "f2f0b00ad61d53adfecb8bdf8f3cf8f05f6ed548",
      "tree": "dda08f8bb3e8c403b2d1cf941b17c9909975c209",
      "parents": [
        "b79b7ba93df14a1fc0b8d4d6d78a0e097de03bbd"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 17 16:27:32 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:51 2009 -0700"
      },
      "message": "ptrace: cleanup check/set of PT_PTRACED during attach\n\nptrace_attach() and ptrace_traceme() are the last functions which look as\nif the untraced task can have task-\u003eptrace !\u003d 0, this must not be\npossible.  Change the code to just check -\u003eptrace !\u003d 0 and s/|\u003d/\u003d/ to set\nPT_PTRACED.\n\nAlso, a couple of trivial whitespace cleanups in ptrace_attach().\n\nAnd move ptrace_traceme() up near ptrace_attach() to keep them close to\neach other.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Chris Wright \u003cchrisw@sous-sol.org\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": "b79b7ba93df14a1fc0b8d4d6d78a0e097de03bbd",
      "tree": "65ce7c7335fc1dd0a91a3224466c4eaa0ec489f4",
      "parents": [
        "5cb11446892833e50970fb2277a9f7563b0a8bd3"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 17 16:27:31 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:51 2009 -0700"
      },
      "message": "ptrace: ptrace_attach: check PF_KTHREAD + exit_state instead of -\u003emm\n\n- Add PF_KTHREAD check to prevent attaching to the kernel thread\n  with a borrowed -\u003emm.\n\n  With or without this change we can race with daemonize() which\n  can set PF_KTHREAD or clear -\u003emm after ptrace_attach() does the\n  check, but this doesn\u0027t matter because reparent_to_kthreadd()\n  does ptrace_unlink().\n\n- Kill \"!task-\u003emm\" check. We don\u0027t really care about -\u003emm !\u003d NULL,\n  and the task can call exit_mm() right after we drop task_lock().\n  What we need is to make sure we can\u0027t attach after exit_notify(),\n  check task-\u003eexit_state !\u003d 0 instead.\n\nAlso, move the \"already traced\" check down for cosmetic reasons.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Chris Wright \u003cchrisw@sous-sol.org\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": "3296ca27f50ecbd71db1d808c7a72d311027f919",
      "tree": "833eaa58b2013bda86d4bd95faf6efad7a2d5ca4",
      "parents": [
        "e893123c7378192c094747dadec326b7c000c190",
        "73fbad283cfbbcf02939bdbda31fc4a30e729cca"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 11 10:01:41 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 11 10:01:41 2009 -0700"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (44 commits)\n  nommu: Provide mmap_min_addr definition.\n  TOMOYO: Add description of lists and structures.\n  TOMOYO: Remove unused field.\n  integrity: ima audit dentry_open failure\n  TOMOYO: Remove unused parameter.\n  security: use mmap_min_addr indepedently of security models\n  TOMOYO: Simplify policy reader.\n  TOMOYO: Remove redundant markers.\n  SELinux: define audit permissions for audit tree netlink messages\n  TOMOYO: Remove unused mutex.\n  tomoyo: avoid get+put of task_struct\n  smack: Remove redundant initialization.\n  integrity: nfsd imbalance bug fix\n  rootplug: Remove redundant initialization.\n  smack: do not beyond ARRAY_SIZE of data\n  integrity: move ima_counts_get\n  integrity: path_check update\n  IMA: Add __init notation to ima functions\n  IMA: Minimal IMA policy and boot param for TCB IMA policy\n  selinux: remove obsolete read buffer limit from sel_read_bool\n  ...\n"
    },
    {
      "commit": "862366118026a358882eefc70238dbcc3db37aac",
      "tree": "4eb62bc10327a5afac064a95a091ea05ecd2acc1",
      "parents": [
        "57eee9ae7bbcfb692dc96c739a5184adb6349733",
        "511b01bdf64ad8a38414096eab283c7784aebfc4"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 10 19:53:40 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 10 19:53:40 2009 -0700"
      },
      "message": "Merge branch \u0027tracing-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip\n\n* \u0027tracing-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (244 commits)\n  Revert \"x86, bts: reenable ptrace branch trace support\"\n  tracing: do not translate event helper macros in print format\n  ftrace/documentation: fix typo in function grapher name\n  tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK\n  tracing: add protection around module events unload\n  tracing: add trace_seq_vprint interface\n  tracing: fix the block trace points print size\n  tracing/events: convert block trace points to TRACE_EVENT()\n  ring-buffer: fix ret in rb_add_time_stamp\n  ring-buffer: pass in lockdep class key for reader_lock\n  tracing: add annotation to what type of stack trace is recorded\n  tracing: fix multiple use of __print_flags and __print_symbolic\n  tracing/events: fix output format of user stack\n  tracing/events: fix output format of kernel stack\n  tracing/trace_stack: fix the number of entries in the header\n  ring-buffer: discard timestamps that are at the start of the buffer\n  ring-buffer: try to discard unneeded timestamps\n  ring-buffer: fix bug in ring_buffer_discard_commit\n  ftrace: do not profile functions when disabled\n  tracing: make trace pipe recognize latency format flag\n  ...\n"
    },
    {
      "commit": "0b4ec6e4e01d98e55ae325a41304cccd87fa4c0f",
      "tree": "1e075fdf4aaf0c5c003564b3f3414bb4a92ef2ed",
      "parents": [
        "04288f42033607099cebf5ca15ce8dcec3a9688b",
        "3af968e066d593bc4dacc021715f3e95ddf0996f"
      ],
      "author": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Tue Jun 09 09:27:53 2009 +1000"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Tue Jun 09 09:27:53 2009 +1000"
      },
      "message": "Merge branch \u0027master\u0027 into next\n"
    },
    {
      "commit": "edaba2c5334492f82d39ec35637c6dea5176a977",
      "tree": "d05ee0eacdb0c725da8374e9c1f38a4808dfdd2e",
      "parents": [
        "08f67461c609ad96bf26732b590569e02e322019"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Jun 04 16:29:09 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 04 18:07:40 2009 -0700"
      },
      "message": "ptrace: revert \"ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic\"\n\nCommit 95a3540da9c81a5987be810e1d9a83640a366bd5 (\"ptrace_detach: the wrong\nwakeup breaks the ERESTARTxxx logic\") removed the \"extra\"\nwake_up_process() from ptrace_detach(), but as Jan pointed out this breaks\nthe compatibility.\n\nI believe the changelog is right and this wake_up() is wrong in many\nways, but GDB assumes that ptrace(PTRACE_DETACH, child, 0, 0) always\nwakes up the tracee.\n\nDespite the fact this breaks SIGNAL_STOP_STOPPED/group_stop_count logic,\nand despite the fact this wake_up_process() can break another\nassumption: PTRACE_DETACH with SIGSTOP should leave the tracee in\nTASK_STOPPED case.  Because the untraced child can dequeue SIGSTOP and\ncall do_signal_stop() before ptrace_detach() calls wake_up_process().\n\nRevert this change for now.  We need some fixes even if we we want to keep\nthe current behaviour, but these fixes are not for 2.6.30.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: Jan Kratochvil \u003cjan.kratochvil@redhat.com\u003e\nCc: 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": "5e751e992f3fb08ba35e1ca8095ec8fbf9eda523",
      "tree": "711b1b47622dc9661f1d3d9c67d55c0b21456e8c",
      "parents": [
        "d254117099d711f215e62427f55dfb8ebd5ad011"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Fri May 08 13:55:22 2009 +0100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Mon May 11 08:15:36 2009 +1000"
      },
      "message": "CRED: Rename cred_exec_mutex to reflect that it\u0027s a guard against ptrace\n\nRename cred_exec_mutex to reflect that it\u0027s a guard against foreign\nintervention on a process\u0027s credential state, such as is made by ptrace().  The\nattachment of a debugger to a process affects execve()\u0027s calculation of the new\ncredential state - _and_ also setprocattr()\u0027s calculation of that state.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "0ad5d703c6c0fcd385d956555460df95dff7eb7e",
      "tree": "4b777100f9be4fe90ca4bd043b9f98df672b5b3b",
      "parents": [
        "44347d947f628060b92449702071bfe1d31dfb75",
        "1cb81b143fa8f0e4629f10690862e2e52ca792ff"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Thu May 07 11:18:34 2009 +0200"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Thu May 07 13:36:22 2009 +0200"
      },
      "message": "Merge branch \u0027tracing/hw-branch-tracing\u0027 into tracing/core\n\nMerge reason: this topic is ready for upstream now. It passed\n              Oleg\u0027s review and Andrew had no further mm/*\n              objections/observations either.\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "cad81bc2529ab8c62b6fdc83a1c0c7f4a87209eb",
      "tree": "8d056ddb9db3db5eeba6a6fb629efe2c05b67ea0",
      "parents": [
        "ce8a7424d23a36f043d0de8484f888971c831119"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Apr 27 01:41:34 2009 +0200"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Mon Apr 27 20:30:51 2009 +1000"
      },
      "message": "ptrace: ptrace_attach: fix the usage of -\u003ecred_exec_mutex\n\nptrace_attach() needs task-\u003ecred_exec_mutex, not current-\u003ecred_exec_mutex.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nAcked-by: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "416dfdcdb894432547ead4fcb9fa6a36b396059e",
      "tree": "8033fdda07397a59c5fa98c88927040906ce6c1a",
      "parents": [
        "56449f437add737a1e5e1cb7e00f63ac8ead1938",
        "091069740304c979f957ceacec39c461d0192158"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Fri Apr 24 10:11:18 2009 +0200"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Fri Apr 24 10:11:23 2009 +0200"
      },
      "message": "Merge commit \u0027v2.6.30-rc3\u0027 into tracing/hw-branch-tracing\n\nConflicts:\n\tarch/x86/kernel/ptrace.c\n\nMerge reason: fix the conflict above, and also pick up the CONFIG_BROKEN\n              dependency change from upstream so that we can remove it\n\t      here.\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "f1671f6d783a2385d32e11f456cbe32f0e4b4b49",
      "tree": "3d2dd4672db69b9d3b7f35e06b0fb90ca4d8cc12",
      "parents": [
        "7b102d034c0affc6ee703b576f2496ec6cb81d79"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Apr 13 14:40:03 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 13 15:04:31 2009 -0700"
      },
      "message": "ptrace: fix exit_ptrace() vs ptrace_traceme() race\n\nPointed out by Roland.  The bug was recently introduced by me in\n\"forget_original_parent: split out the un-ptrace part\", commit\n39c626ae47c469abdfd30c6e42eff884931380d6.\n\nSince that patch we have a window after exit_ptrace() drops tasklist and\nbefore forget_original_parent() takes it again.  In this window the child\ncan do ptrace(PTRACE_TRACEME) and nobody can untrace this child after\nthat.\n\nChange ptrace_traceme() to not attach to the exiting -\u003ereal_parent.  We\ndon\u0027t report the error in this case, we pretend we attach right before\n-\u003ereal_parent calls exit_ptrace() which should untrace us anyway.\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": "3a709703538c471530405556dda136fd0d82b0dc",
      "tree": "0479d66b10b6d77bacc269471285bd2be344ccb9",
      "parents": [
        "4c967291fc875a53de7126d256ad5e48f42a6521"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Tue Apr 07 23:21:06 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 08 10:21:44 2009 -0700"
      },
      "message": "ptrace: some checkpatch fixes\n\nThis fixes all the checkpatch --file complaints about kernel/ptrace.c\nand also removes an unused #include.  I\u0027ve verified that there are no\nchanges to the compiled code on x86_64.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\n[ Removed the parts that just split a line  - Linus ]\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": "09f38dc19deba9eae1d668dde8bdd2aaed3479ed",
      "tree": "5eaf5da4572374948ad62ab6dd4403726938c32a",
      "parents": [
        "30a39e0e97f948e3ac8eeacd54d09f4bbfbab64b",
        "bbb76b552a9cef86777181c8577acc907b122b41"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Apr 03 17:35:06 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Apr 03 17:35:06 2009 -0700"
      },
      "message": "Merge branch \u0027core-cleanups-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip\n\n* \u0027core-cleanups-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:\n  ptrace: remove a useless goto\n"
    },
    {
      "commit": "1ee1184485df9c9a3503d3a684b911fb7c73d259",
      "tree": "0216bc3ebccf1c44b86617cd06e7b93510ef5bb8",
      "parents": [
        "95a3540da9c81a5987be810e1d9a83640a366bd5"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 02 16:58:23 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:05:00 2009 -0700"
      },
      "message": "ptrace_untrace: fix the SIGNAL_STOP_STOPPED check\n\nThis bug is ancient too. ptrace_untrace() must not resume the task\nif the group stop in progress, we should set TASK_STOPPED instead.\n\nUnfortunately, we still have problems here:\n\n\t- if the process/thread was traced, SIGNAL_STOP_STOPPED\n\t  does not necessary means this thread group is stopped.\n\n\t- ptrace breaks the bookkeeping of -\u003egroup_stop_count.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Jerome Marchand \u003cjmarchan@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: 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": "95a3540da9c81a5987be810e1d9a83640a366bd5",
      "tree": "d5143f232f885f6aa8829288dc0ceb2cd9e6e34e",
      "parents": [
        "bb24c679a51b1a9b726b901330649e3861814ac0"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 02 16:58:21 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:05:00 2009 -0700"
      },
      "message": "ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic\n\nAnother ancient bug. Consider this trivial test-case,\n\n\tint main(void)\n\t{\n\t\tint pid \u003d fork();\n\n\t\tif (pid) {\n\t\t\tptrace(PTRACE_ATTACH, pid, NULL, NULL);\n\t\t\twait(NULL);\n\t\t\tptrace(PTRACE_DETACH, pid, NULL, NULL);\n\t\t} else {\n\t\t\tpause();\n\t\t\tprintf(\"WE HAVE A KERNEL BUG!!!\\n\");\n\t\t}\n\n\t\treturn 0;\n\t}\n\nthe child must not \"escape\" for sys_pause(), but it can and this was seen\nin practice.\n\nThis is because ptrace_detach does:\n\n\tif (!child-\u003eexit_state)\n\t\twake_up_process(child);\n\nthis wakeup can happen after this child has already restarted sys_pause(),\nbecause it gets another wakeup from ptrace_untrace().\n\nWith or without this patch, perhaps sys_pause() needs a fix.  But this\nwakeup also breaks the SIGNAL_STOP_STOPPED logic in ptrace_untrace().\n\nRemove this wakeup.  The caller saw this task in TASK_TRACED state, and\nunless it was SIGKILL\u0027ed in between __ptrace_unlink()-\u003eptrace_untrace()\nshould handle this case correctly.  If it was SIGKILL\u0027ed, we don\u0027t need to\nwakup the dying tracee too.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Jerome Marchand \u003cjmarchan@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nCc: 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": "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": "95c3eb76dc07fd81289888ffc42948196b34b444",
      "tree": "a656316699a090405387d0071bac2a03a7128f57",
      "parents": [
        "6588c1e3ff01418acafd938db0740e3477dc8cb7"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Thu Apr 02 16:58:11 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:59 2009 -0700"
      },
      "message": "ptrace: kill __ptrace_detach(), fix -\u003eexit_state check\n\nMove the code from __ptrace_detach() to its single caller and kill this\nhelper.\n\nAlso, fix the -\u003eexit_state check, we shouldn\u0027t wake up EXIT_DEAD tasks.\nActually, I think task_is_stopped_or_traced() makes more sense, but this\nneeds another patch.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Jerome Marchand \u003cjmarchan@redhat.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: 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": "bbb76b552a9cef86777181c8577acc907b122b41",
      "tree": "8e306a63d56781776cf800faa3fb312a3bf7367d",
      "parents": [
        "7a203f3b089be4410fe065dd9927027eade94557"
      ],
      "author": {
        "name": "Américo Wang",
        "email": "xiyou.wangcong@gmail.com",
        "time": "Tue Mar 10 17:34:47 2009 +0800"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Tue Mar 10 13:39:29 2009 +0100"
      },
      "message": "ptrace: remove a useless goto\n\nImpact: cleanup\n\nObviously, this goto is useless. Remove it.\n\nSigned-off-by: WANG Cong \u003cxiyou.wangcong@gmail.com\u003e\nCc: Andrew Morton \u003cakpm@osdl.org\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nLKML-Reference: \u003c20090310093447.GC3179@hack\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "1e7bfb2134dfec37ce04fb3a4ca89299e892d10c",
      "tree": "99c676262e696754dcbfb2d6f59499972cd0c38c",
      "parents": [
        "c4ea37c26a691ad0b7e86aa5884aab27830e95c9"
      ],
      "author": {
        "name": "Heiko Carstens",
        "email": "heiko.carstens@de.ibm.com",
        "time": "Wed Jan 14 14:14:29 2009 +0100"
      },
      "committer": {
        "name": "Heiko Carstens",
        "email": "heiko.carstens@de.ibm.com",
        "time": "Wed Jan 14 14:15:29 2009 +0100"
      },
      "message": "[CVE-2009-0029] System call wrappers part 27\n\nSigned-off-by: Heiko Carstens \u003cheiko.carstens@de.ibm.com\u003e\n"
    },
    {
      "commit": "b0f4b285d7ed174804658539129a834270f4829a",
      "tree": "be7f8dca58075aba2c6a137fcfd4d44c5c333efc",
      "parents": [
        "be9c5ae4eeec2e85527e95647348b8ea4eb25128",
        "5250d329e38cdf7580faeb9c53c17d3588d7d19c"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Dec 28 12:21:10 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Dec 28 12:21:10 2008 -0800"
      },
      "message": "Merge branch \u0027tracing-core-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip\n\n* \u0027tracing-core-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (241 commits)\n  sched, trace: update trace_sched_wakeup()\n  tracing/ftrace: don\u0027t trace on early stage of a secondary cpu boot, v3\n  Revert \"x86: disable X86_PTRACE_BTS\"\n  ring-buffer: prevent false positive warning\n  ring-buffer: fix dangling commit race\n  ftrace: enable format arguments checking\n  x86, bts: memory accounting\n  x86, bts: add fork and exit handling\n  ftrace: introduce tracing_reset_online_cpus() helper\n  tracing: fix warnings in kernel/trace/trace_sched_switch.c\n  tracing: fix warning in kernel/trace/trace.c\n  tracing/ring-buffer: remove unused ring_buffer size\n  trace: fix task state printout\n  ftrace: add not to regex on filtering functions\n  trace: better use of stack_trace_enabled for boot up code\n  trace: add a way to enable or disable the stack tracer\n  x86: entry_64 - introduce FTRACE_ frame macro v2\n  tracing/ftrace: add the printk-msg-only option\n  tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()\n  x86, bts: correctly report invalid bts records\n  ...\n\nFixed up trivial conflict in scripts/recordmcount.pl due to SH bits\nbeing already partly merged by the SH merge.\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": "ec98ce480ada787f2cfbd696980ff3564415505b",
      "tree": "1a4d644b38f9f1e4b4e086fde0b195df4a92cf84",
      "parents": [
        "3496f92beb9aa99ef21fccc154a36c7698e9c538",
        "feaf3848a813a106f163013af6fcf6c4bfec92d9"
      ],
      "author": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Thu Dec 04 17:16:36 2008 +1100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Thu Dec 04 17:16:36 2008 +1100"
      },
      "message": "Merge branch \u0027master\u0027 into next\n\nConflicts:\n\tfs/nfsd/nfs4recover.c\n\nManually fixed above to use new creds API functions, e.g.\nnfs4_save_creds().\n\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "96b8936a9ed08746e47081458a5eb9e43a751e24",
      "tree": "d1a738fdd95dda182f99c90fe3079283e0b07307",
      "parents": [
        "16799c6a4d5156c6ee185b51b7586cca1aae0800"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Tue Nov 25 08:10:03 2008 +0100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 30 11:00:15 2008 -0800"
      },
      "message": "remove __ARCH_WANT_COMPAT_SYS_PTRACE\n\nAll architectures now use the generic compat_sys_ptrace, as should every\nnew architecture that needs 32bit compat (if we\u0027ll ever get another).\n\nRemove the now superflous __ARCH_WANT_COMPAT_SYS_PTRACE define, and also\nkill a comment about __ARCH_SYS_PTRACE that was added after\n__ARCH_SYS_PTRACE was already gone.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nAcked-by: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d84f4f992cbd76e8f39c488cf0c5d123843923b1",
      "tree": "fc4a0349c42995715b93d0f7a3c78e9ea9b3f36e",
      "parents": [
        "745ca2475a6ac596e3d8d37c2759c0fbe2586227"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Fri Nov 14 10:39:23 2008 +1100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Fri Nov 14 10:39:23 2008 +1100"
      },
      "message": "CRED: Inaugurate COW credentials\n\nInaugurate copy-on-write credentials management.  This uses RCU to manage the\ncredentials pointer in the task_struct with respect to accesses by other tasks.\nA process may only modify its own credentials, and so does not need locking to\naccess or modify its own credentials.\n\nA mutex (cred_replace_mutex) is added to the task_struct to control the effect\nof PTRACE_ATTACHED on credential calculations, particularly with respect to\nexecve().\n\nWith this patch, the contents of an active credentials struct may not be\nchanged directly; rather a new set of credentials must be prepared, modified\nand committed using something like the following sequence of events:\n\n\tstruct cred *new \u003d prepare_creds();\n\tint ret \u003d blah(new);\n\tif (ret \u003c 0) {\n\t\tabort_creds(new);\n\t\treturn ret;\n\t}\n\treturn commit_creds(new);\n\nThere are some exceptions to this rule: the keyrings pointed to by the active\ncredentials may be instantiated - keyrings violate the COW rule as managing\nCOW keyrings is tricky, given that it is possible for a task to directly alter\nthe keys in a keyring in use by another task.\n\nTo help enforce this, various pointers to sets of credentials, such as those in\nthe task_struct, are declared const.  The purpose of this is compile-time\ndiscouragement of altering credentials through those pointers.  Once a set of\ncredentials has been made public through one of these pointers, it may not be\nmodified, except under special circumstances:\n\n  (1) Its reference count may incremented and decremented.\n\n  (2) The keyrings to which it points may be modified, but not replaced.\n\nThe only safe way to modify anything else is to create a replacement and commit\nusing the functions described in Documentation/credentials.txt (which will be\nadded by a later patch).\n\nThis patch and the preceding patches have been tested with the LTP SELinux\ntestsuite.\n\nThis patch makes several logical sets of alteration:\n\n (1) execve().\n\n     This now prepares and commits credentials in various places in the\n     security code rather than altering the current creds directly.\n\n (2) Temporary credential overrides.\n\n     do_coredump() and sys_faccessat() now prepare their own credentials and\n     temporarily override the ones currently on the acting thread, whilst\n     preventing interference from other threads by holding cred_replace_mutex\n     on the thread being dumped.\n\n     This will be replaced in a future patch by something that hands down the\n     credentials directly to the functions being called, rather than altering\n     the task\u0027s objective credentials.\n\n (3) LSM interface.\n\n     A number of functions have been changed, added or removed:\n\n     (*) security_capset_check(), -\u003ecapset_check()\n     (*) security_capset_set(), -\u003ecapset_set()\n\n     \t Removed in favour of security_capset().\n\n     (*) security_capset(), -\u003ecapset()\n\n     \t New.  This is passed a pointer to the new creds, a pointer to the old\n     \t creds and the proposed capability sets.  It should fill in the new\n     \t creds or return an error.  All pointers, barring the pointer to the\n     \t new creds, are now const.\n\n     (*) security_bprm_apply_creds(), -\u003ebprm_apply_creds()\n\n     \t Changed; now returns a value, which will cause the process to be\n     \t killed if it\u0027s an error.\n\n     (*) security_task_alloc(), -\u003etask_alloc_security()\n\n     \t Removed in favour of security_prepare_creds().\n\n     (*) security_cred_free(), -\u003ecred_free()\n\n     \t New.  Free security data attached to cred-\u003esecurity.\n\n     (*) security_prepare_creds(), -\u003ecred_prepare()\n\n     \t New. Duplicate any security data attached to cred-\u003esecurity.\n\n     (*) security_commit_creds(), -\u003ecred_commit()\n\n     \t New. Apply any security effects for the upcoming installation of new\n     \t security by commit_creds().\n\n     (*) security_task_post_setuid(), -\u003etask_post_setuid()\n\n     \t Removed in favour of security_task_fix_setuid().\n\n     (*) security_task_fix_setuid(), -\u003etask_fix_setuid()\n\n     \t Fix up the proposed new credentials for setuid().  This is used by\n     \t cap_set_fix_setuid() to implicitly adjust capabilities in line with\n     \t setuid() changes.  Changes are made to the new credentials, rather\n     \t than the task itself as in security_task_post_setuid().\n\n     (*) security_task_reparent_to_init(), -\u003etask_reparent_to_init()\n\n     \t Removed.  Instead the task being reparented to init is referred\n     \t directly to init\u0027s credentials.\n\n\t NOTE!  This results in the loss of some state: SELinux\u0027s osid no\n\t longer records the sid of the thread that forked it.\n\n     (*) security_key_alloc(), -\u003ekey_alloc()\n     (*) security_key_permission(), -\u003ekey_permission()\n\n     \t Changed.  These now take cred pointers rather than task pointers to\n     \t refer to the security context.\n\n (4) sys_capset().\n\n     This has been simplified and uses less locking.  The LSM functions it\n     calls have been merged.\n\n (5) reparent_to_kthreadd().\n\n     This gives the current thread the same credentials as init by simply using\n     commit_thread() to point that way.\n\n (6) __sigqueue_alloc() and switch_uid()\n\n     __sigqueue_alloc() can\u0027t stop the target task from changing its creds\n     beneath it, so this function gets a reference to the currently applicable\n     user_struct which it then passes into the sigqueue struct it returns if\n     successful.\n\n     switch_uid() is now called from commit_creds(), and possibly should be\n     folded into that.  commit_creds() should take care of protecting\n     __sigqueue_alloc().\n\n (7) [sg]et[ug]id() and co and [sg]et_current_groups.\n\n     The set functions now all use prepare_creds(), commit_creds() and\n     abort_creds() to build and check a new set of credentials before applying\n     it.\n\n     security_task_set[ug]id() is called inside the prepared section.  This\n     guarantees that nothing else will affect the creds until we\u0027ve finished.\n\n     The calling of set_dumpable() has been moved into commit_creds().\n\n     Much of the functionality of set_user() has been moved into\n     commit_creds().\n\n     The get functions all simply access the data directly.\n\n (8) security_task_prctl() and cap_task_prctl().\n\n     security_task_prctl() has been modified to return -ENOSYS if it doesn\u0027t\n     want to handle a function, or otherwise return the return value directly\n     rather than through an argument.\n\n     Additionally, cap_task_prctl() now prepares a new set of credentials, even\n     if it doesn\u0027t end up using it.\n\n (9) Keyrings.\n\n     A number of changes have been made to the keyrings code:\n\n     (a) switch_uid_keyring(), copy_keys(), exit_keys() and suid_keys() have\n     \t all been dropped and built in to the credentials functions directly.\n     \t They may want separating out again later.\n\n     (b) key_alloc() and search_process_keyrings() now take a cred pointer\n     \t rather than a task pointer to specify the security context.\n\n     (c) copy_creds() gives a new thread within the same thread group a new\n     \t thread keyring if its parent had one, otherwise it discards the thread\n     \t keyring.\n\n     (d) The authorisation key now points directly to the credentials to extend\n     \t the search into rather pointing to the task that carries them.\n\n     (e) Installing thread, process or session keyrings causes a new set of\n     \t credentials to be created, even though it\u0027s not strictly necessary for\n     \t process or session keyrings (they\u0027re shared).\n\n(10) Usermode helper.\n\n     The usermode helper code now carries a cred struct pointer in its\n     subprocess_info struct instead of a new session keyring pointer.  This set\n     of credentials is derived from init_cred and installed on the new process\n     after it has been cloned.\n\n     call_usermodehelper_setup() allocates the new credentials and\n     call_usermodehelper_freeinfo() discards them if they haven\u0027t been used.  A\n     special cred function (prepare_usermodeinfo_creds()) is provided\n     specifically for call_usermodehelper_setup() to call.\n\n     call_usermodehelper_setkeys() adjusts the credentials to sport the\n     supplied keyring as the new session keyring.\n\n(11) SELinux.\n\n     SELinux has a number of changes, in addition to those to support the LSM\n     interface changes mentioned above:\n\n     (a) selinux_setprocattr() no longer does its check for whether the\n     \t current ptracer can access processes with the new SID inside the lock\n     \t that covers getting the ptracer\u0027s SID.  Whilst this lock ensures that\n     \t the check is done with the ptracer pinned, the result is only valid\n     \t until the lock is released, so there\u0027s no point doing it inside the\n     \t lock.\n\n(12) is_single_threaded().\n\n     This function has been extracted from selinux_setprocattr() and put into\n     a file of its own in the lib/ directory as join_session_keyring() now\n     wants to use it too.\n\n     The code in SELinux just checked to see whether a task shared mm_structs\n     with other tasks (CLONE_VM), but that isn\u0027t good enough.  We really want\n     to know if they\u0027re part of the same thread group (CLONE_THREAD).\n\n(13) nfsd.\n\n     The NFS server daemon now has to use the COW credentials to set the\n     credentials it is going to use.  It really needs to pass the credentials\n     down to the functions it calls, but it can\u0027t do that until other patches\n     in this series have been applied.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: James Morris \u003cjmorris@namei.org\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "c69e8d9c01db2adc503464993c358901c9af9de4",
      "tree": "bed94aaa9aeb7a7834d1c880f72b62a11a752c78",
      "parents": [
        "86a264abe542cfececb4df129bc45a0338d8cdb9"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Fri Nov 14 10:39:19 2008 +1100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Fri Nov 14 10:39:19 2008 +1100"
      },
      "message": "CRED: Use RCU to access another task\u0027s creds and to release a task\u0027s own creds\n\nUse RCU to access another task\u0027s creds and to release a task\u0027s own creds.\nThis means that it will be possible for the credentials of a task to be\nreplaced without another task (a) requiring a full lock to read them, and (b)\nseeing deallocated memory.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: James Morris \u003cjmorris@namei.org\u003e\nAcked-by: Serge Hallyn \u003cserue@us.ibm.com\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "b6dff3ec5e116e3af6f537d4caedcad6b9e5082a",
      "tree": "9e76f972eb7ce9b84e0146c8e4126a3f86acb428",
      "parents": [
        "15a2460ed0af7538ca8e6c610fe607a2cd9da142"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Fri Nov 14 10:39:16 2008 +1100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Fri Nov 14 10:39:16 2008 +1100"
      },
      "message": "CRED: Separate task security context from task_struct\n\nSeparate the task security context from task_struct.  At this point, the\nsecurity data is temporarily embedded in the task_struct with two pointers\npointing to it.\n\nNote that the Alpha arch is altered as it refers to (E)UID and (E)GID in\nentry.S via asm-offsets.\n\nWith comment fixes Signed-off-by: Marc Dionne \u003cmarc.c.dionne@gmail.com\u003e\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: James Morris \u003cjmorris@namei.org\u003e\nAcked-by: Serge Hallyn \u003cserue@us.ibm.com\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "76aac0e9a17742e60d408be1a706e9aaad370891",
      "tree": "e873a000d9c96209726e0958e311f005c13b2ed5",
      "parents": [
        "b103c59883f1ec6e4d548b25054608cb5724453c"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Fri Nov 14 10:39:12 2008 +1100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Fri Nov 14 10:39:12 2008 +1100"
      },
      "message": "CRED: Wrap task credential accesses in the core kernel\n\nWrap access to task credentials so that they can be separated more easily from\nthe task_struct during the introduction of COW creds.\n\nChange most current-\u003e(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().\n\nChange some task-\u003ee?[ug]id to task_e?[ug]id().  In some places it makes more\nsense to use RCU directly rather than a convenient wrapper; these will be\naddressed by later patches.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nReviewed-by: James Morris \u003cjmorris@namei.org\u003e\nAcked-by: Serge Hallyn \u003cserue@us.ibm.com\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: linux-audit@redhat.com\nCc: containers@lists.linux-foundation.org\nCc: linux-mm@kvack.org\nSigned-off-by: James Morris \u003cjmorris@namei.org\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": "5cd9c58fbe9ec92b45b27e131719af4f2bd9eb40",
      "tree": "8573db001b4dc3c2ad97102dda42b841c40b5f6c",
      "parents": [
        "8d0968abd03ec6b407df117adc773562386702fa"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Thu Aug 14 11:37:28 2008 +0100"
      },
      "committer": {
        "name": "James Morris",
        "email": "jmorris@namei.org",
        "time": "Thu Aug 14 22:59:43 2008 +1000"
      },
      "message": "security: Fix setting of PF_SUPERPRIV by __capable()\n\nFix the setting of PF_SUPERPRIV by __capable() as it could corrupt the flags\nthe target process if that is not the current process and it is trying to\nchange its own flags in a different way at the same time.\n\n__capable() is using neither atomic ops nor locking to protect t-\u003eflags.  This\npatch removes __capable() and introduces has_capability() that doesn\u0027t set\nPF_SUPERPRIV on the process being queried.\n\nThis patch further splits security_ptrace() in two:\n\n (1) security_ptrace_may_access().  This passes judgement on whether one\n     process may access another only (PTRACE_MODE_ATTACH for ptrace() and\n     PTRACE_MODE_READ for /proc), and takes a pointer to the child process.\n     current is the parent.\n\n (2) security_ptrace_traceme().  This passes judgement on PTRACE_TRACEME only,\n     and takes only a pointer to the parent process.  current is the child.\n\n     In Smack and commoncap, this uses has_capability() to determine whether\n     the parent will be permitted to use PTRACE_ATTACH if normal checks fail.\n     This does not set PF_SUPERPRIV.\n\nTwo of the instances of __capable() actually only act on current, and so have\nbeen changed to calls to capable().\n\nOf the places that were using __capable():\n\n (1) The OOM killer calls __capable() thrice when weighing the killability of a\n     process.  All of these now use has_capability().\n\n (2) cap_ptrace() and smack_ptrace() were using __capable() to check to see\n     whether the parent was allowed to trace any process.  As mentioned above,\n     these have been split.  For PTRACE_ATTACH and /proc, capable() is now\n     used, and for PTRACE_TRACEME, has_capability() is used.\n\n (3) cap_safe_nice() only ever saw current, so now uses capable().\n\n (4) smack_setprocattr() rejected accesses to tasks other than current just\n     after calling __capable(), so the order of these two tests have been\n     switched and capable() is used instead.\n\n (5) In smack_file_send_sigiotask(), we need to allow privileged processes to\n     receive SIGIO on files they\u0027re manipulating.\n\n (6) In smack_task_wait(), we let a process wait for a privileged process,\n     whether or not the process doing the waiting is privileged.\n\nI\u0027ve tested this with the LTP SELinux and syscalls testscripts.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Serge Hallyn \u003cserue@us.ibm.com\u003e\nAcked-by: Casey Schaufler \u003ccasey@schaufler-ca.com\u003e\nAcked-by: Andrew G. Morgan \u003cmorgan@kernel.org\u003e\nAcked-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nSigned-off-by: James Morris \u003cjmorris@namei.org\u003e\n"
    },
    {
      "commit": "85ba2d862e521375a8ee01526c5c46b1f24bb4af",
      "tree": "f098555cb580b2864f145aa845b574f07d2cf694",
      "parents": [
        "1f5a4ad97a0e7b663d527ecc02aabe203d000d91"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Fri Jul 25 19:45:58 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Jul 26 12:00:09 2008 -0700"
      },
      "message": "tracehook: wait_task_inactive\n\nThis extends wait_task_inactive() with a new argument so it can be used in\na \"soft\" mode where it will check for the task changing state unexpectedly\nand back off.  There is no change to existing callers.  This lays the\ngroundwork to allow robust, noninvasive tracing that can try to sample a\nblocked thread but back off safely if it wakes up.\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": "f470021adb9190819c03d6d8c5c860a17480aa6d",
      "tree": "9e5c2808138624e272b562a502cfd035ae59c268",
      "parents": [
        "98abed02007b19bbfd68b6d06a5485afc3eeb01b"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Mon Mar 24 18:36:23 2008 -0700"
      },
      "committer": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jul 16 18:02:33 2008 -0700"
      },
      "message": "ptrace children revamp\n\nptrace no longer fiddles with the children/sibling links, and the\nold ptrace_children list is gone.  Now ptrace, whether of one\u0027s own\nchildren or another\u0027s via PTRACE_ATTACH, just uses the new ptraced\nlist instead.\n\nThere should be no user-visible difference that matters.  The only\nchange is the order in which do_wait() sees multiple stopped\nchildren and stopped ptrace attachees.  Since wait_task_stopped()\nwas changed earlier so it no longer reorders the children list, we\nalready know this won\u0027t cause any new problems.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\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": "bcf35afb528109a31264b45d4851fa6ae72dbe18",
      "tree": "37607aae9efdbd1005d82e0a9a679899eb5a3afe",
      "parents": [
        "9fc3ace937a675bf42cbe6e6ef8950a6731ca16f"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Thu May 01 18:43:12 2008 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 01 10:21:54 2008 -0700"
      },
      "message": "make generic sys_ptrace unconditional\n\nWith s390 the last arch switched to the generic sys_ptrace yesterday so\nwe can now kill the ifdef around it to enforce every new port it using\nit instead of introducing new weirdo versions.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "00cd5c37afd5f431ac186dd131705048c0a11fdb",
      "tree": "d5412f6c720e2cee11ac66783bb45e6bd78f4a1d",
      "parents": [
        "33e9fc7d01269737cd5a3b6de1db9d0e796ab708"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Wed Apr 30 00:53:15 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 30 08:29:38 2008 -0700"
      },
      "message": "ptrace: permit ptracing of /sbin/init\n\nAfaics, currently there are no kernel problems with ptracing init, it can\u0027t\nlose SIGNAL_UNKILLABLE flag and be killed/stopped by accident.\n\nThe ability to strace/debug init can be very useful if you try to figure out\nwhy it does not work as expected.\n\nHowever, admin should know what he does, \"gdb /sbin/init 1\" stops init, it\ncan\u0027t reap orphaned zombies or take care of /etc/inittab until continued.  It\nis even possible to crash init (and thus the whole system) if you wish,\nptracer has full control.\n\nSee also the long discussion: http://marc.info/?t\u003d120628018600001\n\nSigned-off-by: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nAcked-by: Roland McGrath \u003croland@redhat.com\u003e\nAcked-by: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "33e9fc7d01269737cd5a3b6de1db9d0e796ab708",
      "tree": "36084d425e4d39ea06acff6f12164f257d0a102c",
      "parents": [
        "68cb94786630b34196713794a2880ade17fca887"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Wed Apr 30 00:53:14 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 30 08:29:38 2008 -0700"
      },
      "message": "ptrace: ptrace_attach: use send_sig_info() instead force_sig_specific()\n\nNobody can block/ignore SIGSTOP, no need to use force_sig_specific() in\nptrace_attach.  Use the \"regular\" send_sig_info().\n\nWith this patch stracing of /sbin/init doesn\u0027t clear its SIGNAL_UNKILLABLE,\nbut not that this makes ptracing of init safe.\n\nSigned-off-by: 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": "68cb94786630b34196713794a2880ade17fca887",
      "tree": "78bd2d66aaaa2c9acdd6060a9a9964420c511ebc",
      "parents": [
        "53b6f9fbd3b63af14b4f6268e8b5b80d178d05bc"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Wed Apr 30 00:53:14 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 30 08:29:38 2008 -0700"
      },
      "message": "ptrace: __ptrace_unlink: use the ptrace_reparented() helper\n\nCurrently __ptrace_unlink() checks list_empty(-\u003eptrace_list) to figure out\nwhether the child was reparented.  Change the code to use ptrace_reparented()\nto make this check more explicit and consistent.\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": "9d04d9280c4bbf6950b70b705bc4ace41de65615",
      "tree": "594f4d9faf9d830fc7b1a7589e4a61f16b1fdf58",
      "parents": [
        "e97e386b126c2d60b8da61ce1e4964b41b3d1514"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Mon Apr 28 13:57:19 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 28 14:14:36 2008 -0700"
      },
      "message": "ptrace: conditionalize compat_ptrace_request\n\nMy recent additions to compat_ptrace_request made it mandatory\nfor CONFIG_COMPAT arch\u0027s to define copy_siginfo_from_user32.\nThis broke some builds, though they all really should get cleaned\nup in that way.\n\nSince all the arch\u0027s that actually call compat_ptrace_request have\nnow been cleaned up to use the generic compat_sys_ptrace, we can\navoid the build problems on the crufty arch\u0027s by changing the\nconditionals on the definition.\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e16b27816462de700f9508d86954410c41105dc2",
      "tree": "f3827a23a43dcaad06362d511ac20d576b9128d5",
      "parents": [
        "553a56726be86c09cfa53c84da1ea0e2043e364e"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Sun Apr 20 13:10:12 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 21 15:53:41 2008 -0700"
      },
      "message": "ptrace: compat_ptrace_request siginfo\n\nThis adds support for PTRACE_GETSIGINFO and PTRACE_SETSIGINFO in\ncompat_ptrace_request.  It relies on existing arch definitions for\ncopy_siginfo_to_user32 and copy_siginfo_from_user32.\n\nOn powerpc, this fixes a longstanding regression of 32-bit ptrace\ncalls on 64-bit kernels vs native calls (64-bit calls or 32-bit\nkernels).  This can be seen in a 32-bit call using PTRACE_GETSIGINFO\nto examine e.g. siginfo_t.si_addr from a signal that sets it.\n(This was broken as of 2.6.24 and, I presume, many or all prior versions.)\n\nSigned-off-by: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c0c0b649d67aa775aa9851de61aade17504be70c",
      "tree": "5902fb53a364155352fcc04e87860d724d8b31fd",
      "parents": [
        "34a1738f7da0b3d28d4b066d03a78f46b8cab68f"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Fri Feb 08 04:19:00 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri Feb 08 09:22:26 2008 -0800"
      },
      "message": "ptrace_check_attach: remove unneeded -\u003esignal !\u003d NULL check\n\nIt is not possible to see the PT_PTRACED task without -\u003esignal/sighand under\ntasklist_lock, release_task() does ptrace_unlink() first.  If the task was\nalready released before, ptrace_attach() can\u0027t succeed and set PT_PTRACED.\nRemove this check.\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": "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": "f17d30a803e8434c4ef381bb5cfa1956ff0201f0",
      "tree": "42f71e13e01c0d142a30489031797d3d0ecf1ef9",
      "parents": [
        "a1c9eea9e56a7196c6891f6426b799c4598b38e2"
      ],
      "author": {
        "name": "Adrian Bunk",
        "email": "bunk@kernel.org",
        "time": "Wed Feb 06 01:36:44 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Feb 06 10:41:02 2008 -0800"
      },
      "message": "kernel/ptrace.c should #include \u003clinux/syscalls.h\u003e\n\nEvery file should include the headers containing the prototypes for its global\nfunctions (in this case sys_ptrace()).\n\nSigned-off-by: Adrian Bunk \u003cbunk@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": "d9ae90ac4bdce769ddb27c2e24c3351a30c3daf8",
      "tree": "220f88576b5c83369892ce13cb180bab6cccba7a",
      "parents": [
        "06b8e878a9bc9301201cffe186eba99c4185f20a"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@tv-sign.ru",
        "time": "Wed Feb 06 01:36:13 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Feb 06 10:41:00 2008 -0800"
      },
      "message": "use __set_task_state() for TRACED/STOPPED tasks\n\n1. It is much easier to grep for -\u003estate change if __set_task_state() is used\n   instead of the direct assignment.\n\n2. ptrace_stop() and handle_group_stop() use set_task_state() which adds the\n   unneeded mb() (btw even if we use mb() it is still possible that do_wait()\n   sees the new -\u003estate but not -\u003eexit_code, but this is ok).\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": "75659ca0c10992dcb39258518368a0f6f56e935d",
      "tree": "5d014ceb2f10158061a23d0d976f9a613d85e659",
      "parents": [
        "fbdde7bd274d74729954190f99afcb1e3d9bbfba",
        "2dfe485a2c8afa54cb069fcf48476f6c90ea3fdf"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 01 11:45:47 2008 +1100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 01 11:45:47 2008 +1100"
      },
      "message": "Merge branch \u0027task_killable\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc\n\n* \u0027task_killable\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: (22 commits)\n  Remove commented-out code copied from NFS\n  NFS: Switch from intr mount option to TASK_KILLABLE\n  Add wait_for_completion_killable\n  Add wait_event_killable\n  Add schedule_timeout_killable\n  Use mutex_lock_killable in vfs_readdir\n  Add mutex_lock_killable\n  Use lock_page_killable\n  Add lock_page_killable\n  Add fatal_signal_pending\n  Add TASK_WAKEKILL\n  exit: Use task_is_*\n  signal: Use task_is_*\n  sched: Use task_contributes_to_load, TASK_ALL and TASK_NORMAL\n  ptrace: Use task_is_*\n  power: Use task_is_*\n  wait: Use TASK_NORMAL\n  proc/base.c: Use task_is_*\n  proc/array.c: Use TASK_REPORT\n  perfmon: Use task_is_*\n  ...\n\nFixed up conflicts in NFS/sunrpc manually..\n"
    },
    {
      "commit": "c269f19617f508cc5c29c0b064c1a437d7011a46",
      "tree": "da49abc09dcf573df0580b305dba647a70306ac8",
      "parents": [
        "032d82d9065dec0e26718eca376c2029e4bd0595"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:31:48 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:31:48 2008 +0100"
      },
      "message": "x86: compat_sys_ptrace\n\nThis adds a generic definition of compat_sys_ptrace that calls\ncompat_arch_ptrace, parallel to sys_ptrace/arch_ptrace.  Some\nmachines needing this already define a function by that name.\nThe new generic function is defined only on machines that\nput #define __ARCH_WANT_COMPAT_SYS_PTRACE into asm/ptrace.h.\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": "032d82d9065dec0e26718eca376c2029e4bd0595",
      "tree": "44cdb3296f25a9b2d5044fe1c12fbb03b085ac37",
      "parents": [
        "16c3e389e7a7254ff8dc7029ac4fbe996c3c75bf"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:31:47 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:31:47 2008 +0100"
      },
      "message": "x86: compat_ptrace_request\n\nThis adds a compat_ptrace_request that is the analogue of ptrace_request\nfor the things that 32-on-64 ptrace implementations can share in common.\nSo far there are just a couple of requests handled generically.\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": "16c3e389e7a7254ff8dc7029ac4fbe996c3c75bf",
      "tree": "e87239acac664b4f940118b9920e457cb8a1461c",
      "parents": [
        "5bde4d181793be84351bc21c256d8c71cfcd313a"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:31:47 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:31:47 2008 +0100"
      },
      "message": "x86: ptrace_request peekdata/pokedata\n\nThis makes ptrace_request handle {PEEK,POKE}{TEXT,DATA} directly.\nEvery arch_ptrace that could call generic_ptrace_peekdata already\nhas a default case calling ptrace_request, so this keeps things\nsimpler for the arch code.\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": "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": "36df29d7994180cf7f0ccc5d46495855d56d2721",
      "tree": "3291b504ef268714ea40de90b297dba62f11206b",
      "parents": [
        "e1f287735c1e58c653b516931b5d3dd899edcb77"
      ],
      "author": {
        "name": "Roland McGrath",
        "email": "roland@redhat.com",
        "time": "Wed Jan 30 13:30:51 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Wed Jan 30 13:30:51 2008 +0100"
      },
      "message": "ptrace: generic resume\n\nThis makes ptrace_request handle all the ptrace requests that wake\nup the traced task.  These do low-level ptrace implementation magic\nthat is not arch-specific and should be kept out of arch code.  The\nimplementations on each arch usually do the same thing.  The new\ngeneric code makes use of the arch_has_single_step macro and generic\nentry points to handle PTRACE_SINGLESTEP.\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": "6ea6dd93c9454cc9521134f907bc970d09f460e4",
      "tree": "05f8d9f293d7127e19774d5fa10ebf685a6fa76d",
      "parents": [
        "7f0f616bb093823b70855685cf085d39a8784818"
      ],
      "author": {
        "name": "Haavard Skinnemoen",
        "email": "hskinnemoen@atmel.com",
        "time": "Tue Nov 27 13:02:40 2007 +0100"
      },
      "committer": {
        "name": "Haavard Skinnemoen",
        "email": "hskinnemoen@atmel.com",
        "time": "Fri Jan 25 08:31:39 2008 +0100"
      },
      "message": "ptrace: Call arch_ptrace_attach() when request\u003dPTRACE_TRACEME\n\narch_ptrace_attach() is a hook that allows the architecture to do\nbook-keeping after a ptrace attach. This patch adds a call to this\nhook when handling a PTRACE_TRACEME request as well.\n\nCurrently only one architecture, m32r, implements this hook. When\ncalled, it initializes a number of debug trap slots in the ptraced\ntask\u0027s thread struct, and it looks to me like this is the right thing\nto do after a PTRACE_TRACEME request as well, not only after\nPTRACE_ATTACH. Please correct me if I\u0027m wrong.\n\nI want to use this hook on AVR32 to turn the debugging hardware on\nwhen a process is actually being debugged and keep it off otherwise.\nTo be able to do this, I need to intercept PTRACE_TRACEME and\nPTRACE_ATTACH, as well as PTRACE_DETACH and thread exit. The latter\ntwo can be handled by existing hooks.\n\nSigned-off-by: Haavard Skinnemoen \u003chskinnemoen@atmel.com\u003e\n"
    },
    {
      "commit": "b8c9a18712f7b617fda66d878ce3759c9e575ba0",
      "tree": "95d4798a657b5267cf8e21e78a23aa7800a3bfcd",
      "parents": [
        "831830b5a2b5d413407adf380ef62fe17d6fcbf2"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Jan 02 13:48:27 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Jan 02 13:48:27 2008 -0800"
      },
      "message": "Fix kernel/ptrace.c compile problem (missing \"may_attach()\")\n\nThe previous commit missed one use of \"may_attach()\" that had been\nrenamed to __ptrace_may_attach().  Tssk, tssk, Al.\n\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\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"
    }
  ],
  "next": "6618a3e275519e10001a2ac4669f46141d4c108b"
}
