Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp866558pxb; Thu, 19 Aug 2021 13:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJnR8YYkPxiLP/6ygn2Dv+J0phpUhC45qT1OIqYpX/9pwJmJj7dnwHxeNL1ONhKQ7lL3uX X-Received: by 2002:a5d:9b99:: with SMTP id r25mr13150575iom.104.1629404389013; Thu, 19 Aug 2021 13:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629404389; cv=none; d=google.com; s=arc-20160816; b=gcaYh0FQn6+Hjjhht5w4JWk31xm3sPu/Krjwzi1NNy4SxN0QEeaxd8RhweBGH5cDYz 0OtxAfts16s3cxdCOcX3YrEp+wZdYnV6sam0HjauaQIV7UWIemoJydGp6EW5d+9lmnBH oX5SvDBh3dUxeaMI7IjIFrklmBNOgTi/bA83CMXCndW3QSfP1xgZz/r8q7bliBDMm4jM 4qdtWrMXwpHlbahtbqXxJUXT99Em9mb/LlVHguJkyoJWtL19/gtWe40q4bGkxo6BWFro zWQtnv/6dhEpkuS+Y4mO+M8zqzeyKMAlpHwjDKs/MT5uEA29tbyYdHVmOzOzEyWEeUHC eIFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=kCl8APLPAAQJp1R8WOh6UWpqypqaPKg4OHg7rQjRBws=; b=TLi7jFRwnFSZyr5rVNwu4sBqWk+35Pi+oPGgoWjKP2Llgkn8AbXP5vnq9hLq3npiaY /3glr+YtKsVu/lFQv6nH+e80ke51uLSy4yfvxjxnsQGyWIiqW/OC+upmNmZJk+yc8O0z Or3CKPXlZfNr5hwU3pNHeQrXQwws1Iny+OonZHXXgzF7TQurFv3ZvsknpHFhg9s63ocM Sys+28AWSo0qsVI0uZQ5Uid35sb5eCUKjYhnqGJxL8DmOGtN2O+26yTDvKlgJyF4hTMy cjK1H1JulkRlNQ8nmkyFdoj/f6exSE0PArLa8SyPpSGgWvRZMvqnMV32cWeaw1B3rVJO Foug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qWo5JIbf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d131si5442886iog.11.2021.08.19.13.19.37; Thu, 19 Aug 2021 13:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qWo5JIbf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234919AbhHSUSe (ORCPT + 99 others); Thu, 19 Aug 2021 16:18:34 -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