public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/2] xfsprogs: strengthen validation of extent size hints
@ 2021-07-03  2:57 Darrick J. Wong
  2021-07-03  2:57 ` [PATCH 1/2] xfs_repair: validate alignment of inherited rt extent hints Darrick J. Wong
  2021-07-03  2:57 ` [PATCH 2/2] mkfs: validate rt extent size hint when rtinherit is set Darrick J. Wong
  0 siblings, 2 replies; 11+ messages in thread
From: Darrick J. Wong @ 2021-07-03  2:57 UTC (permalink / raw)
  To: sandeen, djwong; +Cc: 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

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=extsize-fixes
---
 mkfs/xfs_mkfs.c |    7 ++++---
 repair/dinode.c |   28 +++++++++++++++++++++++++++-
 2 files changed, 31 insertions(+), 4 deletions(-)


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCHSET v3 0/2] xfsprogs: strengthen validation of extent size hints
@ 2021-07-28 21:15 Darrick J. Wong
  2021-07-28 21:15 ` [PATCH 1/2] xfs_repair: validate alignment of inherited rt extent hints Darrick J. Wong
  0 siblings, 1 reply; 11+ messages in thread
From: Darrick J. Wong @ 2021-07-28 21:15 UTC (permalink / raw)
  To: sandeen, djwong
  Cc: Carlos Maiolino, Christoph Hellwig, 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.

v3: move the extsize validation code into a single function

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

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=extsize-fixes
---
 mkfs/xfs_mkfs.c |    7 +++--
 repair/dinode.c |   71 ++++++++++++++++++++++++++++++++++++++++---------------
 2 files changed, 55 insertions(+), 23 deletions(-)


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

end of thread, other threads:[~2021-07-28 22:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-03  2:57 [PATCHSET 0/2] xfsprogs: strengthen validation of extent size hints Darrick J. Wong
2021-07-03  2:57 ` [PATCH 1/2] xfs_repair: validate alignment of inherited rt extent hints Darrick J. Wong
2021-07-04  8:51   ` Christoph Hellwig
2021-07-08  7:11     ` Carlos Maiolino
2021-07-08 22:31       ` Darrick J. Wong
2021-07-09  7:41         ` Carlos Maiolino
2021-07-03  2:57 ` [PATCH 2/2] mkfs: validate rt extent size hint when rtinherit is set Darrick J. Wong
2021-07-04  8:54   ` Christoph Hellwig
2021-07-08  7:19   ` Carlos Maiolino
  -- strict thread matches above, loose matches on Subject: below --
2021-07-28 21:15 [PATCHSET v3 0/2] xfsprogs: strengthen validation of extent size hints Darrick J. Wong
2021-07-28 21:15 ` [PATCH 1/2] xfs_repair: validate alignment of inherited rt extent hints Darrick J. Wong
2021-07-28 22:11   ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox