All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Jes Sorensen <jes.sorensen@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	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
Date: Wed, 10 Mar 2021 12:59:34 -0800	[thread overview]
Message-ID: <202103101254.1DBEE1082@keescook> (raw)
In-Reply-To: <90baba5d-53a1-c7b1-495d-5902e9b04a72@gmail.com>

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

  reply	other threads:[~2021-03-10 21:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  9:48 [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang Gustavo A. R. Silva
2021-03-05 13:40 ` Kalle Valo
2021-03-05 16:49   ` Gustavo A. R. Silva
2021-03-10 19:14   ` Kees Cook
2021-03-10 19:31     ` Jes Sorensen
2021-03-10 19:45       ` Kees Cook
2021-03-10 19:51         ` Jes Sorensen
2021-03-10 20:59           ` Kees Cook [this message]
2021-04-17 18:29             ` Jes Sorensen
2021-04-17 19:24               ` Gustavo A. R. Silva
2021-04-19 11:58                 ` Jes Sorensen
2021-03-11  7:00     ` Kalle Valo
2021-03-11  7:16       ` Gustavo A. R. Silva
2021-04-17 17:52 ` Kalle Valo
     [not found] ` <20210417175201.2D5A7C433F1@smtp.codeaurora.org>
2021-04-17 18:30   ` Jes Sorensen
2021-04-18  0:09     ` Joe Perches
2021-04-19 11:56       ` Jes Sorensen
     [not found] ` <20210417175201.280F9C4338A@smtp.codeaurora.org>
2021-04-19 22:58   ` Gustavo A. R. Silva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202103101254.1DBEE1082@keescook \
    --to=keescook@chromium.org \
    --cc=davem@davemloft.net \
    --cc=gustavoars@kernel.org \
    --cc=jes.sorensen@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.