lkml.org 
[lkml]   [2013]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -tip v2 3/3] [BUGFIX] kprobes: Prohibit probing on func_ptr_is_kernel_text

* Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:

> >> [...] I hope to build the list when the kernel build time if
> >> possible... Would you have any idea to classify some annotated(but no
> >> side-effect) functions?
> >
> > The macro magic I can think of would need to change the syntax of the
> > function definition - for example that is how the SYSCALL_DEFINE*()
> > macros work.
>
> Would you mean something like the below macro? :)
>
> NOKPROBE_SYMBOL(int, func_ptr_is_kernel_text)(void *ptr)

I think this is rather ugly and harder to maintain. The whole _point_ of
such annotations is to make them 'easy on the eyes', to make it easy to
skip a 'noinline', 'noprobe' or 'notrace' tag.

Using something like NOKPROBE_SYMBOL() makes the whole construct ugly and
attention seeking.

So until compilers get smarter (or there's some compiler trick I haven't
noticed) lets stay with the separate section - it's not the end of the
world, the (effective) 'noinline' aspect of noprobes changes code
generation anyway.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-11-06 07:41    [W:0.135 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site