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: <20250811-vboxsf_folio-v1-1-fe31a8b37115@columbia.edu>
Date: Mon, 11 Aug 2025 17:42:00 -0400
From: Tal Zussman <tz2294@...umbia.edu>
To: Hans de Goede <hansg@...nel.org>
Cc: Matthew Wilcox <willy@...radead.org>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, Tal Zussman <tz2294@...umbia.edu>
Subject: [PATCH] vboxsf: Convert vboxsf_write_end() to use
 kmap_local_folio()

Now that vboxsf_write_end() takes a folio, convert the kmap() call to
kmap_local_folio(). This removes two instances of &folio->page as
well.

Compile-tested only.

Signed-off-by: Tal Zussman <tz2294@...umbia.edu>
---
 fs/vboxsf/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/vboxsf/file.c b/fs/vboxsf/file.c
index 4bebd947314a..178fc74e399f 100644
--- a/fs/vboxsf/file.c
+++ b/fs/vboxsf/file.c
@@ -316,10 +316,10 @@ static int vboxsf_write_end(const struct kiocb *iocb,
 	if (!folio_test_uptodate(folio) && copied < len)
 		folio_zero_range(folio, from + copied, len - copied);
 
-	buf = kmap(&folio->page);
+	buf = kmap_local_folio(folio, 0);
 	err = vboxsf_write(sf_handle->root, sf_handle->handle,
 			   pos, &nwritten, buf + from);
-	kunmap(&folio->page);
+	kunmap_local(buf);
 
 	if (err) {
 		nwritten = 0;

---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250811-vboxsf_folio-343a7cd9e9b2

Best regards,
-- 
Tal Zussman <tz2294@...umbia.edu>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ