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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Apr 2017 13:34:42 +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 2/2] x86/mce/AMD: Carve out SMCA bank configuration

> -----Original Message-----
> From: Borislav Petkov [mailto:bp@...e.de]
> Sent: Tuesday, March 28, 2017 3:23 PM
> 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 2/2] x86/mce/AMD: Carve out SMCA bank configuration
> 
> On Wed, Mar 22, 2017 at 02:29:31PM -0500, Yazen Ghannam wrote:
> > From: Yazen Ghannam <yazen.ghannam@....com>
> >
> > Scalable MCA systems have a new MCA_CONFIG register that we use to
> > configure each bank. We currently use this when we set up thresholding.
> > However, this is logically separate.
> >
> > Move setup of MCA_CONFIG into a separate function.
> >
> > Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
> > ---
> >  arch/x86/kernel/cpu/mcheck/mce_amd.c | 48
> > ++++++++++++++++++++----------------
> >  1 file changed, 27 insertions(+), 21 deletions(-)
> 
> ...
> 
> >  /* cpu init entry point, called from mce.c with preempt off */ @@
> > -515,8 +519,10 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
> >  	int offset = -1;
> >
> >  	for (bank = 0; bank < mca_cfg.banks; ++bank) {
> > -		if (mce_flags.smca)
> > +		if (mce_flags.smca) {
> >  			get_smca_bank_info(bank);
> > +			set_smca_config(bank);
> 
> Or simply bundle those two which do something SMCA-aware per bank into a
> single:
> 
> 	smca_configure(bank);
> 
> which reads almost like a sentence.
> 

I'd like to keep the functions separate since they're logically independent. I can
define something like smca_configure() as a wrapper function that can contain
current and future SMCA related functions. Is this okay?

Thanks,
Yazen

Powered by blists - more mailing lists