lkml.org 
[lkml]   [2015]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH tip/master 1/3] kprobes: Support blacklist functions in module
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


\
 
 \ /
  Last update: 2015-07-21 12:41    [W:1.359 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site