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: Mon, 05 Feb 2024 09:45:27 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Yoann Congal <yoann.congal@...le.fr>, linux-fsdevel@...r.kernel.org,
 linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-serial@...r.kernel.org, x86@...nel.org
Cc: André Almeida <andrealmeid@...lia.com>, Borislav Petkov
 <bp@...en8.de>,
 Darren Hart <dvhart@...radead.org>, Dave Hansen
 <dave.hansen@...ux.intel.com>, Davidlohr Bueso <dave@...olabs.net>, Geert
 Uytterhoeven <geert@...ux-m68k.org>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>, "H . Peter Anvin" <hpa@...or.com>, Ingo
 Molnar <mingo@...hat.com>, Jiri Slaby <jirislaby@...nel.org>, Josh
 Triplett <josh@...htriplett.org>, Masahiro Yamada <masahiroy@...nel.org>,
 Matthew Wilcox <willy@...radead.org>, Peter Zijlstra
 <peterz@...radead.org>, Petr Mladek <pmladek@...e.com>, Sergey Senozhatsky
 <senozhatsky@...omium.org>, Steven Rostedt <rostedt@...dmis.org>, Thomas
 Gleixner <tglx@...utronix.de>, Willem de Bruijn
 <willemdebruijn.kernel@...il.com>, Yoann Congal <yoann.congal@...le.fr>,
 Vegard Nossum <vegard.nossum@...cle.com>
Subject: Re: [PATCH v3 1/2] printk: Fix LOG_CPU_MAX_BUF_SHIFT when
 BASE_SMALL is enabled

On 2024-02-05, Yoann Congal <yoann.congal@...le.fr> wrote:
> LOG_CPU_MAX_BUF_SHIFT default value depends on BASE_SMALL:
>   config LOG_CPU_MAX_BUF_SHIFT
>   	default 12 if !BASE_SMALL
>   	default 0 if BASE_SMALL
> But, BASE_SMALL is a config of type int and "!BASE_SMALL" is always
> evaluated to true whatever is the value of BASE_SMALL.
>
> This patch fixes this by using BASE_FULL (type bool) which is equivalent
> to BASE_SMALL==0.
>
> Note: This changes CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 to
> CONFIG_LOG_CPU_MAX_BUF_SHIFT=0 for BASE_SMALL defconfigs, but that will
> not be a big impact due to this code in kernel/printk/printk.c:
>   /* by default this will only continue through for large > 64 CPUs */
>   if (cpu_extra <= __LOG_BUF_LEN / 2)
>           return;
> Systems using CONFIG_BASE_SMALL and having 64+ CPUs should be quite
> rare.
>
> John Ogness <john.ogness@...utronix.de> (printk reviewer) wrote:
>> For printk this will mean that BASE_SMALL systems were probably
>> previously allocating/using the dynamic ringbuffer and now they will
>> just continue to use the static ringbuffer. Which is fine and saves
>> memory (as it should).
>
> Signed-off-by: Yoann Congal <yoann.congal@...le.fr>
> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Closes: https://lore.kernel.org/all/CAMuHMdWm6u1wX7efZQf=2XUAHascps76YQac6rdnQGhc8nop_Q@mail.gmail.com/
> Reported-by: Vegard Nossum <vegard.nossum@...cle.com>
> Closes: https://lore.kernel.org/all/f6856be8-54b7-0fa0-1d17-39632bf29ada@oracle.com/
> Fixes: 4e244c10eab3 ("kconfig: remove unneeded symbol_empty variable")

Reviewed-by: John Ogness <john.ogness@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ