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: Thu, 23 May 2024 16:12:25 -0700
From: Kees Cook <keescook@...omium.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Nathan Chancellor <nathan@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>, linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev, patches@...ts.linux.dev,
	kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] x86/boot: Address clang -Wimplicit-fallthrough in
 vsprintf()

On Thu, May 23, 2024 at 01:57:34PM +0200, Borislav Petkov wrote:
> On Fri, May 17, 2024 at 08:18:33AM -0700, Nathan Chancellor wrote:
> > There was a patch to make Clang match GCC's behavior a few years ago but
> > I think Kees made a good argument that GCC's behavior leaves potential
> > bugs on the table, so that was not pursued further.
> > 
> > https://reviews.llvm.org/D91895#2417170
> 
> Really? Maybe I'm being dense but I don't see real bugs there... I see
> readability issues. :-)

There isn't a bug _here_, but this is about making the code unambiguous
everywhere in the kernel. We've already done the work to get rid of
all these warnings; this one is newly introduced, so let's get it fixed.

We don't want to have the same flow-control statement reachable from two
different "case"s where the resulting behaviors are different. Otherwise
we can't determine if a "fallthrough" is missing or intentional.

Reviewed-by: Kees Cook <keescook@...omium.org>

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ