lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jLi_qnaGiykDrzaarJ2tDPQOyc3Aae0JBtGGMOZZaJ-qw@mail.gmail.com>
Date:	Wed, 17 Aug 2016 14:19:54 -0700
From:	Kees Cook <keescook@...gle.com>
To:	Joe Perches <joe@...ches.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: BUG and WARN kernel log levels

On Wed, Aug 17, 2016 at 9:36 AM, Joe Perches <joe@...ches.com> wrote:
> On Mon, 2016-08-15 at 12:00 -0700, Joe Perches wrote:
>> On Mon, 2016-08-15 at 11:53 -0700, Kees Cook wrote:
>> >
>> > Hi,
>> >
>> > So, I noticed that asm-gemeric/bug.h defines BUG() without a log level:
>> >
>> > #ifndef HAVE_ARCH_BUG
>> > #define BUG() do { \
>> >        printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
>> >
>> > Seems like it should have one?
>> >
>> > Also, I think we might want to examine WARN() a bit... it doesn't have
>> > a log level either, but only a fraction of callers set one:
>> >
>> > $ git grep -E 'WARN(_TAINT|)(_RATELIMIT|_ONCE|)\([^\)]' | grep -v KERN_ | wc -l
>> > 2735
>> >
>> > $ git grep -E 'WARN(_TAINT|)(_RATELIMIT|_ONCE|)\([^\)]' | grep KERN_ | wc -l
>> > 77
>> >
>> > If I'm reading checkpatch.pl correctly, it doesn't warn about missing
>> > log levels on WARN calls, but I think it should.
>> >
>> > How do you think is best to clean this up?
>> >
>> > Mainly, I'd like to add a format string to BUG, or introduce a new
>> > BUGish call that takes a format...
>> I once suggested something similar awhile ago.
>> https://lkml.org/lkml/2008/7/8/261
>
> And here I submitted patches:
> https://lkml.org/lkml/2010/10/30/176

Ah, I see some of this series landed. I see commits scattered in the
tree, but not as many as you sent, I think. What still remains?

-Kees

-- 
Kees Cook
Nexus Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ