<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/ptrace.c, branch v2.6.37</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.37</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-10-28T01:03:12Z</updated>
<entry>
<title>signals: move cred_guard_mutex from task_struct to signal_struct</title>
<updated>2010-10-28T01:03:12Z</updated>
<author>
<name>KOSAKI Motohiro</name>
<email>kosaki.motohiro@jp.fujitsu.com</email>
</author>
<published>2010-10-27T22:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b1bf12d5d51bca178dea21b04a0805e29d60cf1'/>
<id>urn:sha1:9b1bf12d5d51bca178dea21b04a0805e29d60cf1</id>
<content type='text'>
Oleg Nesterov pointed out we have to prevent multiple-threads-inside-exec
itself and we can reuse -&gt;cred_guard_mutex for it.  Yes, concurrent
execve() has no worth.

Let's move -&gt;cred_guard_mutex from task_struct to signal_struct.  It
naturally prevent multiple-threads-inside-exec.

Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Reviewed-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: cleanup ptrace_request()</title>
<updated>2010-10-28T01:03:10Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2010-10-27T22:33:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9fed81dc40f5a1ac2783bcc78d4029873be72894'/>
<id>urn:sha1:9fed81dc40f5a1ac2783bcc78d4029873be72894</id>
<content type='text'>
Use new 'datavp' and 'datalp' variables to remove unnecesary castings.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: change signature of sys_ptrace() and friends</title>
<updated>2010-10-28T01:03:10Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2010-10-27T22:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4abf986960ecda6a87fc2f795aacf888a2f0127e'/>
<id>urn:sha1:4abf986960ecda6a87fc2f795aacf888a2f0127e</id>
<content type='text'>
Since userspace API of ptrace syscall defines @addr and @data as void
pointers, it would be more appropriate to define them as unsigned long in
kernel.  Therefore related functions are changed also.

'unsigned long' is typically used in other places in kernel as an opaque
data type and that using this helps cleaning up a lot of warnings from
sparse.

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: annotate lock context change on exit_ptrace()</title>
<updated>2010-10-28T01:03:10Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2010-10-27T22:33:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4b5ed250eebf854d40f27b43362c80f115cb57a'/>
<id>urn:sha1:c4b5ed250eebf854d40f27b43362c80f115cb57a</id>
<content type='text'>
exit_ptrace() releases and regrabs tasklist_lock but was missing proper
annotation.  Add it.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: optimize exit_ptrace() for the likely case</title>
<updated>2010-08-11T15:59:19Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2010-08-11T01:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7e49c1488ab20342eaaf38f1ca35a207f4c051d'/>
<id>urn:sha1:c7e49c1488ab20342eaaf38f1ca35a207f4c051d</id>
<content type='text'>
exit_ptrace() takes tasklist_lock unconditionally.  We need this lock to
avoid the race with ptrace_traceme(), it acts as a barrier.

Change its caller, forget_original_parent(), to call exit_ptrace() under
tasklist_lock.  Change exit_ptrace() to drop and reacquire this lock if
needed.

This allows us to add the fastpath list_empty(ptraced) check.  In the
likely no-tracees case exit_ptrace() just returns and we avoid the lock()
+ unlock() sequence.

"Zhang, Yanmin" &lt;yanmin_zhang@linux.intel.com&gt; suggested to add this
check, and he reports that this change adds about 11% improvement in some
tests.

Suggested-and-tested-by: "Zhang, Yanmin" &lt;yanmin_zhang@linux.intel.com&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: PTRACE_GETFDPIC: fix the unsafe usage of child-&gt;mm</title>
<updated>2010-05-27T16:12:44Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2010-05-26T21:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0129ef91ed758c06b6557c36124acfb2e1c7305'/>
<id>urn:sha1:e0129ef91ed758c06b6557c36124acfb2e1c7305</id>
<content type='text'>
Now that Mike Frysinger unified the FDPIC ptrace code, we can fix the
unsafe usage of child-&gt;mm in ptrace_request(PTRACE_GETFDPIC).

We have the reference to task_struct, and ptrace_check_attach() verified
the tracee is stopped.  But nothing can protect from SIGKILL after that,
we must not assume child-&gt;mm != NULL.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Mike Frysinger &lt;vapier.adi@gmail.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Greg Ungerer &lt;gerg@snapgear.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: unify FDPIC implementations</title>
<updated>2010-05-27T16:12:44Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2010-05-26T21:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c1a125921d146f22cf28ff366ff69fd602a0e9b'/>
<id>urn:sha1:9c1a125921d146f22cf28ff366ff69fd602a0e9b</id>
<content type='text'>
The Blackfin/FRV/SuperH guys all have the same exact FDPIC ptrace code in
their arch handlers (since they were probably copied &amp; pasted).  Since
these ptrace interfaces are an arch independent aspect of the FDPIC code,
unify them in the common ptrace code so new FDPIC ports don't need to copy
and paste this fundamental stuff yet again.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-05-18T15:19:03Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-05-18T15:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d7b4ac22fbec1a03206c6cde353f2fd6942f828'/>
<id>urn:sha1:4d7b4ac22fbec1a03206c6cde353f2fd6942f828</id>
<content type='text'>
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (311 commits)
  perf tools: Add mode to build without newt support
  perf symbols: symbol inconsistency message should be done only at verbose=1
  perf tui: Add explicit -lslang option
  perf options: Type check all the remaining OPT_ variants
  perf options: Type check OPT_BOOLEAN and fix the offenders
  perf options: Check v type in OPT_U?INTEGER
  perf options: Introduce OPT_UINTEGER
  perf tui: Add workaround for slang &lt; 2.1.4
  perf record: Fix bug mismatch with -c option definition
  perf options: Introduce OPT_U64
  perf tui: Add help window to show key associations
  perf tui: Make &lt;- exit menus too
  perf newt: Add single key shortcuts for zoom into DSO and threads
  perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed
  perf newt: Fix the 'A'/'a' shortcut for annotate
  perf newt: Make &lt;- exit the ui_browser
  x86, perf: P4 PMU - fix counters management logic
  perf newt: Make &lt;- zoom out filters
  perf report: Report number of events, not samples
  perf hist: Clarify events_stats fields usage
  ...

Fix up trivial conflicts in kernel/fork.c and tools/perf/builtin-record.c
</content>
</entry>
<entry>
<title>ptrace: Cleanup useless header</title>
<updated>2010-04-26T21:42:51Z</updated>
<author>
<name>Alessio Igor Bogani</name>
<email>abogani@texware.it</email>
</author>
<published>2010-04-25T11:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8bc1389b74c2b66255651a6fcfae56c78b6e63f'/>
<id>urn:sha1:b8bc1389b74c2b66255651a6fcfae56c78b6e63f</id>
<content type='text'>
BKL isn't present anymore into this file thus we can safely remove
smp_lock.h inclusion.

Signed-off-by: Alessio Igor Bogani &lt;abogani@texware.it&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>ptrace: kill BKL in ptrace syscall</title>
<updated>2010-04-10T13:34:21Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-02-27T18:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5534ecb2dda04345e8243901e0e49599228b4273'/>
<id>urn:sha1:5534ecb2dda04345e8243901e0e49599228b4273</id>
<content type='text'>
The comment suggests that this usage is stale. There is no bkl in the
exec path so if there is a race lurking there, the bkl in ptrace is
not going to help in this regard.

Overview of the possibility of "accidental" races this bkl might
protect:

- ptrace_traceme() is protected against task removal and concurrent
read/write on current-&gt;ptrace as it locks write tasklist_lock.

- arch_ptrace_attach() is serialized by ptrace_traceme() against
concurrent PTRACE_TRACEME or PTRACE_ATTACH

- ptrace_attach() is protected the same way ptrace_traceme() and
in turn serializes arch_ptrace_attach()

- ptrace_check_attach() does its own well described serializing too.

There is no obvious race here.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
</content>
</entry>
</feed>
