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]
Date:   Fri, 4 Nov 2022 15:36:22 -0700
From:   Yury Norov <yury.norov@...il.com>
To:     Valentin Schneider <vschneid@...hat.com>
Cc:     linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Sander Vanheule <sander@...nheule.net>,
        Alexey Klimov <klimov.linux@...il.com>,
        Eric Biggers <ebiggers@...gle.com>
Subject: Re: [PATCH v2] cpumask: limit visibility of FORCE_NR_CPUS

On Fri, Nov 04, 2022 at 05:43:53PM +0000, Valentin Schneider wrote:
> On 19/10/22 15:59, Yury Norov wrote:
> > In current form, FORCE_NR_CPUS is visible to all users building their
> > kernels, even not experts. It is also set in allmodconfig or allyesconfig,
> > which is not a correct behavior.
> >
> > The 'choice' and unused config UNFORCE_NR_CPUS are used to ensure that
> > auto-generated configs that try to enable as much options as possible,
> > like allmodconfig, don't enable FORCE_NR_CPUS.
> >
> > Suggested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > Signed-off-by: Yury Norov <yury.norov@...il.com>
> > ---
> > v2: extend commit message with an explanation for what we need 'choice'.
> >
> >  lib/Kconfig | 31 ++++++++++++++++++++++++-------
> >  1 file changed, 24 insertions(+), 7 deletions(-)
> >
> > diff --git a/lib/Kconfig b/lib/Kconfig
> > index 9bbf8a4b2108..1ada12f5dda6 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -528,14 +528,31 @@ config CPUMASK_OFFSTACK
> >         them on the stack.  This is a bit more expensive, but avoids
> >         stack overflow.
> >
> > +choice
> > +	prompt "Number of CPUs detection method"
> > +	default UNFORCE_NR_CPUS
> > +	depends on SMP && EXPERT
> 
> What about moving the 'depends on EXPERT' onto FORCE_NR_CPUS? I find it
> makes it easier to figure out the requirements for that option, and is
> similar to how e.g. CONFIG_PREEMPT_RT is handled.

In case of PREEMPT_RT, there are some other options to choose. In case of
FORCE_NR_CPUS there will be a choice with a single option, and it would be
weird that the option is never used.

I'd prefer to hide this choice for non-experts entirely.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ