Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1016663lqo; Fri, 17 May 2024 08:19:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9nVrQqNA264AfdFe38bfc1z3ciB8YblvDIPJXYOmtlZVpCh5jRIWByrBB8v12HrxSRJyIszIk7GGzr2L8kp/0CRH+MVm2Tr39DSX4jA== X-Google-Smtp-Source: AGHT+IHFcTL16HMiwXBhZw2ui6OrOoIaDmnzKB5Ttg4P9jX6pf/sEsxwiXdyWW8K0dXXdglQXOwq X-Received: by 2002:a05:620a:562b:b0:792:9403:3aa8 with SMTP id af79cd13be357-792c75ffe10mr2239916785a.58.1715959151321; Fri, 17 May 2024 08:19:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715959151; cv=pass; d=google.com; s=arc-20160816; b=BdKaTOu9zmADOuvAAyWI/yKRIHBDc6DvBikAy8WBqegrVVqTDmcVBo3natPYDvD09L uCf7/wDts3ucCDdCTmI+kOKXngnb5iyNW1bBX9xd533JemK34FLh5cPmyRp/H8vWWZ9z 1fmwrvPQvswYHvKAJklT3QNirSihh6yD5fs/jTnH01dPv/YtNHw+409hVQlEst35pXMl 6y0vA9RcmgYCIwct2ZjAxYJHcas1qPppZ3DzoJXZIzWXmQLjSfJj+cPNAz4coMfK0iCP cLEQQQYtbw2PTkCw768nLtdqSsA2x++zN0QKdOGBYsNMLT9W11vP9E/pH3wpO+41G8DU avDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Q0fjm2il/lgbmDo3PJTyZpJ7/XPZAfnwUVcoO3/+C7Y=; fh=QUqzHQMwCdLDxI2FTx/RFeuFXrJQCWE8sAxw6svO/AU=; b=i7tCTkqddRf9YI2n4J3VyTBRgPGi46N4Tj7wt+YWCAcE7YVJ7SwDV/eox3JzgKnXLh uGAINP0/h3gv4LSUqYQkHiT25F60GA7ONvM+XiBmaFMRgiAadVE+dZwVDNzCYL9LNvKa gM5Jytr6CX2x/sgCprHJn5HVQJueTDuQPpn+g/6RGQdIHY79UDtRPrzd5aLKbi2+9ibX U2OlHTDgKXMn40AhuB31EdsZLHrrowPd6PHNizK0Y41KIEgGLBR1m68vTfbeX3zmlOof +IUAl9+mZDUTEDGKnnykdy6AtyKMdNAhXlGSkTMTEviyFzUl0ui0rUpJScjP2k3Lp/fZ U+LA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mUp1JG1x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-182283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf277328si280404785a.57.2024.05.17.08.19.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 08:19:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mUp1JG1x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-182283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8766C1C23DD6 for ; Fri, 17 May 2024 15:19:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51A9B12E1D2; Fri, 17 May 2024 15:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mUp1JG1x" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6736812DD9F; Fri, 17 May 2024 15:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715959116; cv=none; b=IiMsWGixv55Y1/yKRyXACI9EmxPNVNmMhT/a6OaTFRK961EmBRHDeGzlHbYHtgjNqgHgfmVb727jYLoiF9Ex+8G1nkEDjaQnzfYVjkNjCskvXBhAhVlZhYeOCIGdvuo1PNUiAsZ48kZeGIX1ZYW4IcVzS2cKPhDAfcK5WJXsI1Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715959116; c=relaxed/simple; bh=UoxzRiDZ+O5N/jgmjQRwGygnUVsa2VMjATeBWNTgTzk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tKq9lowx+g9uLAA3VLjb/SeNNw5Q01lB6iiDOS3SbZnHhqSlHpGQ9Uc2YW5cFWaGWMvSRjdZGurxJorw91KDnWZePoaR9GE8luCYzHIZch0QjBGqZkvaFwD/lYp4TotRw2iAhosTJOgsszflh9hX2sPiCqwvN/FCO4s5rlDsztg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mUp1JG1x; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3890AC2BD10; Fri, 17 May 2024 15:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715959115; bh=UoxzRiDZ+O5N/jgmjQRwGygnUVsa2VMjATeBWNTgTzk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mUp1JG1xjhlBGV5rWRPDwtlRWArHUCcp6+UL669IQBFyXAohqu2zRvQ7S3yM4pi6O BXr5RCG18AGMN28M9xDJTgQ+SBrbNUbhEZJXEuZiAK/9H6rPRC4xDLv7OWPpyD0ESC B9Vq08mIQU/S0YbYmkE+dplgrTD9pt9UaeykKLamyhSrp+RZ/hhEZEYYLYTJ2eSyew U8wgOq0VEe87HFPDW7m/BJ29Rtd35K5HdNmodHDcDvWLJ/P+51Iw8BrZbsB24UKEUy EVQCyx/NtHR08QOeeRh8qiGYa2oXNLH0Dt8Q2pVujHYSHr64o3i8dh0IyS1OVUDzPq clJtycJRMGyHw== Date: Fri, 17 May 2024 08:18:33 -0700 From: Nathan Chancellor To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, kernel test robot , Kees Cook Subject: Re: [PATCH] x86/boot: Address clang -Wimplicit-fallthrough in vsprintf() Message-ID: <20240517151833.GB3660288@thelio-3990X> References: <20240516-x86-boot-fix-clang-implicit-fallthrough-v1-1-04dc320ca07c@kernel.org> <20240517095110.GAZkcojmJQoY_zU-OT@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240517095110.GAZkcojmJQoY_zU-OT@fat_crate.local> On Fri, May 17, 2024 at 11:51:10AM +0200, Borislav Petkov wrote: > On Thu, May 16, 2024 at 07:03:41AM -0700, Nathan Chancellor wrote: > > 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. > > Is anyone fixing Clang? > > :-P 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 It was brought up to GCC as well but they did not want to change their behavior: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432 Cheers, Nathan