lkml.org 
[lkml]   [2019]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 7/7] bug: Move WARN_ON() "cut here" into exception handler
On Tue, Sep 10, 2019 at 01:05:39AM +0900, Sergey Senozhatsky wrote:
> On (08/20/19 09:47), Kees Cook wrote:
> [..]
> > @@ -181,6 +181,15 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
> > }
> > }
> >
> > + /*
> > + * 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. :)

--
Kees Cook

\
 
 \ /
  Last update: 2019-09-10 11:00    [W:0.079 / U:26.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site