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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176169810980.1424854.10557015500766654898.stgit@frogsfrogsfrogs>
Date: Tue, 28 Oct 2025 17:52:31 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: djwong@...nel.org, miklos@...redi.hu
Cc: joannelkoong@...il.com, bernd@...ernd.com, neal@...pa.dev,
 linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH 29/31] fuse: disable direct reclaim for any fuse server that
 uses iomap

From: Darrick J. Wong <djwong@...nel.org>

Any fuse server that uses iomap can create a substantial amount of dirty
pages in the pagecache because we don't write dirty stuff until reclaim
or fsync.  Therefore, memory reclaim on any fuse iomap server musn't
ever recurse back into the same filesystem.  We must also never throttle
the fuse server writes to a bdi because that will just slow down
metadata operations.

Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 fs/fuse/file_iomap.c |    6 ++++++
 1 file changed, 6 insertions(+)


diff --git a/fs/fuse/file_iomap.c b/fs/fuse/file_iomap.c
index f4cb9dcde445ef..9dab06c05eee28 100644
--- a/fs/fuse/file_iomap.c
+++ b/fs/fuse/file_iomap.c
@@ -1016,6 +1016,12 @@ static void fuse_iomap_config_reply(struct fuse_mount *fm,
 	fc->iomap_conn.no_end = 0;
 	fc->iomap_conn.no_ioend = 0;
 
+	/*
+	 * We could be on the hook for a substantial amount of writeback, so
+	 * prohibit reclaim from recursing into fuse or the kernel from
+	 * throttling any bdis that the fuse server might write to.
+	 */
+	current->flags |= PF_MEMALLOC_NOFS | PF_LOCAL_THROTTLE;
 done:
 	kfree(ia);
 	fuse_finish_init(fc, ok);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ