From: Steven Rostedt <rostedt@goodmis.org>
To: Joel Granados <joel.granados@kernel.org>
Cc: Kees Cook <kees@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"David S. Miller" <davem@davemloft.net>,
Andreas Larsson <andreas@gaisler.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v2 4/6] stack_tracer: move sysctl registration to kernel/trace/trace_stack.c
Date: Thu, 6 Mar 2025 10:31:38 -0500 [thread overview]
Message-ID: <20250306103138.3cfc2955@gandalf.local.home> (raw)
In-Reply-To: <20250306-jag-mv_ctltables-v2-4-71b243c8d3f8@kernel.org>
On Thu, 06 Mar 2025 12:29:44 +0100
Joel Granados <joel.granados@kernel.org> wrote:
> Move stack_tracer_enabled into trace_stack_sysctl_table. This is part of
> a greater effort to move ctl tables into their respective subsystems
> which will reduce the merge conflicts in kerenel/sysctl.c.
>
> Signed-off-by: Joel Granados <joel.granados@kernel.org>
> ---
> kernel/sysctl.c | 10 ----------
> kernel/trace/trace_stack.c | 20 ++++++++++++++++++++
> 2 files changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index baa250e223a26bafc39cb7a7d7635b4f7f5dcf56..dc3747cc72d470662879e4f2b7f2651505b7ca90 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -68,7 +68,6 @@
>
> #ifdef CONFIG_X86
> #include <asm/nmi.h>
> -#include <asm/stacktrace.h>
> #include <asm/io.h>
> #endif
> #ifdef CONFIG_SPARC
> @@ -1674,15 +1673,6 @@ static const struct ctl_table kern_table[] = {
> .proc_handler = proc_dointvec,
> },
> #endif
> -#ifdef CONFIG_STACK_TRACER
> - {
> - .procname = "stack_tracer_enabled",
> - .data = &stack_tracer_enabled,
> - .maxlen = sizeof(int),
> - .mode = 0644,
> - .proc_handler = stack_trace_sysctl,
> - },
> -#endif
> #ifdef CONFIG_MODULES
> {
> .procname = "modprobe",
> diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
> index 14c6f272c4d8a382070d45e1cf0ee97db38831c9..b7ffbc1da8357f9c252cb8936c8f789daa97eb9a 100644
> --- a/kernel/trace/trace_stack.c
> +++ b/kernel/trace/trace_stack.c
> @@ -578,3 +578,23 @@ static __init int stack_trace_init(void)
> }
>
> device_initcall(stack_trace_init);
> +
> +
> +static const struct ctl_table trace_stack_sysctl_table[] = {
> + {
> + .procname = "stack_tracer_enabled",
> + .data = &stack_tracer_enabled,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = stack_trace_sysctl,
> + },
> +};
> +
> +static int __init init_trace_stack_sysctls(void)
> +{
> + register_sysctl_init("kernel", trace_stack_sysctl_table);
> + return 0;
> +}
> +subsys_initcall(init_trace_stack_sysctls);
> +
> +
>
This should also make the variable "stack_tracer_enabled" static and
removed from the ftrace.h header.
-- Steve
next prev parent reply other threads:[~2025-03-06 15:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 11:29 [PATCH v2 0/6] sysctl: Move sysctls from kern_table into their respective subsystems Joel Granados
2025-03-06 11:29 ` [PATCH v2 1/6] panic: Move panic ctl tables into panic.c Joel Granados
2025-03-06 11:29 ` [PATCH v2 2/6] signal: Move signal ctl tables into signal.c Joel Granados
2025-03-06 11:29 ` [PATCH v2 3/6] tracing: Move trace sysctls into trace.c Joel Granados
2025-03-06 11:29 ` [PATCH v2 4/6] stack_tracer: move sysctl registration to kernel/trace/trace_stack.c Joel Granados
2025-03-06 15:31 ` Steven Rostedt [this message]
2025-03-13 16:19 ` Joel Granados
2025-03-06 11:29 ` [PATCH v2 5/6] sparc: mv sparc sysctls into their own file under arch/sparc/kernel Joel Granados
2025-03-06 11:29 ` [PATCH v2 6/6] s390: mv s390 sysctls into their own file under arch/s390 dir joel granados
2025-03-07 15:26 ` Heiko Carstens
2025-03-10 13:41 ` Joel Granados
2025-03-11 11:02 ` Vasily Gorbik
2025-03-13 16:02 ` Joel Granados
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=20250306103138.3cfc2955@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=agordeev@linux.ibm.com \
--cc=andreas@gaisler.com \
--cc=borntraeger@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=joel.granados@kernel.org \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=svens@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).