Messages in this thread Patch in this message |  | | Date | Wed, 30 Aug 2017 13:48:43 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH 0/7] EDAC, mce_amd: Issue decoded MCE through the tracepoint |
| |
Btw,
how about communicating stuff to the userspace daemon like this?
This'll simplify a lot of detection in userspace.
Thoughts?
--- diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c index 501603057dff..62d3da9d256f 100644 --- a/drivers/ras/debugfs.c +++ b/drivers/ras/debugfs.c @@ -1,5 +1,7 @@ #include <linux/debugfs.h> +#include "../../arch/x86/kernel/cpu/mcheck/mce-internal.h" + struct dentry *ras_debugfs_dir; static atomic_t trace_count = ATOMIC_INIT(0); @@ -12,7 +14,9 @@ EXPORT_SYMBOL_GPL(ras_userspace_consumers); static int trace_show(struct seq_file *m, void *v) { - return atomic_read(&trace_count); + seq_printf(m, "readers:%d\n", atomic_read(&trace_count)); + seq_printf(m, "has decoder:%d\n", mca_cfg.has_decoder); + return 0; } static int trace_open(struct inode *inode, struct file *file) -- Regards/Gruss, Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
|  |