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:   Mon, 17 Oct 2022 12:36:16 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Tony Luck <tony.luck@...el.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] RAS: Fix the trace_show() function to output
 trace_count

On Wed, Oct 05, 2022 at 12:46:44PM -0700, Tony Luck wrote:
>  static int trace_show(struct seq_file *m, void *v)
>  {
> -	return atomic_read(&trace_count);
> +	seq_printf(m, "%d\n", atomic_read(&trace_count));

Still misleading:

$ cat /sys/kernel/debug/ras/daemon_active
1

and it is 1 and not 0 because:

[   13.177644] trace_open: trace_count: 1, comm: cat
[   13.178675] trace_release: trace_count: 0, comm: cat

we toggle trace_count when we read it.

I don't know, maybe we should teach RAS daemons to ->write() into that
file their name and PID so that the trace_count counts *only* the RAS
daemons not any reader...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ