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: <20220702133840.943817a7694406a135bb48a9@linux-foundation.org>
Date:   Sat, 2 Jul 2022 13:38:40 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Sander Vanheule <sander@...nheule.net>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        elver@...gle.com, gregkh@...uxfoundation.org,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>, vschneid@...hat.com,
        Yury Norov <yury.norov@...il.com>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H . Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v4 0/5] cpumask: Fix invalid uniprocessor assumptions

On Sat,  2 Jul 2022 18:08:23 +0200 Sander Vanheule <sander@...nheule.net> wrote:

> On uniprocessor builds, it is currently assumed that any cpumask will
> contain the single CPU: cpu0. This assumption is used to provide
> optimised implementations.
> 
> The current assumption also appears to be wrong, by ignoring the fact
> that users can provide empty cpumask-s. This can result in bugs as
> explained in [1].

It's a little unkind to send people off to some link to explain the
very core issue which this patchset addresses!  So I enhanced this
paragraph:

: The current assumption also appears to be wrong, by ignoring the fact that
: users can provide empty cpumasks.  This can result in bugs as explained in
: [1] - for_each_cpu() will run one iteration of the loop even when passed
: an empty cpumask.

> This series introduces some basic tests, and updates the optimisations
> for uniprocessor builds.
> 
> The x86 patch was written after the kernel test robot [2] ran into a
> failed build. I have tried to list the files potentially affected by the
> changes to cpumask.h, in an attempt to find any other cases that fail on
> !SMP. I've gone through some of the files manually, and ran a few cross
> builds, but nothing else popped up. I (build) checked about half of the
> potientally affected files, but I do not have the resources to do them
> all. I hope we can fix other issues if/when they pop up later.
> 
> [1] https://lore.kernel.org/all/20220530082552.46113-1-sander@svanheule.net/
> [2] https://lore.kernel.org/all/202206060858.wA0FOzRy-lkp@intel.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ