Linux driver-core infrastructure
 help / color / mirror / Atom feed
From: joeyli <jlee@suse.com>
To: Disha Goel <disgoel@linux.ibm.com>
Cc: Chun-Yi Lee <joeyli.kernel@gmail.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	David Howells <dhowells@redhat.com>,
	Lorenzo Stoakes <ljs@kernel.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Danilo Krummrich <dakr@kernel.org>,
	driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] debugfs: Fix lockdown check for mmap_prepare
Date: Tue, 23 Jun 2026 14:11:30 +0800	[thread overview]
Message-ID: <20260623061130.GA11413@linux-l9pv.suse> (raw)
In-Reply-To: <30561ae5-1e6a-4cc2-99e2-436c88b2f11d@linux.ibm.com>

Hi Disha,

On Fri, Jun 19, 2026 at 04:41:57PM +0530, Disha Goel wrote:
> On 15/06/26 4:17 pm, Chun-Yi Lee wrote:
> > From: Chun-Yi Lee <jlee@suse.com>
> > 
> > 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
> > ---
> 
> Hi,
> 
> I tested this patch on ppc64le with lockdown enabled. It correctly fixes the
> security issue where debugfs files using mmap_prepare were not being
> restricted.
> 
> Test: blktrace/001 from blktests (uses relayfs via debugfs)
> - Before patch: blktrace bypassed lockdown and accessed debugfs
> - After patch: blktrace properly blocked from accessing debugfs
> 
> Environment:
> Kernel: 7.1.0-rc7
> Lockdown: integrity mode
> 
> Feel free to add:
> Tested-by: Disha Goel <disgoel@linux.ibm.com>
> 

Thanks for your testing!

Joey Lee

      reply	other threads:[~2026-06-23  6:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15 10:47 [PATCH v2] debugfs: Fix lockdown check for mmap_prepare Chun-Yi Lee
2026-06-15 11:18 ` Lorenzo Stoakes
2026-06-15 14:54   ` joeyli
2026-06-19 11:11 ` Disha Goel
2026-06-23  6:11   ` joeyli [this message]

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=20260623061130.GA11413@linux-l9pv.suse \
    --to=jlee@suse.com \
    --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=gregkh@linuxfoundation.org \
    --cc=joeyli.kernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --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