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] [day] [month] [year] [list]
Message-ID: <166724010782.7716.13211418678900484853.tip-bot2@tip-bot2>
Date:   Mon, 31 Oct 2022 18:15:07 -0000
From:   "tip-bot2 for Tony Luck" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Tony Luck <tony.luck@...el.com>, Borislav Petkov <bp@...e.de>,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: ras/core] RAS: Fix return value from show_trace()

The following commit has been merged into the ras/core branch of tip:

Commit-ID:     50865c14f34edbd03f8113147fac069b39f4e390
Gitweb:        https://git.kernel.org/tip/50865c14f34edbd03f8113147fac069b39f4e390
Author:        Tony Luck <tony.luck@...el.com>
AuthorDate:    Tue, 18 Oct 2022 09:59:00 -07:00
Committer:     Borislav Petkov <bp@...e.de>
CommitterDate: Mon, 31 Oct 2022 18:55:18 +01:00

RAS: Fix return value from show_trace()

Documentation/filesystems/seq_file.rst describes the possible return
values from a "show()" function used by single_open().

show_trace() returns the value of "trace_count". This could be
interpreted as "SEQ_SKIP", or just confuse the calling function.

Change to just return "0" to avoid confusing anyone reading this code
and possibly using as a template. Reading "daemon_active" was never
an intended use case.

Signed-off-by: Tony Luck <tony.luck@...el.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lore.kernel.org/r/20221018165900.109029-1-tony.luck@intel.com
---
 drivers/ras/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c
index 0d4f985..f0a6391 100644
--- a/drivers/ras/debugfs.c
+++ b/drivers/ras/debugfs.c
@@ -15,7 +15,7 @@ EXPORT_SYMBOL_GPL(ras_userspace_consumers);
 
 static int trace_show(struct seq_file *m, void *v)
 {
-	return atomic_read(&trace_count);
+	return 0;
 }
 
 static int trace_open(struct inode *inode, struct file *file)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ