lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241115-vfs-untorn-writes-7229611aeacc@brauner>
Date: Fri, 15 Nov 2024 15:09:21 +0100
From: Christian Brauner <brauner@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Christian Brauner <brauner@...nel.org>,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [GIT PULL] vfs untorn writes

Hey Linus,

/* Summary */

An atomic write is a write issed with torn-write protection. This means
for a power failure or any hardware failure all or none of the data from
the write will be stored, never a mix of old and new data.

This work is already supported for block devices. If a block device is
opened with O_DIRECT and the block device supports atomic write, then
FMODE_CAN_ATOMIC_WRITE is added to the file of the opened block device.

This pull request contains the work to expand atomic write support to
filesystems, specifically ext4 and XFS. Currently, only support for
writing exactly one filesystem block atomically is added.

Since it's now possible to have filesystem block size > page size for
XFS, it's possible to write 4K+ blocks atomically on x86.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

All patches are based on v6.12-rc1 and have been sitting in linux-next.
No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

No known conflicts.

The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:

  Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)

are available in the Git repository at:

  git@...olite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.untorn.writes

for you to fetch changes up to 54079430c5dbf041363ab39a0c254cd9e4f6aed5:

  iomap: drop an obsolete comment in iomap_dio_bio_iter (2024-11-11 14:35:06 +0100)

Please consider pulling these changes from the signed vfs-6.13.untorn.writes tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.13.untorn.writes

----------------------------------------------------------------
Christian Brauner (1):
      Merge tag 'fs-atomic_2024-11-05' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into vfs.untorn.writes

Christoph Hellwig (1):
      iomap: drop an obsolete comment in iomap_dio_bio_iter

John Garry (8):
      block/fs: Pass an iocb to generic_atomic_write_valid()
      fs/block: Check for IOCB_DIRECT in generic_atomic_write_valid()
      block: Add bdev atomic write limits helpers
      fs: Export generic_atomic_write_valid()
      fs: iomap: Atomic write support
      xfs: Support atomic write for statx
      xfs: Validate atomic writes
      xfs: Support setting FMODE_CAN_ATOMIC_WRITE

Ritesh Harjani (IBM) (4):
      ext4: Add statx support for atomic writes
      ext4: Check for atomic writes support in write iter
      ext4: Support setting FMODE_CAN_ATOMIC_WRITE
      ext4: Do not fallback to buffered-io for DIO atomic write

 Documentation/filesystems/iomap/operations.rst | 15 +++++++++
 block/fops.c                                   | 22 +++++++------
 fs/ext4/ext4.h                                 | 10 ++++++
 fs/ext4/file.c                                 | 24 ++++++++++++++
 fs/ext4/inode.c                                | 39 ++++++++++++++++++++---
 fs/ext4/super.c                                | 31 +++++++++++++++++++
 fs/iomap/direct-io.c                           | 43 ++++++++++++++++++++------
 fs/iomap/trace.h                               |  3 +-
 fs/read_write.c                                | 16 ++++++----
 fs/xfs/xfs_buf.c                               |  7 +++++
 fs/xfs/xfs_buf.h                               |  4 +++
 fs/xfs/xfs_file.c                              | 16 ++++++++++
 fs/xfs/xfs_inode.h                             | 15 +++++++++
 fs/xfs/xfs_iops.c                              | 22 +++++++++++++
 include/linux/blkdev.h                         | 16 ++++++++++
 include/linux/fs.h                             |  2 +-
 include/linux/iomap.h                          |  1 +
 17 files changed, 254 insertions(+), 32 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ