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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181126222257.GB55960@jaegeuk-macbookpro.roam.corp.google.com>
Date:   Mon, 26 Nov 2018 14:22:57 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Kees Cook <keescook@...gle.com>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: Re: linux-next: build warning after merge of the f2fs tree

On 11/27, Stephen Rothwell wrote:
> Hi Jaegeuk,
> 
> On Mon, 26 Nov 2018 13:59:24 -0800 Jaegeuk Kim <jaegeuk@...nel.org> wrote:
> >
> > On 11/26, Stephen Rothwell wrote:
> > > 
> > > After merging the f2fs tree, today's linux-next build
> > > (x86_64_allmodconfig) produced this warning:
> > > 
> > > In file included from fs/f2fs/dir.c:11:
> > > fs/f2fs/f2fs.h: In function '__mark_inode_dirty_flag':
> > > fs/f2fs/f2fs.h:2388:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> > >    if (set)
> > >       ^
> > > fs/f2fs/f2fs.h:2390:2: note: here
> > >   case FI_DATA_EXIST:
> > >   ^~~~
> > > 
> > > Exposed by my use of -Wimplicit-fallthrough
> > > 
> > > I am not sure why this has turned up now (as opposed to earlier today).  
> > 
> > The above change had been there for a long time, as an intended behavior.
> 
> Yeah, it popped up due to line number changes in that file and the way
> I was filtering new warnings.
> 
> > Hmm, I'm not sure how to avoid this.
> 
> if you add a comment
> 	/* fall through */
> at the point the fall through occurs, then the warning is suppressed
> (and it documents that it is deliberate).

Oh, thanks~
Is this okay?

>From 79e24f1509e5b6a07069be9cc8163969da78c57a Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@...nel.org>
Date: Mon, 26 Nov 2018 14:20:32 -0800
Subject: [PATCH] f2fs: avoid build warn of fall_through

After merging the f2fs tree, today's linux-next build
 (x86_64_allmodconfig) produced this warning:

 In file included from fs/f2fs/dir.c:11:
 fs/f2fs/f2fs.h: In function '__mark_inode_dirty_flag':
 fs/f2fs/f2fs.h:2388:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (set)
       ^
 fs/f2fs/f2fs.h:2390:2: note: here
   case FI_DATA_EXIST:
   ^~~~

 Exposed by my use of -Wimplicit-fallthrough

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
---
 fs/f2fs/f2fs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 26ad1de8641c..b3fe6803d4c6 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2387,6 +2387,7 @@ static inline void __mark_inode_dirty_flag(struct inode *inode,
 	case FI_NEW_INODE:
 		if (set)
 			return;
+		/* fall through */
 	case FI_DATA_EXIST:
 	case FI_INLINE_DOTS:
 	case FI_PIN_FILE:
-- 
2.19.0.605.g01d371f741-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ