* [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
@ 2021-06-10 8:21 Uwe Kleine-König
2021-11-16 17:06 ` Steven Rostedt
2021-11-18 18:08 ` Kees Cook
0 siblings, 2 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2021-06-10 8:21 UTC (permalink / raw)
To: Kees Cook, Anton Vorontsov, Colin Cross, Tony Luck,
Steven Rostedt, Ingo Molnar
Cc: linux-kernel, kernel
With this knob you can enable pstore recording early enough to debug
hangs happening during the boot process before userspace is up enough to
enable it via sysfs.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
fs/pstore/ftrace.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/fs/pstore/ftrace.c b/fs/pstore/ftrace.c
index 5939595f0115..92d35ee83c95 100644
--- a/fs/pstore/ftrace.c
+++ b/fs/pstore/ftrace.c
@@ -117,13 +117,26 @@ static const struct file_operations pstore_knob_fops = {
static struct dentry *pstore_ftrace_dir;
+static unsigned int record_ftrace_init;
+module_param(record_ftrace_init, uint, 0400);
+
void pstore_register_ftrace(void)
{
+ int ret;
+
if (!psinfo->write)
return;
pstore_ftrace_dir = debugfs_create_dir("pstore", NULL);
+ if (record_ftrace_init) {
+ ret = register_ftrace_function(&pstore_ftrace_ops);
+ if (ret)
+ return;
+
+ pstore_ftrace_enabled = 1;
+ }
+
debugfs_create_file("record_ftrace", 0600, pstore_ftrace_dir, NULL,
&pstore_knob_fops);
}
--
2.29.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-06-10 8:21 [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording Uwe Kleine-König
@ 2021-11-16 17:06 ` Steven Rostedt
2021-11-16 17:28 ` Uwe Kleine-König
2021-11-18 18:08 ` Kees Cook
1 sibling, 1 reply; 10+ messages in thread
From: Steven Rostedt @ 2021-11-16 17:06 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Kees Cook, Anton Vorontsov, Colin Cross, Tony Luck, Ingo Molnar,
linux-kernel, kernel
On Thu, 10 Jun 2021 10:21:34 +0200
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> With this knob you can enable pstore recording early enough to debug
> hangs happening during the boot process before userspace is up enough to
> enable it via sysfs.
>
Is this still needed? It's still in my internal patchwork, and I haven't
seen any responses.
-- Steve
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> fs/pstore/ftrace.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/fs/pstore/ftrace.c b/fs/pstore/ftrace.c
> index 5939595f0115..92d35ee83c95 100644
> --- a/fs/pstore/ftrace.c
> +++ b/fs/pstore/ftrace.c
> @@ -117,13 +117,26 @@ static const struct file_operations pstore_knob_fops = {
>
> static struct dentry *pstore_ftrace_dir;
>
> +static unsigned int record_ftrace_init;
> +module_param(record_ftrace_init, uint, 0400);
> +
> void pstore_register_ftrace(void)
> {
> + int ret;
> +
> if (!psinfo->write)
> return;
>
> pstore_ftrace_dir = debugfs_create_dir("pstore", NULL);
>
> + if (record_ftrace_init) {
> + ret = register_ftrace_function(&pstore_ftrace_ops);
> + if (ret)
> + return;
> +
> + pstore_ftrace_enabled = 1;
> + }
> +
> debugfs_create_file("record_ftrace", 0600, pstore_ftrace_dir, NULL,
> &pstore_knob_fops);
> }
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-16 17:06 ` Steven Rostedt
@ 2021-11-16 17:28 ` Uwe Kleine-König
2021-11-16 17:37 ` Steven Rostedt
0 siblings, 1 reply; 10+ messages in thread
From: Uwe Kleine-König @ 2021-11-16 17:28 UTC (permalink / raw)
To: Steven Rostedt
Cc: Tony Luck, Kees Cook, Anton Vorontsov, linux-kernel, Ingo Molnar,
kernel, Colin Cross
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
Hello Steven,
On Tue, Nov 16, 2021 at 12:06:03PM -0500, Steven Rostedt wrote:
> On Thu, 10 Jun 2021 10:21:34 +0200
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>
> > With this knob you can enable pstore recording early enough to debug
> > hangs happening during the boot process before userspace is up enough to
> > enable it via sysfs.
>
> Is this still needed? It's still in my internal patchwork, and I haven't
> seen any responses.
I didn't see any responses either, and unless someone else implemented
something similar somewhere else, it's still needed.
The change was actually useful to debug a clk problem, where the machine
freezed when a certain driver was loaded.
Thanks for keeping track of this change. I would only have noticed it
missing next time when I have to debug a similar problem.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-16 17:28 ` Uwe Kleine-König
@ 2021-11-16 17:37 ` Steven Rostedt
2021-11-16 20:52 ` Uwe Kleine-König
2021-11-16 21:00 ` Kees Cook
0 siblings, 2 replies; 10+ messages in thread
From: Steven Rostedt @ 2021-11-16 17:37 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Tony Luck, Kees Cook, Anton Vorontsov, linux-kernel, Ingo Molnar,
kernel, Colin Cross
On Tue, 16 Nov 2021 18:28:35 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > Is this still needed? It's still in my internal patchwork, and I haven't
> > seen any responses.
>
> I didn't see any responses either, and unless someone else implemented
> something similar somewhere else, it's still needed.
>
> The change was actually useful to debug a clk problem, where the machine
> freezed when a certain driver was loaded.
Perhaps I should ask this. Would anyone object if I just take this change
through my tree for the next merge window?
-- Steve
>
> Thanks for keeping track of this change. I would only have noticed it
> missing next time when I have to debug a similar problem.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-16 17:37 ` Steven Rostedt
@ 2021-11-16 20:52 ` Uwe Kleine-König
2021-11-16 21:00 ` Kees Cook
1 sibling, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2021-11-16 20:52 UTC (permalink / raw)
To: Steven Rostedt
Cc: Tony Luck, Kees Cook, Anton Vorontsov, linux-kernel, Ingo Molnar,
kernel, Colin Cross
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
Hello Steven,
On Tue, Nov 16, 2021 at 12:37:05PM -0500, Steven Rostedt wrote:
> On Tue, 16 Nov 2021 18:28:35 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>
> > > Is this still needed? It's still in my internal patchwork, and I haven't
> > > seen any responses.
> >
> > I didn't see any responses either, and unless someone else implemented
> > something similar somewhere else, it's still needed.
> >
> > The change was actually useful to debug a clk problem, where the machine
> > freezed when a certain driver was loaded.
>
> Perhaps I should ask this. Would anyone object if I just take this change
> through my tree for the next merge window?
I don't know.
(To be interpreted as in
https://math.stackexchange.com/questions/1884607/does-everyone-want-coffee-propositional-logic-problem :-)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-16 17:37 ` Steven Rostedt
2021-11-16 20:52 ` Uwe Kleine-König
@ 2021-11-16 21:00 ` Kees Cook
2021-11-29 22:40 ` Steven Rostedt
1 sibling, 1 reply; 10+ messages in thread
From: Kees Cook @ 2021-11-16 21:00 UTC (permalink / raw)
To: Steven Rostedt
Cc: Uwe Kleine-König, Tony Luck, Anton Vorontsov, linux-kernel,
Ingo Molnar, kernel, Colin Cross
On Tue, Nov 16, 2021 at 12:37:05PM -0500, Steven Rostedt wrote:
> On Tue, 16 Nov 2021 18:28:35 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>
> > > Is this still needed? It's still in my internal patchwork, and I haven't
> > > seen any responses.
> >
> > I didn't see any responses either, and unless someone else implemented
> > something similar somewhere else, it's still needed.
> >
> > The change was actually useful to debug a clk problem, where the machine
> > freezed when a certain driver was loaded.
>
> Perhaps I should ask this. Would anyone object if I just take this change
> through my tree for the next merge window?
If you can Ack it, I'll take it via the pstore tree; I've got a few
other things that will likely need to go in for the next merge window
too.
-Kees
--
Kees Cook
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-06-10 8:21 [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording Uwe Kleine-König
2021-11-16 17:06 ` Steven Rostedt
@ 2021-11-18 18:08 ` Kees Cook
2021-11-18 18:31 ` Kees Cook
1 sibling, 1 reply; 10+ messages in thread
From: Kees Cook @ 2021-11-18 18:08 UTC (permalink / raw)
To: Tony Luck, Colin Cross, Ingo Molnar, Steven Rostedt,
Anton Vorontsov, Uwe Kleine-König
Cc: Kees Cook, linux-kernel, kernel
On Thu, 10 Jun 2021 10:21:34 +0200, Uwe Kleine-König wrote:
> With this knob you can enable pstore recording early enough to debug
> hangs happening during the boot process before userspace is up enough to
> enable it via sysfs.
>
>
I refactored this patch a fair bit so it would use a common enable/disable
routine, but otherwise the original intent remains. :)
Applied to for-next/pstore, thanks!
[1/1] pstore/ftrace: add a kernel parameter to start pstore recording
https://git.kernel.org/kees/c/8d74118c9441
--
Kees Cook
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-18 18:08 ` Kees Cook
@ 2021-11-18 18:31 ` Kees Cook
2021-11-19 7:25 ` Uwe Kleine-König
0 siblings, 1 reply; 10+ messages in thread
From: Kees Cook @ 2021-11-18 18:31 UTC (permalink / raw)
To: Tony Luck, Colin Cross, Ingo Molnar, Steven Rostedt,
Anton Vorontsov, Uwe Kleine-König
Cc: linux-kernel, kernel
On Thu, Nov 18, 2021 at 10:08:38AM -0800, Kees Cook wrote:
> On Thu, 10 Jun 2021 10:21:34 +0200, Uwe Kleine-König wrote:
> > With this knob you can enable pstore recording early enough to debug
> > hangs happening during the boot process before userspace is up enough to
> > enable it via sysfs.
> >
> >
>
> I refactored this patch a fair bit so it would use a common enable/disable
> routine, but otherwise the original intent remains. :)
>
> Applied to for-next/pstore, thanks!
>
> [1/1] pstore/ftrace: add a kernel parameter to start pstore recording
> https://git.kernel.org/kees/c/8d74118c9441
Hrm, sha shenanigans. This is actually:
https://git.kernel.org/kees/c/a5d05b07961a
--
Kees Cook
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-18 18:31 ` Kees Cook
@ 2021-11-19 7:25 ` Uwe Kleine-König
0 siblings, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2021-11-19 7:25 UTC (permalink / raw)
To: Kees Cook
Cc: Tony Luck, Colin Cross, Ingo Molnar, Steven Rostedt,
Anton Vorontsov, linux-kernel, kernel
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
Hello Kees,
On Thu, Nov 18, 2021 at 10:31:26AM -0800, Kees Cook wrote:
> On Thu, Nov 18, 2021 at 10:08:38AM -0800, Kees Cook wrote:
> > On Thu, 10 Jun 2021 10:21:34 +0200, Uwe Kleine-König wrote:
> > > With this knob you can enable pstore recording early enough to debug
> > > hangs happening during the boot process before userspace is up enough to
> > > enable it via sysfs.
> > >
> > >
> >
> > I refactored this patch a fair bit so it would use a common enable/disable
> > routine, but otherwise the original intent remains. :)
> >
> > Applied to for-next/pstore, thanks!
> >
> > [1/1] pstore/ftrace: add a kernel parameter to start pstore recording
> > https://git.kernel.org/kees/c/8d74118c9441
>
> Hrm, sha shenanigans. This is actually:
>
> https://git.kernel.org/kees/c/a5d05b07961a
\o/ Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
2021-11-16 21:00 ` Kees Cook
@ 2021-11-29 22:40 ` Steven Rostedt
0 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2021-11-29 22:40 UTC (permalink / raw)
To: Kees Cook
Cc: Uwe Kleine-König, Tony Luck, Anton Vorontsov, linux-kernel,
Ingo Molnar, kernel, Colin Cross
On Tue, 16 Nov 2021 13:00:07 -0800
Kees Cook <keescook@chromium.org> wrote:
> On Tue, Nov 16, 2021 at 12:37:05PM -0500, Steven Rostedt wrote:
> > On Tue, 16 Nov 2021 18:28:35 +0100
> > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >
> > > > Is this still needed? It's still in my internal patchwork, and I haven't
> > > > seen any responses.
> > >
> > > I didn't see any responses either, and unless someone else implemented
> > > something similar somewhere else, it's still needed.
> > >
> > > The change was actually useful to debug a clk problem, where the machine
> > > freezed when a certain driver was loaded.
> >
> > Perhaps I should ask this. Would anyone object if I just take this change
> > through my tree for the next merge window?
>
> If you can Ack it, I'll take it via the pstore tree; I've got a few
> other things that will likely need to go in for the next merge window
> too.
>
I've must have missed this.
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-11-29 22:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 8:21 [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording Uwe Kleine-König
2021-11-16 17:06 ` Steven Rostedt
2021-11-16 17:28 ` Uwe Kleine-König
2021-11-16 17:37 ` Steven Rostedt
2021-11-16 20:52 ` Uwe Kleine-König
2021-11-16 21:00 ` Kees Cook
2021-11-29 22:40 ` Steven Rostedt
2021-11-18 18:08 ` Kees Cook
2021-11-18 18:31 ` Kees Cook
2021-11-19 7:25 ` Uwe Kleine-König
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).