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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250730-nfsd-testing-v4-0-7f5730570a52@kernel.org>
Date: Wed, 30 Jul 2025 09:24:29 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Alexander Viro <viro@...iv.linux.org.uk>, 
 Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, 
 Steven Rostedt <rostedt@...dmis.org>, 
 Masami Hiramatsu <mhiramat@...nel.org>, 
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
 Chuck Lever <chuck.lever@...cle.com>, NeilBrown <neil@...wn.name>, 
 Olga Kornievskaia <okorniev@...hat.com>, Dai Ngo <Dai.Ngo@...cle.com>, 
 Tom Talpey <tom@...pey.com>
Cc: Trond Myklebust <trondmy@...merspace.com>, 
 Anna Schumaker <anna@...nel.org>, linux-fsdevel@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
 linux-nfs@...r.kernel.org, Jeff Layton <jlayton@...nel.org>
Subject: [PATCH v4 0/8] nfsd/vfs: fix handling of delegated timestamp
 updates

This patchset fixes the handling of delegated timestamps in nfsd. This
one also adopts Neil's suggestopn to use FMODE_NOCMTIME to freeze
timestamp updates while there is a WRITE_ATTRS delegation outstanding.

Most of these patches are identical to the last set. I dropped the patch
that removes inode_set_ctime_deleg(), and reworked the logic in
setattr_copy() and friends to accomodate.

The last patch in the series is new. That one adds FMODE_NOCMTIME to the
file while a WRITE_ATTRS delegation is in force, and adds a mechanism to
ensure that the timestamps gets updated appropriately if the client
never sends a SETATTR with updated timestamps in it. That should ensure
that the ctime never rolls backward.

This patchset also leaves inode_set_ctime_deleg() in place. That's
probably overengineered if we don't need to worry about ctime updates
from the client racing with ctime updates due to writes anymore, but we
can simplify it later if so.

The series passes the gitr testsuite in the "stress" configuration.

Signed-off-by: Jeff Layton <jlayton@...nel.org>
---
Changes in v4:
- Use FMODE_NOCMTIME to freeze timestamp updates on write
- drop patch that removes inode_set_ctime_deleg()
- rework logic in setattr_copy()
- Link to v3: https://lore.kernel.org/r/20250727-nfsd-testing-v3-0-8dc2aafb166d@kernel.org

Changes in v3:
- split out decoder fix into separate patch
- add Fixes: tags
- Link to v2: https://lore.kernel.org/r/20250726-nfsd-testing-v2-0-f45923db2fbb@kernel.org

Changes in v2:
- add ATTR_CTIME_SET and remove inode_set_ctime_deleg()
- track original timestamps in struct nfs4_delegation
- fix delegated timestamp updates to respect saved timestamps
- Link to v1: https://lore.kernel.org/r/20250722-nfsd-testing-v1-0-31321c7fc97f@kernel.org

---
Jeff Layton (8):
      nfsd: fix assignment of ia_ctime.tv_nsec on delegated mtime update
      nfsd: ignore ATTR_DELEG when checking ia_valid before notify_change()
      vfs: add ATTR_CTIME_SET flag
      nfsd: use ATTR_CTIME_SET for delegated ctime updates
      nfsd: track original timestamps in nfs4_delegation
      nfsd: fix SETATTR updates for delegated timestamps
      nfsd: fix timestamp updates in CB_GETATTR
      nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation

 fs/attr.c           | 44 ++++++++++++---------------
 fs/nfsd/nfs4proc.c  | 55 ++++++++++++++++++++++++++++++++--
 fs/nfsd/nfs4state.c | 86 ++++++++++++++++++++++++++++++++++++++++-------------
 fs/nfsd/nfs4xdr.c   |  5 ++--
 fs/nfsd/state.h     | 12 +++++++-
 fs/nfsd/vfs.c       |  2 +-
 include/linux/fs.h  |  1 +
 7 files changed, 153 insertions(+), 52 deletions(-)
---
base-commit: b05f077b59098b4760e3f675b00a4e6a1ad4b0ad
change-id: 20250722-nfsd-testing-5e861a3cf3a0

Best regards,
-- 
Jeff Layton <jlayton@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ