+ compat-mark-expected-switch-fall-throughs.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: include/linux/compat.h: mark expected switch fall-throughs
has been added to the -mm tree.  Its filename is
     compat-mark-expected-switch-fall-throughs.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/compat-mark-expected-switch-fall-throughs.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/compat-mark-expected-switch-fall-throughs.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Gustavo A. R. Silva" <gustavo@xxxxxxxxxxxxxx>
Subject: include/linux/compat.h: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Link: http://lkml.kernel.org/r/20181013115048.GA3262@xxxxxxxxxxxxxx
Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/compat.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/include/linux/compat.h~compat-mark-expected-switch-fall-throughs
+++ a/include/linux/compat.h
@@ -492,8 +492,11 @@ put_compat_sigset(compat_sigset_t __user
 	compat_sigset_t v;
 	switch (_NSIG_WORDS) {
 	case 4: v.sig[7] = (set->sig[3] >> 32); v.sig[6] = set->sig[3];
+		/* fall through */
 	case 3: v.sig[5] = (set->sig[2] >> 32); v.sig[4] = set->sig[2];
+		/* fall through */
 	case 2: v.sig[3] = (set->sig[1] >> 32); v.sig[2] = set->sig[1];
+		/* fall through */
 	case 1: v.sig[1] = (set->sig[0] >> 32); v.sig[0] = set->sig[0];
 	}
 	return copy_to_user(compat, &v, size) ? -EFAULT : 0;
_

Patches currently in -mm which might be from gustavo@xxxxxxxxxxxxxx are

zsmalloc-fix-fall-through-annotation.patch
compat-mark-expected-switch-fall-throughs.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux