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>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiGA7WRzP9uDNwKjsgZ8B=ycnYaqOcEAPudfNfKtQP_vw@mail.gmail.com>
Date:   Mon, 6 Mar 2023 12:59:44 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Vernon Yang <vernon2gm@...il.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Yury Norov <yury.norov@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: cpumask emergency fixes pushed out

Just a note to people involved in the multiple different threads that
I did a "quick fix" push of the verified fix for the random.c issue.

I still think that the lpfc driver in particular could be cleaned up,
and considering that the random.c use-case looks like it really wants
the same thing ("give me the next cpu, but wrap to the beginning if
that fails") I wonder if we should just have a generic helper for that
case.

The existing "cpumask_next_wrap()" function does do pretty much
exactly that, you just have to give it some unusual arguments. It *is*
used, but it's an odd enough interface that I'm not really sure that
I'm a huge fan of it.

Somewhat ironically, the native bitmap version
("find_next_bit_wrap()") does *not* have that ugly interface, and is
fairly straightforward. So it's really just the cpumask version that
has that extension that makes it so non-intuitive.

Anyway, I did that quick fix commit, but I do hope that people take a
look at those fixes for maybe doing things better. And if somebody
finds other not-quite-as obvious cases of that incorrect pattern of
checking a bit scanning function for 'nr_cpumask_bits', please holler.

                    Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ