Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp605049pxf; Wed, 10 Mar 2021 13:00:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSDJ1gm37HF38cpuIYBUXW8vy33Oh05BCU0qOCVEa80Nme8Lm0uR/YAeKV1fUuSu1lr6GJ X-Received: by 2002:a17:906:684b:: with SMTP id a11mr284201ejs.329.1615410035700; Wed, 10 Mar 2021 13:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615410035; cv=none; d=google.com; s=arc-20160816; b=ehGB35gXA8vfMBV8qNWgdO0IswHYBPcVIMqouoJ1vBFpaH1iakol4VTWuJ9tALmmIr NWWc5B0tnke8yGNWRPON2/4n83LXNQ8L41kR3jyYiovuLQv1ZaU3cyrqgaY4usbJS8sY fpRXuI4T4QyjEvTEh6054euhRwLKX6s+Zp1xQErP8fEbCqvMV17bzhmnJFY6StZ42b7l itebpvy6YSwU0GlYJXK5BGnXYwXQ4eSFlfkCmz3wvFcNTsoBCTz+G4CVXjpS7ox1uNfp ewSK1UbYpQ+ppSfDZLY1R3CAJG+lLgyU5GaxJIRCyXd5ahmH2wHIhuWXcKOhUZKANAgA 75ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x/rIuUerFp6JubXsUurUxMlwHMqoisLVHa0WvFsQbL8=; b=M3U5DH6ateKM91yadv+iEkzJiL1J1igmxLGh9ym8KEhC0jMxP6JjoM5akq3AjMPqJS 8/FGhPkpGuVT6rmZ1sqwPrzIKt4S6ezuztc/viHdgQ9m2owB8u2wYi4rDFfBzvIKYWu0 yrnnELTX/DE0Bm+Aw/Pp886wkehhbOc5DsbBOVQAb2m1rrc/U9BEuKmpEJG7DlDFVIZp HRw4us0/D1ZwJic2o6jDsdmWNdwiCeoF33osNS4WmQGPsBi+63Kecb2dE7yVTBF/RmfO joTIUN0lvmwHYFFlhpiNDAxWIgmMDE64THRPuhXZNwpSQ/CIuJINLQ455NDlGATZ6MQE qMOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=B0ZLQVDW; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si340322ejx.75.2021.03.10.13.00.12; Wed, 10 Mar 2021 13:00:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=@chromium.org header.s=google header.b=B0ZLQVDW; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231575AbhCJU7k (ORCPT + 99 others); Wed, 10 Mar 2021 15:59:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231368AbhCJU7g (ORCPT ); Wed, 10 Mar 2021 15:59:36 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF4E9C061756 for ; Wed, 10 Mar 2021 12:59:36 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id s21so2030251pfm.1 for ; Wed, 10 Mar 2021 12:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x/rIuUerFp6JubXsUurUxMlwHMqoisLVHa0WvFsQbL8=; b=B0ZLQVDWjn4y7pLVZujCoeaez/tpfcbcE/ZZV1LX2GR1pZ+CTp1UKP7SK+Oit37+N/ DFTJl49OL+uiIShO0msVmQQ3lm1KffSqOUfvZijAtqm2gKOalVLaUrbtXc9TZttB7bxL Q4Tebn15gm1KjmCfbbWyyreEdgG/UiwREpZlY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x/rIuUerFp6JubXsUurUxMlwHMqoisLVHa0WvFsQbL8=; b=FnhgQoBWs/uT7NL1bHGS4m4eidj06ah+h8X2wHMRci+9nRWTbS80qDg8/dCbfdL9rX H2du0eJ9Fu1ZvhpEfBvawiTPgKTOe6jrphL4WWqezBDSA1C/yTTGoCezCVEynTa3RgaQ pNtok3RNcpGr2ZKinH/f/R2qJ0e3FoojRFZH4o7Lw5YgY0wKMGSPZ3iIxe9bswJ/yjBp zdjRmuCbNz4q3jaZtf6yqz/DCkDj01AkgAIOFQSFL28+ExgDjPueW5WSWy8rU3imMXMG LossySU67eCa5gM6bCtZVeRjCeHYRWbrv9er8sCTbX3a+JmFTMHzn1ft6jt3E+HEhvR8 RzkA== X-Gm-Message-State: AOAM530xyp+6einSwn6VmHh7EcmirPhvSuOC9xlvb8tSHH37YFGgevLy im2PuvHDAIo2qa7OgzaWKGNpPA== X-Received: by 2002:a63:2cc4:: with SMTP id s187mr4239672pgs.438.1615409976136; Wed, 10 Mar 2021 12:59:36 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id fv9sm268554pjb.23.2021.03.10.12.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 12:59:35 -0800 (PST) Date: Wed, 10 Mar 2021 12:59:34 -0800 From: Kees Cook To: Jes Sorensen Cc: Kalle Valo , "Gustavo A. R. Silva" , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang Message-ID: <202103101254.1DBEE1082@keescook> References: <20210305094850.GA141221@embeddedor> <871rct67n2.fsf@codeaurora.org> <202103101107.BE8B6AF2@keescook> <2e425bd8-2722-b8a8-3745-4a3f77771906@gmail.com> <202103101141.92165AE@keescook> <90baba5d-53a1-c7b1-495d-5902e9b04a72@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90baba5d-53a1-c7b1-495d-5902e9b04a72@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Mar 10, 2021 at 02:51:24PM -0500, Jes Sorensen wrote: > On 3/10/21 2:45 PM, Kees Cook wrote: > > On Wed, Mar 10, 2021 at 02:31:57PM -0500, Jes Sorensen wrote: > >> On 3/10/21 2:14 PM, Kees Cook wrote: > >>> Hm, this conversation looks like a miscommunication, mainly? I see > >>> Gustavo, as requested by many others[1], replacing the fallthrough > >>> comments with the "fallthrough" statement. (This is more than just a > >>> "Clang doesn't parse comments" issue.) > >>> > >>> This could be a tree-wide patch and not bother you, but Greg KH has > >>> generally advised us to send these changes broken out. Anyway, this > >>> change still needs to land, so what would be the preferred path? I think > >>> Gustavo could just carry it for Linus to merge without bothering you if > >>> that'd be preferred? > >> > >> I'll respond with the same I did last time, fallthrough is not C and > >> it's ugly. > > > > I understand your point of view, but this is not the consensus[1] of > > the community. "fallthrough" is a macro, using the GCC fallthrough > > attribute, with the expectation that we can move to the C17/C18 > > "[[fallthrough]]" statement once it is finalized by the C standards > > body. > > I don't know who decided on that, but I still disagree. It's an ugly and > pointless change that serves little purpose. We shouldn't have allowed > the ugly /* fall-through */ comments in either, but at least they didn't > mess with the code. I guess when you give someone an inch, they take a mile. > > Last time this came up, the discussion was that clang refused to fix > their brokenness and therefore this nonsense was being pushed into the > kernel. It's still a pointless argument, if clang can't fix it's crap, > then stop using it. > > As Kalle correctly pointed out, none of the previous comments to this > were addressed, the patches were just reposted as fact. Not exactly a > nice way to go about it either. Do you mean changing the commit log to re-justify these changes? I guess that could be done, but based on the thread, it didn't seem to be needed. The change is happening to match the coding style consensus reached to give the kernel the flexibility to move from a gcc extension to the final C standards committee results without having to do treewide commits again (i.e. via the macro). -- Kees Cook