public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [bug report] xfs: introduce v5 inode group structure
Date: Wed, 24 Jul 2019 11:11:43 +0300	[thread overview]
Message-ID: <20190724081143.GA30722@mwanda> (raw)

Hello Darrick J. Wong,

The patch 5f19c7fc6873: "xfs: introduce v5 inode group structure"
from Jul 3, 2019, leads to the following static checker warning:

	fs/xfs/xfs_ioctl.c:738 xfs_fsinumbers_fmt()
	warn: check that 'ig1' doesn't leak information (struct has a hole after 'xi_alloccount')

fs/xfs/xfs_ioctl.c
   730  int
   731  xfs_fsinumbers_fmt(
   732          struct xfs_ibulk                *breq,
   733          const struct xfs_inumbers       *igrp)
   734  {
   735          struct xfs_inogrp               ig1;
   736  
   737          xfs_inumbers_to_inogrp(&ig1, igrp);

The xfs_inumbers_to_inogrp() call doesn't clear the struct hole.

   738          if (copy_to_user(breq->ubuffer, &ig1, sizeof(struct xfs_inogrp)))
   739                  return -EFAULT;
   740          return xfs_ibulk_advance(breq, sizeof(struct xfs_inogrp));
   741  }

regards,
dan carpenter

             reply	other threads:[~2019-07-24  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  8:11 Dan Carpenter [this message]
2019-07-24 15:19 ` [bug report] xfs: introduce v5 inode group structure Darrick J. Wong

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=20190724081143.GA30722@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.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
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