linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/7] xfs_repair: fix integer handling issues
Date: Tue, 29 May 2018 07:52:52 -0700	[thread overview]
Message-ID: <20180529145252.GA30110@magnolia> (raw)
In-Reply-To: <20180528135608.lkysdibdrzhewlom@odin.usersys.redhat.com>

On Mon, May 28, 2018 at 03:56:08PM +0200, Carlos Maiolino wrote:
> On Fri, May 25, 2018 at 03:11:43PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > When we shift sb_logblocks to the right we need to ensure that we have
> Unless I'm missing something, it should be "to the left"?

Oops, yes, s/right/left/.

--D

> Otherwise:
> 
> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> 
> > enough storage space to shift correctly.  Cast logblocks to a 64-bit
> > type so that we don't screw up the check.
> 
> > 
> > Coverity-id: 1435810
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  repair/sb.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > 
> > diff --git a/repair/sb.c b/repair/sb.c
> > index ef44e39c..543200f7 100644
> > --- a/repair/sb.c
> > +++ b/repair/sb.c
> > @@ -313,7 +313,8 @@ verify_sb_loginfo(
> >  	if (xfs_sb_version_hascrc(sb) &&
> >  	    (sb->sb_logblocks == 0 ||
> >  	     sb->sb_logblocks > XFS_MAX_LOG_BLOCKS ||
> > -	     (sb->sb_logblocks << sb->sb_blocklog) > XFS_MAX_LOG_BYTES))
> > +	     ((unsigned long long)sb->sb_logblocks << sb->sb_blocklog) >
> > +	     XFS_MAX_LOG_BYTES))
> >  		return false;
> >  
> >  	if (sb->sb_logsunit > 1 && sb->sb_logsunit % sb->sb_blocksize)
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> -- 
> Carlos
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-05-29 14:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 22:11 [PATCH 0/7] xfsprogs-4.17: last of the fixes Darrick J. Wong
2018-05-25 22:11 ` [PATCH 1/7] xfs_repair: fix integer handling issues Darrick J. Wong
2018-05-28  3:52   ` Allison Henderson
2018-05-28 13:56   ` Carlos Maiolino
2018-05-29 14:52     ` Darrick J. Wong [this message]
2018-05-29 15:15   ` [PATCH v2 " Darrick J. Wong
2018-05-25 22:11 ` [PATCH 2/7] xfs_buflock: ignore if buffer already locked Darrick J. Wong
2018-05-28  3:52   ` Allison Henderson
2018-05-25 22:11 ` [PATCH 3/7] xfs_buflock: record line number of trace where we locked the buffer Darrick J. Wong
2018-05-28  3:52   ` Allison Henderson
2018-05-25 22:12 ` [PATCH 4/7] xfs_buflock: record buffer initialization Darrick J. Wong
2018-05-28  3:52   ` Allison Henderson
2018-05-25 22:12 ` [PATCH 5/7] fsck: fix more bashisms Darrick J. Wong
2018-05-28  3:52   ` Allison Henderson
2018-05-28 14:02   ` Carlos Maiolino
2018-05-25 22:12 ` [PATCH 6/7] xfs_scrub: actually check for errors coming from close() Darrick J. Wong
2018-05-28  3:52   ` Allison Henderson
2018-05-28 14:06   ` Carlos Maiolino
2018-05-25 22:12 ` [PATCH 7/7] libxfs: remove crc32 functions Darrick J. Wong
2018-05-28  3:53   ` Allison Henderson
2018-05-28 14:11     ` Carlos Maiolino
2018-05-29 14:56       ` Darrick J. Wong
2018-05-29 21:46         ` Eric Sandeen
2018-07-23 22:55   ` Eric Sandeen
2018-07-24 19:48     ` Darrick J. Wong
2018-05-29 19:10 ` [PATCH 0/7] xfsprogs-4.17: last of the fixes Eric Sandeen

Reply instructions:

You may reply publicly 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=20180529145252.GA30110@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).