From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: Re: [PATCH v2 7/7] bug: Move WARN_ON() "cut here" into exception handler Date: Tue, 10 Sep 2019 01:05:39 +0900 Message-ID: <20190909160539.GA989@tigerII.localdomain> References: <201908200943.601DD59DCE@keescook> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <201908200943.601DD59DCE@keescook> Sender: linux-kernel-owner@vger.kernel.org To: 20190819234111.9019-8-keescook@chromium.org Cc: Andrew Morton , Christophe Leroy , Peter Zijlstra , Drew Davenport , Arnd Bergmann , "Steven Rostedt (VMware)" , Feng Tang , Petr Mladek , Mauro Carvalho Chehab , Borislav Petkov , YueHaibing , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-arch.vger.kernel.org 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()? -ss From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f194.google.com ([209.85.215.194]:41569 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbfIIQFo (ORCPT ); Mon, 9 Sep 2019 12:05:44 -0400 From: Sergey Senozhatsky Date: Tue, 10 Sep 2019 01:05:39 +0900 Subject: Re: [PATCH v2 7/7] bug: Move WARN_ON() "cut here" into exception handler Message-ID: <20190909160539.GA989@tigerII.localdomain> References: <201908200943.601DD59DCE@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201908200943.601DD59DCE@keescook> Sender: linux-arch-owner@vger.kernel.org List-ID: To: 20190819234111.9019-8-keescook@chromium.org Cc: Andrew Morton , Christophe Leroy , Peter Zijlstra , Drew Davenport , Arnd Bergmann , "Steven Rostedt (VMware)" , Feng Tang , Petr Mladek , Mauro Carvalho Chehab , Borislav Petkov , YueHaibing , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20190909160539.FpObMHctTQ9yocbQwCX_ZmPCdimEJoQmE_104lAolxM@z> 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()? -ss