All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] smb/client: fix emulated insert/collapse range issues
@ 2026-08-20  7:15 Huiwen He
  2026-08-20  7:15 ` [PATCH v2 1/6] smb/client: validate new EOF for insert range Huiwen He
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Huiwen He @ 2026-08-20  7:15 UTC (permalink / raw)
  To: smfrench, linkinjeon, pc, ronniesahlberg, sprasad, tom, bharathsm,
	senozhatsky, dhowells, chenxiaosong
  Cc: linux-cifs

From: Huiwen He <hehuiwen@kylinos.cn>

This series fixes the SMB3 FALLOC_FL_INSERT_RANGE and
FALLOC_FL_COLLAPSE_RANGE emulation.

Patch 1 validates the new EOF for insert range, which previously allowed
RLIMIT_FSIZE to be bypassed.

Patch 2 validates the new EOF for zero range when it extends the file.

Patch 3 marks the file sparse before emulating insert range so the
inserted range becomes a real hole, fixing xfstests generic/064 against
Samba and ksmbd.

Patch 4 fixes data corruption in emulated insert range by copying
overlapping ranges from EOF backwards.

Patch 5 fixes integer truncation when the collapse-range copy exceeds
INT_MAX bytes.

Patch 6 fixes stale page cache after the range emulation, where reads
returned zeroes instead of the shifted data.

Changes in v2:

- update patch3 to propagate SET_SPARSE fails.
- Add patch2 and patch4-6.
 
Link to v1:
https://lore.kernel.org/linux-cifs/20260813132136.366532-1-huiwen.he@linux.dev/

Thanks,
Huiwen

Huiwen He (6):
  smb/client: validate new EOF for insert range
  smb/client: validate new EOF for zero range
  smb/client: mark file sparse before emulating insert range
  smb/client: fix data corruption in emulated insert range
  smb/client: fix integer truncation in collapse range
  smb/client: fix stale page cache in insert/collapse range

 fs/smb/client/smb2ops.c | 202 +++++++++++++++++++++++++++++++++-------
 1 file changed, 168 insertions(+), 34 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-08-20  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20  7:15 [PATCH v2 0/6] smb/client: fix emulated insert/collapse range issues Huiwen He
2026-08-20  7:15 ` [PATCH v2 1/6] smb/client: validate new EOF for insert range Huiwen He
2026-08-20  7:15 ` [PATCH v2 2/6] smb/client: validate new EOF for zero range Huiwen He
2026-08-20  7:15 ` [PATCH v2 3/6] smb/client: mark file sparse before emulating insert range Huiwen He
2026-08-20  7:15 ` [PATCH v2 4/6] smb/client: fix data corruption in emulated " Huiwen He
2026-08-20  7:15 ` [PATCH v2 5/6] smb/client: fix integer truncation in collapse range Huiwen He
2026-08-20  7:15 ` [PATCH v2 6/6] smb/client: fix stale page cache in insert/collapse range Huiwen He

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.