mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Chun-Yi Lee <jlee@suse.com>,
	David Howells <dhowells@redhat.com>,
	Lorenzo Stoakes <ljs@kernel.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Danilo Krummrich <dakr@kernel.org>,
	driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
	Disha Goel <disgoel@linux.ibm.com>
Subject: [PATCH 7.2 095/713] debugfs: Fix lockdown check for mmap_prepare
Date: Fri,  4 Sep 2026 06:51:03 +0200	[thread overview]
Message-ID: <20260904045805.968087505@linuxfoundation.org> (raw)
In-Reply-To: <20260904045803.810145556@linuxfoundation.org>

7.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Chun-Yi Lee <jlee@suse.com>

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")
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: driver-core@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>
Link: https://patch.msgid.link/20260615104750.1000-1-jlee@suse.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/debugfs/file.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -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))



  reply	other threads:[~2026-09-04  5:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  4:49 [PATCH 7.2 000/713] 7.2.4-rc1 review Greg Kroah-Hartman
2026-09-04  4:51 ` Greg Kroah-Hartman [this message]
2026-09-04  8:48 ` Takeshi Ogasawara
2026-09-04  9:31 ` Ronald Warsow
2026-09-04 12:52 ` Brett A C Sheffield
2026-09-04 16:08 ` Markus Reichelt
2026-09-04 21:08 ` Shuah Khan
2026-09-05 11:45 ` Miguel Ojeda
2026-09-05 13:00 ` Barry K. Nathan
2026-09-05 18:07 ` Peter Schneider
2026-09-05 18:33 ` Ron Economos
2026-09-05 20:27 ` Benjamin Boortz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260904045805.968087505@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=disgoel@linux.ibm.com \
    --cc=driver-core@lists.linux.dev \
    --cc=jlee@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=patches@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®