From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfs: actually account for quota changes in xfs_swap_extents
Date: Wed, 6 May 2020 23:02:05 -0700 [thread overview]
Message-ID: <20200507060205.GA3523@infradead.org> (raw)
In-Reply-To: <20200506163424.GT5703@magnolia>
On Wed, May 06, 2020 at 09:34:24AM -0700, Darrick J. Wong wrote:
> On Wed, May 06, 2020 at 07:57:28AM -0700, Christoph Hellwig wrote:
> > On Mon, May 04, 2020 at 06:10:29PM -0700, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <darrick.wong@oracle.com>
> > >
> > > Currently, xfs_swap_extents neither checks for sufficient quota
> > > reservation nor does it actually update quota counts when swapping the
> > > extent forks. While the primary known user of extent swapping (xfs_fsr)
> > > is careful to ensure that the user/group/project ids of both files
> > > match, this is not required by the kernel. Consequently, unprivileged
> > > userspace can cause the quota counts to be incorrect.
> >
> > Wouldn't be the right fix to enforce an id match? I think that is a
> > very sensible limitation.
>
> One could do that, but at a cost of breaking any userspace program that
> was using XFS_IOC_SWAPEXT and was not aware that the ids had to match
> (possibly due to the lack of documentation...)
I don't really expect that to be the case. I'd throw in the check
and a printk_once warning, and I bet a beer at the next conference
(if there ever is one :)) that no one will trigger it.
next prev parent reply other threads:[~2020-05-07 6:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 1:10 [PATCH 0/3] xfs: random SWAPEXT fixes Darrick J. Wong
2020-05-05 1:10 ` [PATCH 1/3] xfs: clean up the error handling in xfs_swap_extents Darrick J. Wong
2020-05-06 14:46 ` Christoph Hellwig
2020-05-05 1:10 ` [PATCH 2/3] xfs: clean up the metadata validation in xfs_swap_extent_rmap Darrick J. Wong
2020-05-06 14:56 ` Christoph Hellwig
2020-05-06 16:45 ` Darrick J. Wong
2020-05-05 1:10 ` [PATCH 3/3] xfs: actually account for quota changes in xfs_swap_extents Darrick J. Wong
2020-05-06 14:57 ` Christoph Hellwig
2020-05-06 16:34 ` Darrick J. Wong
2020-05-07 6:02 ` Christoph Hellwig [this message]
2020-05-12 23:42 ` 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=20200507060205.GA3523@infradead.org \
--to=hch@infradead.org \
--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