LKML Archive on lore.kernel.org
 help / color / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: [GIT PULL] Wimplicit-fallthrough patches for 5.2-rc1
Date: Mon, 6 May 2019 13:05:21 -0500
Message-ID: <20190506180521.GA30749@embeddedor> (raw)

The following changes since commit 17403fa277eda1328a7026dfca7e40249f27dc6b:

  Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2019-03-24 13:41:37 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git tags/Wimplicit-fallthrough-5.2-rc1

for you to fetch changes up to ccaa75187a5f1d8131b424160eb90a8a94be287f:

  memstick: mark expected switch fall-throughs (2019-04-23 10:29:58 -0500)

----------------------------------------------------------------
Wimplicit-fallthrough patches for 5.2-rc1

Hi Linus,

This is my very first pull-request.  I've been working full-time as
a kernel developer for more than two years now. During this time I've
been fixing bugs reported by Coverity all over the tree and, as part
of my work, I'm also contributing to the KSPP. My work in the kernel
community has been supervised by Greg KH and Kees Cook.

OK. So, after the quick introduction above, please, pull the following
patches that mark switch cases where we are expecting to fall through.
These patches are part of the ongoing efforts to enable -Wimplicit-fallthrough.
They have been ignored for a long time (most of them more than 3 months,
even after pinging multiple times), which is the reason why I've created
this tree. Most of them have been baking in linux-next for a whole development
cycle. And with Stephen Rothwell's help, we've had linux-next nag-emails
going out for newly introduced code that triggers -Wimplicit-fallthrough
to avoid gaining more of these cases while we work to remove the ones
that are already present.

I'm happy to let you know that we are getting close to completing this
work.  Currently, there are only 32 of 2311 of these cases left to be
addressed in linux-next.  I'm auditing every case; I take a look into
the code and analyze it in order to determine if I'm dealing with an
actual bug or a false positive, as explained here:

https://lore.kernel.org/lkml/c2fad584-1705-a5f2-d63c-824e9b96cf50@embeddedor.com/

While working on this, I've found and fixed the following missing
break/return bugs, some of them introduced more than 5 years ago:

84242b82d81c54e009a2aaa74d3d9eff70babf56
7850b51b6c21812be96d0200b74cff1f40587d98
5e420fe635813e5746b296cfc8fff4853ae205a2
09186e503486da4a17f16f2f7c679e6e3e2a32f4
b5be853181a8d4a6e20f2073ccd273d6280cad88
7264235ee74f51d26fbdf97bf98c6102a460484f
cc5034a5d293dd620484d1d836aa16c6764a1c8c
479826cc86118e0d87e5cefb3df5b748e0480924
5340f23df8fe27a270af3fa1a93cd07293d23dd9
df997abeebadaa4824271009e2d2b526a70a11cb
2f10d823739680d2477ce34437e8a08a53117f40
307b00c5e695857ca92fc6a4b8ab6c48f988a1b1
5d25ff7a544889bc4b749fda31778d6a18dddbcb
a7ed5b3e7dca197de4da6273940a7ca6d1d756a1
c24bfa8f21b59283580043dada19a6e943b6e426
ad0eaee6195db1db1749dd46b9e6f4466793d178
9ba8376ce1e2cbf4ce44f7e4bee1d0648e10d594
dc586a60a11d0260308db1bebe788ad8973e2729
a8e9b186f153a44690ad0363a56716e7077ad28c
4e57562b4846e42cd1c2e556f0ece18c1154e116
60747828eac28836b49bed214399b0c972f19df3
c5b974bee9d2ceae4c441ae5a01e498c2674e100
cc44ba91166beb78f9cb29d5e3d41c0a2d0a7329
2c930e3d0aed1505e86e0928d323df5027817740

Once this work is finish, we'll be able to universally enable
"-Wimplicit-fallthrough" to avoid any of these kinds of bugs from
entering the kernel again.

Thanks

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

----------------------------------------------------------------
Gustavo A. R. Silva (27):
      fs: mark expected switch fall-throughs
      afs: Mark expected switch fall-throughs
      adfs: mark expected switch fall-throughs
      scsi: aic7xxx: mark expected switch fall-throughs
      scsi: be2iscsi: be_iscsi: Mark expected switch fall-through
      scsi: be2iscsi: be_main: Mark expected switch fall-through
      scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs
      scsi: csiostor: csio_wr: mark expected switch fall-through
      scsi: imm: mark expected switch fall-throughs
      scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs
      scsi: lpfc: lpfc_els: Mark expected switch fall-throughs
      scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs
      scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through
      scsi: lpfc: lpfc_nvme: Mark expected switch fall-through
      scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs
      scsi: osst: mark expected switch fall-throughs
      scsi: ppa: mark expected switch fall-through
      scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs
      scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through
      lib: zstd: Mark expected switch fall-throughs
      lib/cmdline.c: mark expected switch fall-throughs
      ASN.1: mark expected switch fall-through
      block: Mark expected switch fall-throughs
      NFC: pn533: mark expected switch fall-throughs
      NFC: st21nfca: Fix fall-through warnings
      drm/nouveau/nvkm: mark expected switch fall-throughs
      memstick: mark expected switch fall-throughs

 drivers/block/drbd/drbd_int.h                      |  2 +-
 drivers/block/drbd/drbd_receiver.c                 |  4 +--
 drivers/block/drbd/drbd_req.c                      |  2 +-
 drivers/block/rsxx/core.c                          |  1 +
 drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c    | 17 +++++++++++
 drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c |  1 +
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c    |  2 ++
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c    |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c    |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c     |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c     |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c    |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c   |  2 ++
 drivers/gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c     |  1 +
 drivers/memstick/host/jmb38x_ms.c                  |  2 ++
 drivers/memstick/host/tifm_ms.c                    |  2 ++
 drivers/nfc/pn533/pn533.c                          |  2 ++
 drivers/nfc/st21nfca/dep.c                         |  2 ++
 drivers/scsi/aic7xxx/aic7xxx_core.c                | 12 ++++++--
 drivers/scsi/be2iscsi/be_iscsi.c                   |  1 +
 drivers/scsi/be2iscsi/be_main.c                    |  1 +
 drivers/scsi/bfa/bfa_fcpim.c                       |  6 ++--
 drivers/scsi/csiostor/csio_wr.c                    |  1 +
 drivers/scsi/imm.c                                 | 33 +++++++++++-----------
 drivers/scsi/lpfc/lpfc_ct.c                        |  2 ++
 drivers/scsi/lpfc/lpfc_els.c                       |  1 +
 drivers/scsi/lpfc/lpfc_hbadisc.c                   |  4 ++-
 drivers/scsi/lpfc/lpfc_nportdisc.c                 |  1 +
 drivers/scsi/lpfc/lpfc_nvme.c                      |  1 +
 drivers/scsi/lpfc/lpfc_scsi.c                      |  8 +++---
 drivers/scsi/osst.c                                |  6 ++++
 drivers/scsi/ppa.c                                 |  1 +
 drivers/scsi/sym53c8xx_2/sym_hipd.c                |  2 ++
 drivers/scsi/sym53c8xx_2/sym_nvram.c               |  1 +
 fs/adfs/dir_f.c                                    |  6 ++++
 fs/affs/super.c                                    |  3 +-
 fs/afs/cmservice.c                                 |  8 ++++++
 fs/afs/file.c                                      |  2 ++
 fs/afs/flock.c                                     |  1 +
 fs/afs/fsclient.c                                  | 31 ++++++++++++--------
 fs/afs/misc.c                                      |  9 ++++++
 fs/afs/rxrpc.c                                     |  1 +
 fs/afs/vlclient.c                                  | 18 +++++++-----
 fs/afs/yfsclient.c                                 | 30 +++++++++++++-------
 fs/btrfs/ref-verify.c                              |  1 +
 fs/btrfs/volumes.h                                 |  1 +
 fs/ceph/file.c                                     |  1 +
 fs/configfs/dir.c                                  |  2 ++
 fs/f2fs/node.c                                     |  2 ++
 fs/fcntl.c                                         |  2 +-
 fs/gfs2/bmap.c                                     |  4 +--
 fs/jffs2/fs.c                                      |  1 +
 fs/libfs.c                                         |  2 ++
 fs/locks.c                                         |  2 +-
 fs/nfsd/nfs4proc.c                                 |  1 +
 fs/nfsd/nfs4state.c                                |  1 +
 fs/ocfs2/cluster/quorum.c                          |  1 +
 fs/seq_file.c                                      |  1 +
 fs/signalfd.c                                      |  1 +
 fs/ufs/util.h                                      |  4 +--
 lib/asn1_decoder.c                                 |  4 +++
 lib/cmdline.c                                      |  5 ++++
 lib/zstd/bitstream.h                               |  5 ++++
 lib/zstd/compress.c                                |  1 +
 lib/zstd/decompress.c                              |  5 +++-
 lib/zstd/huf_compress.c                            |  2 ++
 66 files changed, 216 insertions(+), 68 deletions(-)

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 18:05 Gustavo A. R. Silva [this message]
2019-05-07 19:55 ` pr-tracker-bot

Reply instructions:

You may reply publically 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=20190506180521.GA30749@embeddedor \
    --to=gustavo@embeddedor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox