All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore recording
Date: Tue, 16 Nov 2021 12:06:03 -0500	[thread overview]
Message-ID: <20211116120603.4e0c04c2@gandalf.local.home> (raw)
In-Reply-To: <20210610082134.20636-1-u.kleine-koenig@pengutronix.de>

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);
>  }


  reply	other threads:[~2021-11-16 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20211116120603.4e0c04c2@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=keescook@chromium.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tony.luck@intel.com \
    --cc=u.kleine-koenig@pengutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.