All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2 0/2] xfs: strengthen validation of extent size hints
@ 2021-05-24  1:01 Darrick J. Wong
  2021-05-24  1:01 ` [PATCH 1/2] xfs: standardize extent size hint validation Darrick J. Wong
  2021-05-24  1:01 ` [PATCH 2/2] xfs: validate extsz hints against rt extent size when rtinherit is set Darrick J. Wong
  0 siblings, 2 replies; 12+ messages in thread
From: Darrick J. Wong @ 2021-05-24  1:01 UTC (permalink / raw)
  To: djwong; +Cc: Christoph Hellwig, Brian Foster, linux-xfs, bfoster, hch

Hi all,

While playing around with realtime extent sizes and extent size hints, I
noticed that it was very possible for userspace to trip the inode
verifiers if they tried to set an extent size hint that wasn't aligned
to the rt extent size and then create realtime files.  This series
tightens the existing checks and refactors the ioctls to use the libxfs
validation functions like the verifiers, mkfs, and repair use.

For v2, we also detect invalid extent size hints on existing filesystems
and mitigate the problem by (a) not propagating the invalid hints to new
realtime files and (b) removing invalid hints when set on directories.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=extsize-fixes-5.13
---
 fs/xfs/libxfs/xfs_inode_buf.c   |   37 +++++++++++++-
 fs/xfs/libxfs/xfs_trans_inode.c |   15 ++++++
 fs/xfs/xfs_inode.c              |   29 +++++++++++
 fs/xfs/xfs_ioctl.c              |  101 +++++++++++++--------------------------
 4 files changed, 111 insertions(+), 71 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCHSET v2 0/2] xfs: strengthen validation of extent size hints
@ 2021-05-20 16:42 Darrick J. Wong
  0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2021-05-20 16:42 UTC (permalink / raw)
  To: djwong; +Cc: Brian Foster, linux-xfs, bfoster

Hi all,

While playing around with realtime extent sizes and extent size hints, I
noticed that it was very possible for userspace to trip the inode
verifiers if they tried to set an extent size hint that wasn't aligned
to the rt extent size and then create realtime files.  This series
tightens the existing checks and refactors the ioctls to use the libxfs
validation functions like the verifiers, mkfs, and repair use.

For v2, we also detect invalid extent size hints on existing filesystems
and mitigate the problem by (a) not propagating the invalid hints to new
realtime files and (b) removing invalid hints when set on directories.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=extsize-fixes-5.13
---
 fs/xfs/libxfs/xfs_inode_buf.c   |   39 +++++++++++++--
 fs/xfs/libxfs/xfs_trans_inode.c |   13 +++++
 fs/xfs/xfs_inode.c              |   46 +++++++++++++-----
 fs/xfs/xfs_ioctl.c              |  100 +++++++++++++--------------------------
 4 files changed, 113 insertions(+), 85 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-05-25 18:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24  1:01 [PATCHSET v2 0/2] xfs: strengthen validation of extent size hints Darrick J. Wong
2021-05-24  1:01 ` [PATCH 1/2] xfs: standardize extent size hint validation Darrick J. Wong
2021-05-24  1:01 ` [PATCH 2/2] xfs: validate extsz hints against rt extent size when rtinherit is set Darrick J. Wong
2021-05-24 10:42   ` Brian Foster
2021-05-24 17:23     ` Darrick J. Wong
2021-05-24 18:18       ` Darrick J. Wong
2021-05-24 18:21       ` Brian Foster
2021-05-24 21:26         ` Darrick J. Wong
2021-05-24 22:12           ` Darrick J. Wong
2021-05-25 11:53           ` Brian Foster
2021-05-25 18:13             ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2021-05-20 16:42 [PATCHSET v2 0/2] xfs: strengthen validation of extent size hints Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.