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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Nov 2021 12:06:03 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Kees Cook <keescook@...omium.org>,
        Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Tony Luck <tony.luck@...el.com>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        kernel@...gutronix.de
Subject: Re: [PATCH] pstore/ftrace: add a kernel parameter to start pstore
 recording

On Thu, 10 Jun 2021 10:21:34 +0200
Uwe Kleine-König <u.kleine-koenig@...gutronix.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@...gutronix.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);
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ