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: <20260121151500.GE166857@noisy.programming.kicks-ass.net>
Date: Wed, 21 Jan 2026 16:15:00 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: tglx@...utronix.de, mathieu.desnoyers@...icios.com,
	linux-kernel@...r.kernel.org, paulmck@...nel.org,
	boqun.feng@...il.com, corbet@....net, prakash.sangappa@...cle.com,
	vineethr@...ux.ibm.com, kprateek.nayak@....com, rostedt@...dmis.org,
	bigeasy@...utronix.de, arnd@...db.de, rdunlap@...radead.org,
	rongevarg@...il.com, longman@...hat.com
Subject: Re: [PATCH 2/5] rseq: Move slice_ext_nsec to debugfs

On Wed, Jan 21, 2026 at 03:50:55PM +0100, Thomas Weißschuh wrote:

> > +#else
> > +static void rseq_slice_ext_init(struct dentry *root_dir) { }
> > +#endif
> 
> It might be possible to just remove the CONFIG_DEBUG_FS ifdeffery and let the
> compiler optimize away all of the debugfs-related code automatically.

Something like the below seems to actually build for SLICE_EXT=y,
DEBUG_FS=n (got there through allnoconfig)

Final image doesn't seem to have the various _ops,_show etc symbols
either.

--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -123,7 +123,6 @@ void __rseq_trace_ip_fixup(unsigned long
 }
 #endif /* CONFIG_TRACEPOINTS */
 
-#ifdef CONFIG_DEBUG_FS
 #ifdef CONFIG_RSEQ_STATS
 DEFINE_PER_CPU(struct rseq_stats, rseq_stats);
 
@@ -222,7 +221,7 @@ static const struct file_operations debu
 	.release	= single_release,
 };
 
-extern void rseq_slice_ext_init(struct dentry *root_dir);
+static void rseq_slice_ext_init(struct dentry *root_dir);
 
 static int __init rseq_debugfs_init(void)
 {
@@ -235,7 +234,6 @@ static int __init rseq_debugfs_init(void
 	return 0;
 }
 __initcall(rseq_debugfs_init);
-#endif /* CONFIG_DEBUG_FS */
 
 static bool rseq_set_ids(struct task_struct *t, struct rseq_ids *ids, u32 node_id)
 {
@@ -767,7 +765,6 @@ SYSCALL_DEFINE0(rseq_slice_yield)
 	return yielded;
 }
 
-#ifdef CONFIG_DEBUG_FS
 static int rseq_slice_ext_show(struct seq_file *m, void *p)
 {
 	seq_printf(m, "%d\n", rseq_slice_ext_nsecs);
@@ -810,9 +807,6 @@ static void rseq_slice_ext_init(struct d
 {
 	debugfs_create_file("slice_ext_nsec", 0644, root_dir, NULL, &slice_ext_ops);
 }
-#else
-static void rseq_slice_ext_init(struct dentry *root_dir) { }
-#endif
 
 static int __init rseq_slice_cmdline(char *str)
 {
@@ -838,4 +832,6 @@ static int __init rseq_slice_init(void)
 	return 0;
 }
 device_initcall(rseq_slice_init);
+#else
+static void rseq_slice_ext_init(struct dentry *root_dir) { }
 #endif /* CONFIG_RSEQ_SLICE_EXTENSION */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ