lkml.org 
[lkml]   [2021]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] samples/kprobes: Fix typo in handler_{post,fault}()
From
Date
On Sun, 2021-05-16 at 19:02 +0900, Masami Hiramatsu wrote:
> On Sat, 15 May 2021 10:39:06 +0800
> Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
> > It should use post_handler instead of pre_handler in handler_post().
> >
> > As Joe Perches suggested, it would be better to use pr_fmt and remove
> > all the embedded pre/post strings. This would change the style of the
> > output through.
> >
>
> NAK, this also shows which handler cought the event.
> If you wanna change it. Please replace it with __func__ instead.
[]
> > diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c
[]
> > @@ -10,6 +10,8 @@
> >   * whenever kernel_clone() is invoked to create a new process.
> >   */
> >  
> > +#define pr_fmt(fmt) "%s: " fmt, __func__

It does that already via the pr_fmt which uses __func__.


\
 
 \ /
  Last update: 2021-05-16 15:16    [W:0.049 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site