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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 08 Dec 2022 20:57:26 +0000
From:   Peter Lafreniere <peter@...jl.ca>
To:     Yury Norov <yury.norov@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Barry Song <baohua@...nel.org>,
        Ben Segall <bsegall@...gle.com>,
        haniel Bristot de Oliveira <bristot@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Gal Pressman <gal@...dia.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Ingo Molnar <mingo@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Jason Gunthorpe <jgg@...dia.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Leon Romanovsky <leonro@...dia.com>,
        Mel Gorman <mgorman@...e.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Saeed Mahameed <saeedm@...dia.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Tariq Toukan <tariqt@...dia.com>,
        Tariq Toukan <ttoukan.linux@...il.com>,
        Tony Luck <tony.luck@...el.com>,
        Valentin Schneider <vschneid@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        linux-crypto@...r.kernel.org, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org
Subject: Re: [PATCH v3 5/5] lib/cpumask: reorganize cpumask_local_spread() logic

> On Thu, Dec 08, 2022 at 08:17:22PM +0000, Peter Lafreniere wrote:
> > > Now after moving all NUMA logic into sched_numa_find_nth_cpu(),
> > > else-branch of cpumask_local_spread() is just a function call, and
> > > we can simplify logic by using ternary operator.
> > >
> > > While here, replace BUG() with WARN().
> > Why make this change? It's still as bad to hit the WARN_ON as it was before.
>
> For example, because of this:
>
>  > Greg, please don't do this
>  >
>  > > ChangeSet@...14, 2002-09-05 08:33:20-07:00, greg@...ah.com
>  > >   USB: storage driver: replace show_trace() with BUG()
>  >
>  > that BUG() thing is _way_ out of line, and has killed a few of my machines
>  > several times for no good reason. It actively hurts debuggability, because
>  > the machine is totally dead after it, and the whole and ONLY point of
>  > BUG() messages is to help debugging and make it clear that we can't handle
>  > something.
>  >
>  > In this case, we _can_ handle it, and we're much better off with a machine
>  > that works and that you can look up the messages with than killing it.
>  >
>  > Rule of thumb: BUG() is only good for something that never happens and
>  > that we really have no other option for (ie state is so corrupt that
>  > continuing is deadly).
>  >
>  >            Linus

Fair enough. It's not like it'll be hit anyway. My concern was for if
any of the 23 callers get an invalid result. I guess that if that causes
a crash, then so be it. We have the warning to track down the cause.

Thanks for the explanation,
Peter Lafreniere <peter@...jl.ca>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ