[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170830214719.GC103314@mtgdev>
Date: Wed, 30 Aug 2017 14:47:19 -0700
From: mark gross <mgross@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Tony Luck <tony.luck@...el.com>,
linux-edac <linux-edac@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Yazen Ghannam <Yazen.Ghannam@....com>, X86 ML <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...radead.org>
Subject: Re: [PATCH 0/7] EDAC, mce_amd: Issue decoded MCE through the
tracepoint
On Wed, Aug 30, 2017 at 01:48:43PM +0200, Borislav Petkov wrote:
> 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"
FWIW I this looks fishy in arch independent code.
I assume this include is for the definition of the mca_cfg global used in the
printf below.
> +
> 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);
do you want to worry about this debugfs interfaces as ABI?
debugfs changes have bitten me on one specific OS in irritating ways.
I'm not sure what the word is for debugfs interfaces as ABI these days so this
feedback may be not so useful.
--mark
> + 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.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-edac" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists