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: <CAMuHMdViacgi1W8acma7GhWaaVj92z6pg-g7ByvYOQL-DToacA@mail.gmail.com>
Date:   Mon, 24 Feb 2020 11:01:09 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     David Miller <davem@...emloft.net>,
        Doug Ledford <dledford@...hat.com>,
        Ira Weiny <ira.weiny@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Network Development <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg KH <gregkh@...uxfoundation.org>
Subject: Re: [GIT] Networking

Hi Linus,

On Thu, Jun 25, 2015 at 1:38 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Wed, Jun 24, 2015 at 6:39 AM, David Miller <davem@...emloft.net> wrote:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
>
> On the *other* side of the same conflict, I find an even more
> offensive commit, namely commit 4cd7c9479aff ("IB/mad: Add support for
> additional MAD info to/from drivers") which adds a BUG_ON() for a
> sanity check, rather than just returning -EINVAL or something sane
> like that.
>
> I'm getting *real* tired of that BUG_ON() shit. I realize that
> infiniband is a niche market, and those "commercial grade" niche
> markets are more-than-used-to crap code and horrible hacks, but this
> is still the kernel. We don't add random machine-killing debug checks
> when it is *so* simple to just do
>
>         if (WARN_ON_ONCE(..))
>                 return -EINVAL;
>
> instead.

And if we follow that advice, friendly Greg will respond with:
"We really do not want WARN_ON() anywhere, as that causes systems with
 panic-on-warn to reboot."
https://lore.kernel.org/lkml/20191121135743.GA552517@kroah.com/

> Killing the machine for idiotic things like that is truly offensive,
> and truly horrible horrible code. Why do I keep on having to tell
> people off for doing these things? Why do people keep thinking that
> debugging-by-killing-the-machine is a good idea?
>
> Either that BUG_ON() cannot possibly happen, in which case it should
> damn well not exist in the first place. Or it's a valuable debug aid,
> in which case it should damn well not be a BUG_ON. You can't have it
> both ways.

Agreed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ