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: <171593112323.10875.12795745055609386229.tip-bot2@tip-bot2>
Date: Fri, 17 May 2024 07:32:03 -0000
From: "tip-bot2 for Nathan Chancellor" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>, Nathan Chancellor <nathan@...nel.org>,
 Ingo Molnar <mingo@...nel.org>, Justin Stitt <justinstitt@...gle.com>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/urgent] x86/boot: Address clang -Wimplicit-fallthrough in
 vsprintf()

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     82110ae235e0560d1f952f74f9fd991587b0e3a7
Gitweb:        https://git.kernel.org/tip/82110ae235e0560d1f952f74f9fd991587b0e3a7
Author:        Nathan Chancellor <nathan@...nel.org>
AuthorDate:    Thu, 16 May 2024 07:03:41 -07:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 17 May 2024 09:22:56 +02:00

x86/boot: Address clang -Wimplicit-fallthrough in vsprintf()

After enabling -Wimplicit-fallthrough for the x86 boot code, clang
warns:

  arch/x86/boot/printf.c:257:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    257 |                 case 'u':
        |                 ^

Clang is a little more pedantic than GCC, which does not warn when
falling through to a case that is just break or return. Clang's version
is more in line with the kernel's own stance in deprecated.rst, which
states that all switch/case blocks must end in either break,
fallthrough, continue, goto, or return. Add the missing break to silence
the warning.

Fixes: dd0716c2b877 ("x86/boot: Add a fallthrough annotation")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Nathan Chancellor <nathan@...nel.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Justin Stitt <justinstitt@...gle.com>
Link: https://lore.kernel.org/r/20240516-x86-boot-fix-clang-implicit-fallthrough-v1-1-04dc320ca07c@kernel.org

Closes: https://lore.kernel.org/oe-kbuild-all/202405162054.ryP73vy1-lkp@intel.com/
---
 arch/x86/boot/printf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index c0ec1dc..51dc14b 100644
--- a/arch/x86/boot/printf.c
+++ b/arch/x86/boot/printf.c
@@ -254,6 +254,8 @@ int vsprintf(char *buf, const char *fmt, va_list args)
 		case 'd':
 		case 'i':
 			flags |= SIGN;
+			break;
+
 		case 'u':
 			break;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ