[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180428134333.6e1b878fc9748dac67387476@kernel.org>
Date: Sat, 28 Apr 2018 13:43:33 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
"David S . Miller" <davem@...emloft.net>,
Jon Medhurst <tixy@...aro.org>,
Will Deacon <will.deacon@....com>,
Arnd Bergmann <arnd@...db.de>,
David Howells <dhowells@...hat.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
"Tobin C . Harding" <me@...in.cc>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Richter <tmricht@...ux.ibm.com>,
akpm@...ux-foundation.org, acme@...nel.org, rostedt@...dmis.org,
brueckner@...ux.vnet.ibm.com, schwidefsky@...ibm.com,
stable@...r.kernel.org
Subject: Re: [PATCH v3 4/7] kprobes: Replace %p with other pointer types
On Sat, 28 Apr 2018 00:42:02 +0900
Masami Hiramatsu <mhiramat@...nel.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@...nel.org>
Powered by blists - more mailing lists