All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christophe Leroy <christophe.leroy@c-s.fr>,
	Peter Zijlstra <peterz@infradead.org>,
	Drew Davenport <ddavenport@chromium.org>,
	Arnd Bergmann <arnd@arndb.de>,
	"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
	Feng Tang <feng.tang@intel.com>, Petr Mladek <pmladek@suse.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Borislav Petkov <bp@suse.de>, YueHaibing <yuehaibing@huawei.com>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/7] bug: Move WARN_ON() "cut here" into exception handler
Date: Tue, 10 Sep 2019 18:16:19 +0900	[thread overview]
Message-ID: <20190910091619.GA207290@jagdpanzerIV> (raw)
In-Reply-To: <201909100157.CEE99802C@keescook>

On (09/10/19 01:59), Kees Cook wrote:
> On Tue, Sep 10, 2019 at 01:05:39AM +0900, Sergey Senozhatsky wrote:
> > On (08/20/19 09:47), Kees Cook wrote:
> > [..]
> > > +	/*
> > > +	 * BUG() and WARN_ON() families don't print a custom debug message
> > > +	 * before triggering the exception handler, so we must add the
> > > +	 * "cut here" line now. WARN() issues its own "cut here" before the
> > > +	 * extra debugging message it writes before triggering the handler.
> > > +	 */
> > > +	if ((bug->flags & BUGFLAG_NO_CUT_HERE) == 0)
> > > +		printk(KERN_DEFAULT CUT_HERE);
> > 
> > Shouldn't this be pr_warn() or pr_crit()?
> 
> The pr_* helpers here would (potentially) add unwanted prefixes, so
> those aren't used. KERN_DEFAULT is used here because that's how it's
> always been printed. I didn't want to change that for this refactoring
> work. I'm not opposed to it, generally speaking, though. :)

I just glanced through CUT_HERE users

warn_slowpath_fmt()    pr_warn(CUT_HERE)
__warn_printk()        pr_warn(CUT_HERE)
rdma_restrack_clean()  pr_err("restrack: %s", CUT_HERE)
rdma_restrack_clean()  pr_err("restrack: %s", CUT_HERE)

+ oops/panic end markers are of pr_warn() or pr_crit() log levels.
So I thought that maybe we can make it more or less similar.

But if it has always been this way (KERN_DEFAULT) then OK.

	-ss

      reply	other threads:[~2019-09-10  9:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 16:47 [PATCH v2 7/7] bug: Move WARN_ON() "cut here" into exception handler Kees Cook
2019-08-22 22:56 ` Andrew Morton
2019-08-22 22:56   ` Andrew Morton
2019-08-23 14:26   ` Christophe Leroy
2019-08-23 14:26     ` Christophe Leroy
2019-08-24 19:08     ` Kees Cook
2019-08-29  4:55       ` Christophe Leroy
2019-08-29 16:12         ` Kees Cook
2019-08-23 14:56 ` Christophe Leroy
2019-09-09 16:05 ` Sergey Senozhatsky
2019-09-10  8:59   ` Kees Cook
2019-09-10  9:16     ` Sergey Senozhatsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190910091619.GA207290@jagdpanzerIV \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bp@suse.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=ddavenport@chromium.org \
    --cc=feng.tang@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.