From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Pratyush Anand <panand@redhat.com>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>, Rob Landley <rob@landley.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: Re: [PATCH tip/master 1/3] kprobes: Support blacklist functions in module
Date: Tue, 21 Jul 2015 19:19:19 +0900 [thread overview]
Message-ID: <55AE1CA7.7010200@hitachi.com> (raw)
In-Reply-To: <20150721074847.GA25542@gmail.com>
On 2015/07/21 16:48, Ingo Molnar wrote:
> * Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:
>
>> For some symbols we can do that. But it can conflict with other __section
>> attributes e.g. __sched, since a function must be placed in only one
>> section. [...]
>
> The the scheduler is not modular, so __sched should not be a problem in itself.
No, I meant why I chose this macro, itself should not be a section.
Or would we better use __nokprobe in module and NOKPROBE_SYMBOL in kernel? :(
>> [...] So, IMHO, using section for expressing its attribute is not a good idea,
>> but I couldn't find another option in common function attribute.
>>
>> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
>>
>> Thus I've introduced NOKPROBE_SYMBOL macro which stores the target function
>> addresses (not the function itself) in the _kprobe_blacklist section.
>
> So the question is, in which cases do modules need this?
The main reason for this is to put the kprobes handlers (and the functions called
from the kprobe handlers) on the blacklist. And also, there may be some cases which
NMI handlers can be in modules (as setting kconfig "m").
Thank you,
--
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2015-07-21 10:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 7:10 [PATCH tip/master 0/3] kprobes blacklist enhancement Masami Hiramatsu
2015-07-16 7:10 ` [PATCH tip/master 1/3] kprobes: Support blacklist functions in module Masami Hiramatsu
2015-07-16 11:34 ` Rusty Russell
2015-07-17 12:10 ` Ingo Molnar
2015-07-19 3:15 ` Masami Hiramatsu
2015-07-21 7:48 ` Ingo Molnar
2015-07-21 10:19 ` Masami Hiramatsu [this message]
2015-07-16 7:10 ` [PATCH tip/master 2/3] kprobes: Use NOKPROBE_SYMBOL() in sample modules Masami Hiramatsu
2015-07-16 7:10 ` [PATCH tip/master 3/3] kprobes/x86: Use kprobe_blacklist for .kprobes.text and .entry.text Masami Hiramatsu
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=55AE1CA7.7010200@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=ananth@in.ibm.com \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=panand@redhat.com \
--cc=rob@landley.net \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/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