From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D270C4338F for ; Thu, 19 Aug 2021 20:18:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3A42610D2 for ; Thu, 19 Aug 2021 20:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235034AbhHSUSg (ORCPT ); Thu, 19 Aug 2021 16:18:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:39572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbhHSUSd (ORCPT ); Thu, 19 Aug 2021 16:18:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B3A6610D2; Thu, 19 Aug 2021 20:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629404276; bh=JLc6MbNYqramEDF6nTAvsq6MESZmf7zguMGFkkGgcHg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=qWo5JIbfjmGVZi+yzG/U7j5d0gwQLO1/cLteNgLHXzqOIBbmRSfbA782mYM1PHhzJ S7y6lYlNxwEXl+jo9T/l083VI3JWDT57uiAUueRlLWKqga8Imyeu5vCXMSiSaR8NoW PSKOgv0jBWYciM8KYTl8Gz8nFSEJF2dzl8meistXieu2YGYLswS5x7K/zhmoEdP7jT XXax6mzWi3JDfJI8N5pc9frY0vkhkqKmy/oEtRBEvx6fTwRZZK0uVQOVyA1GvrWFC8 n1cO1FP3196VCJ+vkI4EeRz4aNvgoAwl49mEPyEf5Z3yKBPU5jtEalDylVs8svVOIA mttbmKf3RCIYg== Subject: Re: [GIT PULL] Enable -Wimplicit-fallthrough for Clang for 5.14-rc7 To: Linus Torvalds , "Gustavo A. R. Silva" Cc: Kees Cook , Linux Kernel Mailing List , Nick Desaulniers , linux-hardening@vger.kernel.org References: <20210819040517.GA329693@embeddedor> From: Nathan Chancellor Message-ID: <9ef3265b-a5e7-d21b-68a8-ad137ac6ebfd@kernel.org> Date: Thu, 19 Aug 2021 13:17:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/19/2021 12:19 PM, Linus Torvalds wrote: > On Wed, Aug 18, 2021 at 9:02 PM Gustavo A. R. Silva > wrote: >> >> Enable -Wimplicit-fallthrough for Clang for 5.14-rc7 > > No. Much too late in the release, particularly knowing that we have > Clang pre-releases that claim to be 14.0.0 and get this wrong. > > So no way does this happen like this. > > That's doubly true since the clang support for this all adds exactly > _zero_ upside, only downside: we made the gcc checks be stricter, and > gcc ends up having (a) more wide coverage and (b) doesn't have the > bugs clang has. For what it's worth, clang's version of -Wimplicit-fallthrough would have caught the bug in commit 652b44453ea9 ("habanalabs/gaudi: fix missing code in ECC handling"). Yes, small fix in the sea of patches that were needed to address clang's more pedantic version of the warning but this version of the warning is completely in line with the kernel's stance of switch statements in Documentation/process/deprecated.rst: "All switch/case blocks must end in one of: * break; * fallthrough; * continue; * goto