linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/1] ext4: Fix stale data exposure caused with dioread_nolock
@ 2023-09-18 10:45 Ojaswin Mujoo
  2023-09-18 10:45 ` [PATCH v3 1/1] ext4: Mark buffer new if it is unwritten to avoid stale data exposure Ojaswin Mujoo
  2023-10-06 18:06 ` [PATCH v3 0/1] ext4: Fix stale data exposure caused with dioread_nolock Theodore Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Ojaswin Mujoo @ 2023-09-18 10:45 UTC (permalink / raw)
  To: linux-ext4, Theodore Ts'o; +Cc: Ritesh Harjani, linux-kernel, Jan Kara

** Changes in v3 ** 

- Removed accidental "---" separator in commit message.
- Picked up Jan's Reviewed by.
- v2:
  https://lore.kernel.org/linux-ext4/cover.1694860198.git.ojaswin@linux.ibm.com/

** Changes in v2 ** 

- Moved the logic to mark buffer as new in ext4_get_block_unwritten, as
  it is actually specific to this function, rather than _ext4_get_block
  which is a more generic function called from codepaths that dont need
  this logic

- Tested with -g rw,quick as well as custom replication test (present in
  commit message). No issues with ps == bs as well as sub page size
  scenarios.

- TODO: Add logic in ext4_block_zero_page_range() to ignore zeroing if
  the buffer is unwritten. This needs some review of the involved code paths 
  hence sending the fix to stale data first right now and will get to
  this in a new patch.

- v1:
  https://lore.kernel.org/linux-ext4/cover.1693909504.git.ojaswin@linux.ibm.com/

** Original Cover **

The detailed report on the issues faced and the root cause can be found
in the commit message. I've intentionally added all the details to
commit message so that it can be tracked in the future, let me know if
its too long and I can try stripping some info.

For this particular fix, I've tested these patches with xfstests -g
quick with:

- 64k block size, 64k pagesize 
- 4k blocksize 64k pagesize
- both with and without nodelalloc 

and I don't see any regressions. I'll plan to run more tests on this and
report back if I notice anything. Suggestions or ideas are welcome.

Regards,
ojaswin


Ojaswin Mujoo (1):
  ext4: Mark buffer new if it is unwritten to avoid stale data exposure

 fs/ext4/inode.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

-- 
2.39.3


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

end of thread, other threads:[~2023-10-06 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18 10:45 [PATCH v3 0/1] ext4: Fix stale data exposure caused with dioread_nolock Ojaswin Mujoo
2023-09-18 10:45 ` [PATCH v3 1/1] ext4: Mark buffer new if it is unwritten to avoid stale data exposure Ojaswin Mujoo
2023-09-19  8:16   ` Ritesh Harjani
2023-10-06 18:06 ` [PATCH v3 0/1] ext4: Fix stale data exposure caused with dioread_nolock Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).