lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <202011241324.B3439A2@keescook> Date: Tue, 24 Nov 2020 13:25:40 -0800 From: Kees Cook <keescook@...omium.org> To: Nick Desaulniers <ndesaulniers@...gle.com> Cc: Jakub Kicinski <kuba@...nel.org>, "Gustavo A. R. Silva" <gustavoars@...nel.org>, LKML <linux-kernel@...r.kernel.org>, alsa-devel@...a-project.org, amd-gfx list <amd-gfx@...ts.freedesktop.org>, bridge@...ts.linux-foundation.org, ceph-devel@...r.kernel.org, cluster-devel@...hat.com, coreteam@...filter.org, devel@...verdev.osuosl.org, dm-devel@...hat.com, drbd-dev@...ts.linbit.com, dri-devel <dri-devel@...ts.freedesktop.org>, GR-everest-linux-l2@...vell.com, GR-Linux-NIC-Dev@...vell.com, intel-gfx@...ts.freedesktop.org, intel-wired-lan@...ts.osuosl.org, keyrings@...r.kernel.org, linux1394-devel@...ts.sourceforge.net, linux-acpi@...r.kernel.org, linux-afs@...ts.infradead.org, Linux ARM <linux-arm-kernel@...ts.infradead.org>, linux-arm-msm <linux-arm-msm@...r.kernel.org>, linux-atm-general@...ts.sourceforge.net, linux-block@...r.kernel.org, linux-can@...r.kernel.org, linux-cifs@...r.kernel.org, "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" <linux-crypto@...r.kernel.org>, linux-decnet-user@...ts.sourceforge.net, linux-ext4@...r.kernel.org, linux-fbdev@...r.kernel.org, linux-geode@...ts.infradead.org, linux-gpio@...r.kernel.org, linux-hams@...r.kernel.org, linux-hwmon@...r.kernel.org, linux-i3c@...ts.infradead.org, linux-ide@...r.kernel.org, linux-iio@...r.kernel.org, linux-input@...r.kernel.org, linux-integrity@...r.kernel.org, linux-mediatek@...ts.infradead.org, linux-media@...r.kernel.org, linux-mmc@...r.kernel.org, Linux Memory Management List <linux-mm@...ck.org>, linux-mtd@...ts.infradead.org, linux-nfs@...r.kernel.org, linux-rdma@...r.kernel.org, Linux-Renesas <linux-renesas-soc@...r.kernel.org>, linux-scsi@...r.kernel.org, linux-sctp@...r.kernel.org, linux-security-module@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com, linux-usb@...r.kernel.org, linux-watchdog@...r.kernel.org, linux-wireless <linux-wireless@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, netfilter-devel@...r.kernel.org, nouveau@...ts.freedesktop.org, op-tee@...ts.trustedfirmware.org, oss-drivers@...ronome.com, patches@...nsource.cirrus.com, rds-devel@....oracle.com, reiserfs-devel@...r.kernel.org, samba-technical@...ts.samba.org, selinux@...r.kernel.org, target-devel@...r.kernel.org, tipc-discussion@...ts.sourceforge.net, usb-storage@...ts.one-eyed-alien.net, virtualization@...ts.linux-foundation.org, wcn36xx@...ts.infradead.org, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>, xen-devel@...ts.xenproject.org, linux-hardening@...r.kernel.org, Nathan Chancellor <natechancellor@...il.com>, Miguel Ojeda <ojeda@...nel.org>, Joe Perches <joe@...ches.com> Subject: Re: [PATCH 000/141] Fix fall-through warnings for Clang On Mon, Nov 23, 2020 at 05:32:51PM -0800, Nick Desaulniers wrote: > On Sun, Nov 22, 2020 at 8:17 AM Kees Cook <keescook@...omium.org> wrote: > > > > On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > > > If none of the 140 patches here fix a real bug, and there is no change > > > to machine code then it sounds to me like a W=2 kind of a warning. > > > > FWIW, this series has found at least one bug so far: > > https://lore.kernel.org/lkml/CAFCwf11izHF=g1mGry1fE5kvFFFrxzhPSM6qKAO8gxSp=Kr_CQ@mail.gmail.com/ > > So looks like the bulk of these are: > switch (x) { > case 0: > ++x; > default: > break; > } > > I have a patch that fixes those up for clang: > https://reviews.llvm.org/D91895 I still think this isn't right -- it's a case statement that runs off the end without an explicit flow control determination. I think Clang is right to warn for these, and GCC should also warn. -- Kees Cook
Powered by blists - more mailing lists