Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1580551
| From | "Jon Medhurst (Tixy)" <tixy@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [BUGFIX PATCH 3/3] kprobes/arm: Fix the return address of multiple kretprobes |
| Date | 2017-02-14 14:50 +0100 |
| Message-ID | <taLEv-2wc-33@gated-at.bofh.it> (permalink) |
| References | <taqql-5kT-13@gated-at.bofh.it> <taqql-5kT-11@gated-at.bofh.it> <taIGC-HJ-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2017-02-14 at 10:32 +0000, Jon Medhurst (Tixy) wrote:
> On Tue, 2017-02-14 at 00:05 +0900, Masami Hiramatsu wrote:
> > This is arm port of commit 737480a0d525 ("kprobes/x86:
> > Fix the return address of multiple kretprobes").
> >
> > Fix the return address of subsequent kretprobes when multiple
> > kretprobes are set on the same function.
> >
> > For example:
> >
> > # cd /sys/kernel/debug/tracing
> > # echo "r:event1 sys_symlink" > kprobe_events
> > # echo "r:event2 sys_symlink" >> kprobe_events
> > # echo 1 > events/kprobes/enable
> > # ln -s /tmp/foo /tmp/bar
> >
> > (without this patch)
> >
> > # cat trace | grep -v ^#
> > ln-82 [000] dn.2 68.446525: event1: (kretprobe_trampoline+0x0/0x18 <- SyS_symlink)
> > ln-82 [000] dn.2 68.447831: event2: (ret_fast_syscall+0x0/0x1c <- SyS_symlink)
> >
> > (with this patch)
> >
> > # cat trace | grep -v ^#
> > ln-81 [000] dn.1 39.463469: event1: (ret_fast_syscall+0x0/0x1c <- SyS_symlink)
> > ln-81 [000] dn.1 39.464701: event2: (ret_fast_syscall+0x0/0x1c <- SyS_symlink)
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: KUMANO Syuhei <kumano.prog@gmail.com>
> > ---
>
> I don't fully understand this function, but I've checked that the ARM
> version now matches the x86 version (apart from the x86 specific
> register fixup and some comments). So, FWIW
>
> Acked-by: Jon Medhurst <tixy@linaro.org>
>
> I ran the before and after test case in the commit log on ARM and
> verified the result is correct. I also tried running the ARM kprobe
> tests with these 3 fixes but the tests fail. However, they also fail
> without any of these changes, so I'll investigate that further...
Bisecting the issue led me back to Linux 4.5 and commit 25362dc496ed
("ARM: 8501/1: mm: flip priority of CONFIG_DEBUG_RODATA")
This sets CONFIG_DEBUG_RODATA to be enabled by default. If I disable
that on 4.10-rc4, with the three patches in this series, then the ARM
kprobes tests pass OK.
I'll stick the DEBUG_RODATA issue on my todo list (it's been around for
a year, so can probably wait a little longer).
--
Tixy
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [BUGFIX PATCH 3/3] kprobes/arm: Fix the return address of multiple kretprobes "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2017-02-14 11:40 +0100
Re: [BUGFIX PATCH 3/3] kprobes/arm: Fix the return address of multiple kretprobes "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2017-02-14 14:50 +0100
Re: [BUGFIX PATCH 3/3] kprobes/arm: Fix the return address of multiple kretprobes Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-14 17:10 +0100
Re: [BUGFIX PATCH 3/3] kprobes/arm: Fix the return address of multiple kretprobes "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2017-02-14 17:50 +0100
Re: [BUGFIX PATCH 3/3] kprobes/arm: Fix the return address of multiple kretprobes Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-15 01:00 +0100
csiph-web