From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751033AbdH3VrW (ORCPT ); Wed, 30 Aug 2017 17:47:22 -0400 Received: from mga02.intel.com ([134.134.136.20]:23401 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbdH3VrV (ORCPT ); Wed, 30 Aug 2017 17:47:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,450,1498546800"; d="scan'208";a="145829215" Date: Wed, 30 Aug 2017 14:47:19 -0700 From: mark gross To: Borislav Petkov Cc: Tony Luck , linux-edac , Steven Rostedt , Yazen Ghannam , X86 ML , LKML , Mauro Carvalho Chehab Subject: Re: [PATCH 0/7] EDAC, mce_amd: Issue decoded MCE through the tracepoint Message-ID: <20170830214719.GC103314@mtgdev> Reply-To: mgross@linux.intel.com References: <20170825102411.8682-1-bp@alien8.de> <20170828134549.wh6toneoca47ff2w@pd.tnic> <20170830114843.deetnlz2wjbgbaj4@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170830114843.deetnlz2wjbgbaj4@pd.tnic> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > +#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@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html