[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang
- To: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
- From: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
- Date: Wed, 25 Nov 2020 14:09:29 -0800
- Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, "Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx>, Joe Perches <joe@xxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, alsa-devel@xxxxxxxxxxxxxxxx, linux-atm-general@xxxxxxxxxxxxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx, linux-wireless <linux-wireless@xxxxxxxxxxxxxxx>, linux-fbdev@xxxxxxxxxxxxxxx, dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Nathan Chancellor <natechancellor@xxxxxxxxx>, linux-ide@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, GR-everest-linux-l2@xxxxxxxxxxx, wcn36xx@xxxxxxxxxxxxxxxxxxx, samba-technical@xxxxxxxxxxxxxxx, linux-i3c@xxxxxxxxxxxxxxxxxxx, linux1394-devel@xxxxxxxxxxxxxxxxxxxxx, linux-afs@xxxxxxxxxxxxxxxxxxx, usb-storage@xxxxxxxxxxxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx, linux-cifs@xxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, oss-drivers@xxxxxxxxxxxxx, bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, intel-wired-lan@xxxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, Miguel Ojeda <ojeda@xxxxxxxxxx>, tipc-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-watchdog@xxxxxxxxxxxxxxx, selinux@xxxxxxxxxxxxxxx, linux-arm-msm <linux-arm-msm@xxxxxxxxxxxxxxx>, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-geode@xxxxxxxxxxxxxxxxxxx, linux-can@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx, op-tee@xxxxxxxxxxxxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx, linux-hams@xxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, linux-hwmon@xxxxxxxxxxxxxxx, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@xxxxxxxxxx>, linux-nfs@xxxxxxxxxxxxxxx, GR-Linux-NIC-Dev@xxxxxxxxxxx, Linux Memory Management List <linux-mm@xxxxxxxxx>, Network Development <netdev@xxxxxxxxxxxxxxx>, linux-decnet-user@xxxxxxxxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, Linux-Renesas <linux-renesas-soc@xxxxxxxxxxxxxxx>, linux-sctp@xxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" <linux-crypto@xxxxxxxxxxxxxxx>, patches@xxxxxxxxxxxxxxxxxxxxx, linux-integrity@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-hardening@xxxxxxxxxxxxxxx, Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 25 Nov 2020 22:09:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Nov 25, 2020 at 1:33 PM Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Or do you think that a codebase can somehow satisfy multiple checkers and
> their divergent interpretations of the language spec?
Have we found any cases yet that are divergent? I don't think so. It
sounds to me like GCC's cases it warns for is a subset of Clang's.
Having additional coverage with Clang then should ensure coverage for
both.
> > This is not a shiny new warning; it's already on for GCC and has existed
> > in both compilers for multiple releases.
> >
>
> Perhaps you're referring to the compiler feature that lead to the
> ill-fated, tree-wide /* fallthrough */ patch series.
>
> When the ink dries on the C23 language spec and the implementations figure
> out how to interpret it then sure, enforce the warning for new code -- the
> cost/benefit analysis is straight forward. However, the case for patching
> existing mature code is another story.
I don't think we need to wait for the ink to dry on the C23 language
spec to understand that implicit fallthrough is an obvious defect of
the C language. While the kernel is a mature codebase, it's not
immune to bugs. And its maturity has yet to slow its rapid pace of
development.
--
Thanks,
~Nick Desaulniers
|