Skip to contentSkip to conversation

Patch "debugfs: Fix lockdown check for mmap_prepare" has been added to the 7.2-stable tree

PATCH [email protected] 1 participant 1 message Sep 3 Driver core

lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

debugfs: Fix lockdown check for mmap_prepare

to the 7.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
debugfs-fix-lockdown-check-for-mmap_prepare.patch
and it can be found in the queue-7.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From f81808de37338aac8e167f99bfae647b1b835c70 Mon Sep 17 00:00:00 2001
From: Chun-Yi Lee <[email protected]>
Date: Mon, 15 Jun 2026 18:47:50 +0800
Subject: debugfs: Fix lockdown check for mmap_prepare

From: Chun-Yi Lee <[email protected]>

commit f81808de37338aac8e167f99bfae647b1b835c70 upstream.

Commit 651fdda8406d ("relay: update relay to use mmap_prepare") changed the mmap file operation to mmap_prepare for relayfs, but the lockdown check in debugfs was not updated accordingly.

This prevents debugfs from being locked down when the kernel is in integrity mode if a file uses mmap_prepare but not mmap.

Since the conversion to mmap_prepare across the kernel is not yet complete, update the lockdown check to look for both mmap and mmap_prepare to ensure comprehensive coverage.

Fixes 651fdda8406d ("relay: update relay to use mmap_prepare")
Cc David Howells <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Matthew Garrett <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Danilo Krummrich <[email protected]>
---
 fs/debugfs/file.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/debugfs/file.c +2 -1
@@ -273,7 +273,8 @@ static int debugfs_locked_down(struct in
 	    (!real_fops ||
 	     (!real_fops->unlocked_ioctl &&
 	      !real_fops->compat_ioctl &&
-	      !real_fops->mmap)))
+	      !real_fops->mmap &&
+	      !real_fops->mmap_prepare)))
 		return 0;
 
 	if (security_locked_down(LOCKDOWN_DEBUGFS))

Patches currently in stable-queue which might be from [email protected] are

queue-7.2/debugfs-fix-lockdown-check-for-mmap_prepare.patch