<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/events, branch v3.6</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=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-09-04T15:29:53Z</updated>
<entry>
<title>perf/hwpb: Invoke __perf_event_disable() if interrupts are already disabled</title>
<updated>2012-09-04T15:29:53Z</updated>
<author>
<name>K.Prasad</name>
<email>Prasad.Krishnan@gmail.com</email>
</author>
<published>2012-08-02T08:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=500ad2d8b01390c98bc6dce068bccfa9534b8212'/>
<id>urn:sha1:500ad2d8b01390c98bc6dce068bccfa9534b8212</id>
<content type='text'>
While debugging a warning message on PowerPC while using hardware
breakpoints, it was discovered that when perf_event_disable is invoked
through hw_breakpoint_handler function with interrupts disabled, a
subsequent IPI in the code path would trigger a WARN_ON_ONCE message in
smp_call_function_single function.

This patch calls __perf_event_disable() when interrupts are already
disabled, instead of perf_event_disable().

Reported-by: Edjunior Barbosa Machado &lt;emachado@linux.vnet.ibm.com&gt;
Signed-off-by: K.Prasad &lt;Prasad.Krishnan@gmail.com&gt;
[naveen.n.rao@linux.vnet.ibm.com: v3: Check to make sure we target current task]
Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20120802081635.5811.17737.stgit@localhost.localdomain
[ Fixed build error on MIPS. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf_event: Switch to internal refcount, fix race with close()</title>
<updated>2012-09-04T15:29:22Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2012-08-20T13:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6fa941d94b411bbd2b6421ffbde6db3c93e65ab'/>
<id>urn:sha1:a6fa941d94b411bbd2b6421ffbde6db3c93e65ab</id>
<content type='text'>
Don't mess with file refcounts (or keep a reference to file, for
that matter) in perf_event.  Use explicit refcount of its own
instead.  Deal with the race between the final reference to event
going away and new children getting created for it by use of
atomic_long_inc_not_zero() in inherit_event(); just have the
latter free what it had allocated and return NULL, that works
out just fine (children of siblings of something doomed are
created as singletons, same as if the child of leader had been
created and immediately killed).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: stable@kernel.org
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20120820135925.GG23464@ZenIV.linux.org.uk
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf/trace: Add ability to set a target task for events</title>
<updated>2012-07-31T15:02:05Z</updated>
<author>
<name>Andrew Vagin</name>
<email>avagin@openvz.org</email>
</author>
<published>2012-07-11T14:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6dab5ffab59e910ec0e3355f4a6f29f7a7be474'/>
<id>urn:sha1:e6dab5ffab59e910ec0e3355f4a6f29f7a7be474</id>
<content type='text'>
A few events are interesting not only for a current task.
For example, sched_stat_* events are interesting for a task
which wakes up. For this reason, it will be good if such
events will be delivered to a target task too.

Now a target task can be set by using __perf_task().

The original idea and a draft patch belongs to Peter Zijlstra.

I need these events for profiling sleep times. sched_switch is used for
getting callchains and sched_stat_* is used for getting time periods.
These events are combined in user space, then it can be analyzed by
perf tools.

Inspired-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Arun Sharma &lt;asharma@fb.com&gt;
Signed-off-by: Andrew Vagin &lt;avagin@openvz.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1342016098-213063-1-git-send-email-avagin@openvz.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: __replace_page() needs munlock_vma_page()</title>
<updated>2012-07-30T09:27:25Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=194f8dcbe9629d8e9346cf96345a9c0bbf0e67ae'/>
<id>urn:sha1:194f8dcbe9629d8e9346cf96345a9c0bbf0e67ae</id>
<content type='text'>
Like do_wp_page(), __replace_page() should do munlock_vma_page()
for the case when the old page still has other !VM_LOCKED
mappings. Unfortunately this needs mm/internal.h.

Also, move put_page() outside of ptl lock. This doesn't really
matter but looks a bit better.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182249.GA20372@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: Rename vma_address() and make it return "unsigned long"</title>
<updated>2012-07-30T09:27:25Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57683f72b8c01c53c85fe13e82fe1feb3a06bcd5'/>
<id>urn:sha1:57683f72b8c01c53c85fe13e82fe1feb3a06bcd5</id>
<content type='text'>
1. vma_address() returns loff_t, this looks confusing and this
   is unnecessary after the previous change. Make it return "ulong",
   all callers truncate the result anyway.

2. Its name conflicts with mm/rmap.c:vma_address(), rename it to
   offset_to_vaddr(), this matches vaddr_to_offset().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182247.GA20365@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: Fix register_for_each_vma()-&gt;vma_address() check</title>
<updated>2012-07-30T09:27:24Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4d6dfe55115efe981b4b5f37183ddccaaa792f0'/>
<id>urn:sha1:f4d6dfe55115efe981b4b5f37183ddccaaa792f0</id>
<content type='text'>
1. register_for_each_vma() checks that vma_address() == vaddr,
   but this is not enough. We should also ensure that
   vaddr &gt;= vm_start, find_vma() guarantees "vaddr &lt; vm_end" only.

2. After the prevous changes, register_for_each_vma() is the
   only reason why vma_address() has to return loff_t, all other
   users know that we have the valid mapping at this offset and
   thus the overflow is not possible.

   Change the code to use vaddr_to_offset() instead, imho this looks
   more clean/understandable and now we can change vma_address().

3. While at it, remove the unnecessary type-cast.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182244.GA20362@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: Introduce vaddr_to_offset(vma, vaddr)</title>
<updated>2012-07-30T09:27:24Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb113b47d098185f3f1f67e8300d05ddce842b66'/>
<id>urn:sha1:cb113b47d098185f3f1f67e8300d05ddce842b66</id>
<content type='text'>
Add the new helper, vaddr_to_offset(vma, vaddr) which returns
the offset in vma-&gt;vm_file this vaddr is mapped at.

Change build_probe_list() and find_active_uprobe() to use the
new helper, the next patch adds another user.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182242.GA20355@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: Teach build_probe_list() to consider the range</title>
<updated>2012-07-30T09:27:23Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=891c39708144bbe401b4aa151bffd0fe41b1dafd'/>
<id>urn:sha1:891c39708144bbe401b4aa151bffd0fe41b1dafd</id>
<content type='text'>
Currently build_probe_list() builds the list of all uprobes
attached to the given inode, and the caller should filter out
those who don't fall into the [start,end) range, this is
sub-optimal.

This patch turns find_least_offset_node() into
find_node_in_range() which returns the first node inside the
[min,max] range, and changes build_probe_list() to use this node
as a starting point for rb_prev() and rb_next() to find all
other nodes the caller needs. The resulting list is no longer
sorted but we do not care.

This can speed up both build_probe_list() and the callers, but
there is another reason to introduce find_node_in_range(). It
can be used to figure out whether the given vma has uprobes or
not, this will be needed soon.

While at it, shift INIT_LIST_HEAD(tmp_list) into
build_probe_list().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182240.GA20352@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: Fix overflow in vma_address()/find_active_uprobe()</title>
<updated>2012-07-30T09:27:21Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aefd8933d445abf7ff0d4027c624737898827bcd'/>
<id>urn:sha1:aefd8933d445abf7ff0d4027c624737898827bcd</id>
<content type='text'>
vma-&gt;vm_pgoff is "unsigned long", it should be promoted to
loff_t before the multiplication to avoid the overflow.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182233.GA20339@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>uprobes: Suppress uprobe_munmap() from mmput()</title>
<updated>2012-07-30T09:27:21Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-07-29T18:22:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fd611a991391a6050cbd139201a2e12fc306540'/>
<id>urn:sha1:2fd611a991391a6050cbd139201a2e12fc306540</id>
<content type='text'>
uprobe_munmap() does get_user_pages() and it is also called from
the final mmput()-&gt;exit_mmap() path. This slows down
exit/mmput() for no reason, and I think  it is simply
dangerous/wrong to try to fault-in a page into the dying mm. If
nothing else, this happens after the last sync_mm_rss(), afaics
handle_mm_fault() can change the task-&gt;rss_stat and make the
subsequent check_mm() unhappy.

Change uprobe_munmap() to check mm-&gt;mm_users != 0.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar.vnet.ibm.com&gt;
Cc: Anton Arapov &lt;anton@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20120729182231.GA20336@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
