From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>, Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Adrian Hunter <adrian.hunter@intel.com>
Cc: X86 ML <x86@kernel.org>, Andy Lutomirski <luto@amacapital.net>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2 07/15] x86/lib/copy_user_64.S: Convert to ALTERNATIVE_2
Date: Thu, 5 Mar 2015 10:46:50 +0100 [thread overview]
Message-ID: <20150305094650.GA29140@gmail.com> (raw)
In-Reply-To: <20150305093457.GA25419@gmail.com>
* Ingo Molnar <mingo@kernel.org> wrote:
> Ha! There's a neat alternatives debugging trick with perf that you
> might not know about: if you run 'perf top' as root then perf will
> use /proc/kcore to disassemble the live kernel image and if you look
> at the assembly output of hot functions then you'll see the real,
> patched instructions on the live kernel, not the vmlinux
> instructions.
>
> I have two enhancement suggestions to the perf tooling developers for
> this usecase:
and I've got a bugreport as well, when I use the kcore annotations on
'fput' symbol (i.e. running 'perf top' as root), go into the
disassembly window and then try to exit that window, then I get this
segfault:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff3c41700 (LWP 29134)]
lock__delete (ops=0x7fffec001818) at util/annotate.c:219
219 ins__delete(ops->locked.ops);
(gdb) bt
#0 lock__delete (ops=0x7fffec001818) at util/annotate.c:219
#1 0x000000000046e568 in disasm_line__free (dl=0x7fffec0017e0) at util/annotate.c:619
#2 0x00000000004f0743 in symbol__tui_annotate (sym=<optimized out>, map=<optimized out>, evsel=evsel@entry=0x83d770, hbt=hbt@entry=0x7ffff3c40e60)
at ui/browsers/annotate.c:976
#3 0x00000000004f0973 in hist_entry__tui_annotate (he=he@entry=0x151ba40, evsel=evsel@entry=0x83d770, hbt=hbt@entry=0x7ffff3c40e60) at ui/browsers/annotate.c:835
#4 0x00000000004f5685 in perf_evsel__hists_browse (evsel=0x83d770, nr_events=nr_events@entry=1,
helpline=helpline@entry=0x51d350 "For a higher level overview, try: perf top --sort comm,dso", left_exits=left_exits@entry=false, hbt=hbt@entry=0x7ffff3c40e60,
min_pcnt=<optimized out>, env=0x83de40) at ui/browsers/hists.c:1716
#5 0x00000000004f7ae4 in perf_evlist__tui_browse_hists (evlist=0x7cbb90, help=help@entry=0x51d350 "For a higher level overview, try: perf top --sort comm,dso",
hbt=hbt@entry=0x7ffff3c40e60, min_pcnt=<optimized out>, env=<optimized out>) at ui/browsers/hists.c:2006
#6 0x0000000000435850 in display_thread_tui (arg=0x7fffffffa580) at builtin-top.c:582
#7 0x00007ffff7bc40a5 in start_thread (arg=0x7ffff3c41700) at pthread_create.c:309
#8 0x00007ffff5fe4cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
using latestest tools/perf.
Thanks,
Ingo
next prev parent reply other threads:[~2015-03-05 9:46 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 11:14 [PATCH v2 00/15] x86, alternatives: Instruction padding and more robust JMPs Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 01/15] x86/lib/copy_user_64.S: Remove FIX_ALIGNMENT define Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 02/15] x86/alternatives: Cleanup DPRINTK macro Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 03/15] x86/alternatives: Add instruction padding Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 04/15] x86/alternatives: Make JMPs more robust Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 05/15] x86/alternatives: Use optimized NOPs for padding Borislav Petkov
2015-03-04 6:43 ` Ingo Molnar
2015-03-04 8:42 ` Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 06/15] x86/lib/copy_page_64.S: Use generic ALTERNATIVE macro Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 07/15] x86/lib/copy_user_64.S: Convert to ALTERNATIVE_2 Borislav Petkov
2015-03-04 6:25 ` Ingo Molnar
2015-03-04 7:13 ` Ingo Molnar
2015-03-04 9:06 ` Borislav Petkov
2015-03-05 0:34 ` Ingo Molnar
2015-03-05 8:23 ` Borislav Petkov
2015-03-04 9:00 ` Borislav Petkov
2015-03-05 0:32 ` Ingo Molnar
2015-03-05 8:35 ` Borislav Petkov
2015-03-05 9:34 ` Ingo Molnar
2015-03-05 9:46 ` Ingo Molnar [this message]
2015-02-24 11:14 ` [PATCH v2 08/15] x86/smap: Use ALTERNATIVE macro Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 09/15] x86/entry_32: Convert X86_INVD_BUG to " Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 10/15] x86/lib/clear_page_64.S: Convert to ALTERNATIVE_2 macro Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 11/15] x86/asm: Use alternative_2() in rdtsc_barrier() Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 12/15] x86/asm: Cleanup prefetch primitives Borislav Petkov
2015-03-04 6:48 ` Ingo Molnar
2015-03-04 9:08 ` Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 13/15] x86/lib/memset_64.S: Convert to ALTERNATIVE_2 macro Borislav Petkov
2015-02-24 11:14 ` [PATCH v2 14/15] x86/lib/memmove_64.S: Convert memmove() to ALTERNATIVE macro Borislav Petkov
2015-03-04 7:19 ` Ingo Molnar
2015-02-24 11:14 ` [PATCH v2 15/15] x86/lib/memcpy_64.S: Convert memcpy to ALTERNATIVE_2 macro Borislav Petkov
2015-03-04 7:26 ` Ingo Molnar
2015-03-04 13:58 ` Borislav Petkov
2015-03-05 0:26 ` Ingo Molnar
2015-03-05 8:37 ` Borislav Petkov
2015-02-24 20:25 ` [PATCH v2 00/15] x86, alternatives: Instruction padding and more robust JMPs Andy Lutomirski
2015-02-26 18:13 ` Borislav Petkov
2015-02-26 18:16 ` [PATCH 1/3] perf/bench: Fix mem* routines usage after alternatives change Borislav Petkov
2015-02-26 18:16 ` [PATCH 2/3] perf/bench: Carve out mem routine benchmarking Borislav Petkov
2015-02-26 18:16 ` [PATCH 3/3] perf/bench: Add -r all so that you can run all mem* routines Borislav Petkov
2015-03-04 7:30 ` Ingo Molnar
2015-03-02 14:51 ` [PATCH v2 00/15] x86, alternatives: Instruction padding and more robust JMPs Hitoshi Mitake
2015-03-02 16:27 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150305094650.GA29140@gmail.com \
--to=mingo@kernel.org \
--cc=acme@infradead.org \
--cc=adrian.hunter@intel.com \
--cc=bp@alien8.de \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.