From: Masami Hiramatsu <mhiramat@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: Detecting kprobes generated code addresses
Date: Sun, 25 Dec 2016 15:16:00 +0900 [thread overview]
Message-ID: <20161225151600.c43c8970ce95447e067893c1@kernel.org> (raw)
In-Reply-To: <20161225121320.b1ee82377e744805ffe47f7f@kernel.org>
On Sun, 25 Dec 2016 12:13:20 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Thu, 22 Dec 2016 00:42:19 -0600
> Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
> > Hi Masami,
> >
> > I would like to make __kernel_text_address() be able to detect whether
> > an address belongs to code which was generated by kprobes. As far as I
> > can tell, that information seems to be in the 'pages' lists of
> > kprobe_insn_slots and kprobe_optinsn_slots. But they seem to be
> > protected by mutexes.
>
> Right. It is currently under mutex because it may kick
> page allocation. But I think it is easy to fix that :)
Hmm, IMHO, it seems that we should add a dummy (auto-generated)
symbol for optprobe trampoline code to kallsyms so that
__kernel_text_address() automatically returns true on it.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2016-12-25 6:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 6:42 Detecting kprobes generated code addresses Josh Poimboeuf
2016-12-25 3:13 ` Masami Hiramatsu
2016-12-25 6:16 ` Masami Hiramatsu [this message]
2016-12-26 4:30 ` Masami Hiramatsu
2016-12-26 14:50 ` [PATCH tip/master] kprobes: extable: Identify kprobes' insn-slots as kernel text area Masami Hiramatsu
2016-12-26 15:34 ` [PATCH tip/master v2] " Masami Hiramatsu
2016-12-26 17:21 ` kbuild test robot
2016-12-26 17:46 ` kbuild test robot
2016-12-27 6:13 ` Masami Hiramatsu
2016-12-27 6:14 ` [PATCH tip/master v3] " Masami Hiramatsu
2017-01-03 10:54 ` Peter Zijlstra
2017-01-04 5:06 ` Masami Hiramatsu
2017-01-04 10:01 ` Peter Zijlstra
2017-01-08 4:22 ` Masami Hiramatsu
2017-01-08 12:31 ` Masami Hiramatsu
2017-01-08 14:58 ` [PATCH tip/master v4] " Masami Hiramatsu
2017-01-09 17:36 ` Josh Poimboeuf
2017-01-10 1:11 ` Masami Hiramatsu
2017-01-10 8:59 ` Peter Zijlstra
2017-01-10 21:42 ` Josh Poimboeuf
2017-01-11 9:57 ` Masami Hiramatsu
2017-01-14 9:56 ` [tip:perf/core] kprobes, extable: Identify kprobes trampolines " tip-bot for Masami Hiramatsu
2017-01-04 14:21 ` [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots " Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2016-12-22 6:40 Detecting kprobes generated code addresses Josh Poimboeuf
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=20161225151600.c43c8970ce95447e067893c1@kernel.org \
--to=mhiramat@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).