uprobes: Use vm_special_mapping to name the XOL vma
authorOleg Nesterov <oleg@redhat.com>
Tue, 21 Jul 2015 13:40:33 +0000 (15:40 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2015 08:38:06 +0000 (10:38 +0200)
commit704bde3cc26a4cb34386c164107b59e09745a022
treeb39f19b69d473d16717179c86da7bf13f0943da2
parentf58bea2fec63db72f8050ade709358257e9102ab
uprobes: Use vm_special_mapping to name the XOL vma

Change xol_add_vma() to use _install_special_mapping(), this way
we can name the vma installed by uprobes. Currently it looks
like private anonymous mapping, this is confusing and
complicates the debugging. With this change /proc/$pid/maps
reports "[uprobes]".

As a side effect this will cause core dumps to include the XOL vma
and I think this is good; this can help to debug the problem if
the app crashed because it was probed.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Pratyush Anand <panand@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150721134033.GA4796@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/uprobes.c