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]
Date:   Mon, 17 Apr 2023 00:01:49 +0530
From:   "Ritesh Harjani (IBM)" <ritesh.list@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>,
        Ojaswin Mujoo <ojaswin@...ux.ibm.com>,
        Disha Goel <disgoel@...ux.ibm.com>,
        "Ritesh Harjani (IBM)" <ritesh.list@...il.com>
Subject: [RFCv1 0/4] ext4: misc left over folio changes

Hello Matthew,

Could you please review this series. I found this during code review and
I think these can/should go in as well along with other folio changes queued up
for 6.4 (after some testing).

Also had a query w.r.t your change [1]. I couldn't understand this change diff
from [1]. Given if we are making the conversion to folio, then shouldn't we do
len = size - folio_pos(pos), instead of len = size & ~PAGE_MASK
Could you please tell if the current change in [1] is kept deliberately?
At other places you did make len as size - folio_pos(pos) which removes the
PAGE_SIZE assumption.

-static int mpage_submit_page(struct mpage_da_data *mpd, struct page *page)
+static int mpage_submit_folio(struct mpage_da_data *mpd, struct folio *folio)
 {
-	int len;
+	size_t len;

	<...>

	size = i_size_read(mpd->inode);
-	if (page->index == size >> PAGE_SHIFT &&
+	len = folio_size(folio);
+	if (folio_pos(folio) + len > size &&
 	    !ext4_verity_in_progress(mpd->inode))
 		len = size & ~PAGE_MASK;
-	else
-		len = PAGE_SIZE;
-	err = ext4_bio_write_page(&mpd->io_submit, page, len);
+	err = ext4_bio_write_page(&mpd->io_submit, &folio->page, len);
 	if (!err)
 		mpd->wbc->nr_to_write--;

[1]: https://lore.kernel.org/linux-ext4/20230324180129.1220691-7-willy@infradead.org/


Note: I haven't yet tested this series completely. I mainly first wanted to get
some initial inputs from Matthew on this one before I do any serious fstests
testing of the changes. If the changes are in the right direction, I shall
do some testing before sending next revision.


Ritesh Harjani (IBM) (4):
  ext4: kill unused function ext4_journalled_write_inline_data
  ext4: Change remaining tracepoints to use folio
  ext4: Make mpage_journal_page_buffers use folio
  ext4: Make ext4_write_inline_data_end() use folio

 fs/ext4/ext4.h              | 10 ++-----
 fs/ext4/inline.c            | 27 +-----------------
 fs/ext4/inode.c             | 57 +++++++++++++++++++------------------
 include/trace/events/ext4.h | 26 ++++++++---------
 4 files changed, 46 insertions(+), 74 deletions(-)

--
2.39.2

Powered by blists - more mailing lists