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] [day] [month] [year] [list]
Message-ID: <20251202060117.GA2268011@google.com>
Date: Tue, 2 Dec 2025 14:01:17 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: Aaron Thompson <dev@...ont.org>
Cc: Mark Brown <broonie@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Danilo Krummrich <dakr@...nel.org>,
	Jonathan Corbet <corbet@....net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	Aishwarya.TCV@....com
Subject: Re: [PATCH 2/2] debugfs: Remove broken no-mount mode

On Mon, Dec 01, 2025 at 10:16:49PM +0000, Aaron Thompson wrote:
> On 12/1/25 09:15, Mark Brown wrote:
> > On Thu, Nov 20, 2025 at 10:26:33AM +0000, Aaron Thompson wrote:
> > 
> > > debugfs access modes were added in Linux 5.10 (Dec 2020) [1], but the
> > > no-mount mode has behaved effectively the same as the off mode since
> > > Linux 5.12 (Apr 2021) [2]. The only difference is the specific error
> > > code returned by the debugfs_create_* functions, which is -ENOENT in
> > > no-mount mode and -EPERM in off mode.
> > 
> > I'm seeing regressions in -next in a lot of testing stuff which bisect
> > to this patch.  I've got a test that looks at the deferred probe list to
> > see if it's empty, and the mm split_huge_page_test which uses a debugfs
> > file called split_huge_pages.  Neither of these mount debugfs for
> > themselves, they just assume it'll be there - it looks like that's not
> > happening any more but I didn't investigate properly.
> > 
> > I don't immediately see what's getting confused, DEBUG_FS_ALLOW_ALL is
> > the default and not overridden by anything in any defconfig so
> > debugfs_enabled still ought to be being set, but I didn't actually try
> > to debug this yet.
> > 
> > Sample bisect:
> > 
> > git bisect start
> > # status: waiting for both good and bad commits
> > ...
> > # bad: [f278809475f6835b56de78b28dc2cc0c7e2c20a4] debugfs: Remove broken no-mount mode
> > git bisect bad f278809475f6835b56de78b28dc2cc0c7e2c20a4
> > # first bad commit: [f278809475f6835b56de78b28dc2cc0c7e2c20a4] debugfs: Remove broken no-mount mode
> 
> I am terribly sorry, this was a sloppy mistake on my part. The IS_ENABLED()
> check is missing the CONFIG_ prefix. The fix patch is attached.

I see it wasn't my local stuff acting up.

> Greg, should I send a v2 of the patch series, or a separate patch with just
> the fix? Or something else? Again, sorry for the trouble.
> 
> -- Aaron

> commit 92dcc0b68643955317fa4174442a6376df5a8c97
> Author: Aaron Thompson <dev@...ont.org>
> Date:   Mon Dec 1 22:15:24 2025 +0000
> 
>     debugfs: Fix IS_ENABLED check
> 
> diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
> index 930d66911fcd..4b263c328ed2 100644
> --- a/fs/debugfs/inode.c
> +++ b/fs/debugfs/inode.c
> @@ -35,7 +35,7 @@
>  static struct vfsmount *debugfs_mount;
>  static int debugfs_mount_count;
>  static bool debugfs_registered;
> -static bool debugfs_enabled __ro_after_init = IS_ENABLED(DEBUG_FS_ALLOW_ALL);
> +static bool debugfs_enabled __ro_after_init = IS_ENABLED(CONFIG_DEBUG_FS_ALLOW_ALL);
>  
>  /*
>   * Don't allow access attributes to be changed whilst the kernel is locked down

Tested-by: Chen-Yu Tsai <wenst@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ