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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN6PR1201MB013107D72B8245E9FFA965E0F83F0@BN6PR1201MB0131.namprd12.prod.outlook.com>
Date:   Sun, 3 Dec 2017 00:58:38 +0000
From:   "Ghannam, Yazen" <Yazen.Ghannam@....com>
To:     Borislav Petkov <bp@...e.de>
CC:     "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        Tony Luck <tony.luck@...el.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/2] x86/mce/AMD: Define function to get SMCA bank type

> -----Original Message-----
> From: linux-edac-owner@...r.kernel.org [mailto:linux-edac-
> owner@...r.kernel.org] On Behalf Of Borislav Petkov
> Sent: Saturday, December 2, 2017 9:22 AM
> To: Ghannam, Yazen <Yazen.Ghannam@....com>
> Cc: linux-edac@...r.kernel.org; Tony Luck <tony.luck@...el.com>;
> x86@...nel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH 1/2] x86/mce/AMD: Define function to get SMCA bank
> type
> 
> On Fri, Dec 01, 2017 at 09:50:33AM -0600, Yazen Ghannam wrote:
> > From: Yazen Ghannam <yazen.ghannam@....com>
> >
> > Scalable MCA systems have various types of banks. The bank's type can
> > determine how we handle errors from it. For example, if a bank represents
> > a UMC then we will need to convert its address from a normalized address
> > to a system physical address before handling the error.
> >
> > Define an exported function to return a bank's SMCA type.
> >
> > Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
> > ---
> >  arch/x86/include/asm/mce.h           |  1 +
> >  arch/x86/kernel/cpu/mcheck/mce_amd.c | 11 +++++++++++
> >  2 files changed, 12 insertions(+)
> >
> > diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
> > index b1e8d8db921f..9ab8bf32e61c 100644
> > --- a/arch/x86/include/asm/mce.h
> > +++ b/arch/x86/include/asm/mce.h
> > @@ -376,6 +376,7 @@ struct smca_bank {
> >  extern struct smca_bank smca_banks[MAX_NR_BANKS];
> >
> >  extern const char *smca_get_long_name(enum smca_bank_types t);
> > +extern unsigned int smca_get_bank_type(struct mce *m);
> >
> >  extern int mce_threshold_create_device(unsigned int cpu);
> >  extern int mce_threshold_remove_device(unsigned int cpu);
> > diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c
> b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> > index a38ab1fa53a2..bc0510a4f6c0 100644
> > --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
> > +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> > @@ -110,6 +110,17 @@ const char *smca_get_long_name(enum
> smca_bank_types t)
> >  }
> >  EXPORT_SYMBOL_GPL(smca_get_long_name);
> >
> > +unsigned int smca_get_bank_type(struct mce *m)
> > +{
> > +	struct smca_bank bank = smca_banks[m->bank];
> > +
> > +	if (!bank.hwid)
> > +		return N_SMCA_BANK_TYPES;
> > +
> > +	return bank.hwid->bank_type;
> > +}
> > +EXPORT_SYMBOL_GPL(smca_get_bank_type);
> 
> Why are you exporting it if it is used in mce_amd.c only anyway?
> 

I was thinking it could be used in edac/mce_amd.c also.

I don't have a use at the moment, so I can change this if you'd like.

Thanks,
Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ