lkml.org 
[lkml]   [2018]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/7] kprobes: Replace %p with other pointer types
On Sat, 28 Apr 2018 00:42:02 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> > > +/* Caller must NOT call this in usual path. This is only for critical case */
> > > void dump_kprobe(struct kprobe *kp)
> > > {
> > > - printk(KERN_WARNING "Dumping kprobe:\n");
> > > - printk(KERN_WARNING "Name: %s\nAddress: %p\nOffset: %x\n",
> > > - kp->symbol_name, kp->addr, kp->offset);
> > > + pr_err("Dumping kprobe:\n");
> > > + pr_err("Name: %s\nOffset: %x\nAddress: %pS\n",
> > > + kp->symbol_name, kp->offset, kp->addr);
> >
> > No, this function should just go away and be replaced by a WARN() in
> > reenter_kprobe().
>
> Would you consider to use pr_err() here? If so, I'll move this
> dump as you suggested.

So, this is actually called right before BUG(), which means we found
a non-recoverable error while recovering from reentrant kprobes.
Since the BUG() dumps all registers and stack as same as WARN(),
I think we should keep it.
(I would like to dump all kprobes fields like flags, etc. so that
we can find it is broken or not.)

Thank you,

--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2018-04-28 06:44    [W:0.056 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site