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] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN6PR1201MB013183C5B57F496DD5DA5D9FF80A0@BN6PR1201MB0131.namprd12.prod.outlook.com>
Date:   Wed, 5 Apr 2017 17:53:57 +0000
From:   "Ghannam, Yazen" <Yazen.Ghannam@....com>
To:     Borislav Petkov <bp@...en8.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 v2 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR}
 registers

> -----Original Message-----
> From: Borislav Petkov [mailto:bp@...en8.de]
> Sent: Wednesday, April 05, 2017 1:22 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 v2 1/2] x86/mce/AMD: Redo use of SMCA
> MCA_DE{STAT,ADDR} registers
> 
> On Wed, Apr 05, 2017 at 05:06:19PM +0000, Ghannam, Yazen wrote:
> > Checking if we have a valid deferred error. Since we call
> > __log_error() on thresholding interrupts too we would need to tell it
> > which handler is calling it to do the correct check. This is what we currently
> do.
> 
> That's why I suggested a __log_error_deferred() - a separate function which
> deals with deferred errors.
> 
> > What do you mean " we don't have anything"? We check if we have a
> > valid deferred error in is_deferred_error(). Otherwise, we don't log
> anything.
> 
> So the normal status MSR says whether we have a deferred error or not.
> If it says we don't, then we have to look at the DE* MSRs, correct?
> 

Correct, but only on SMCA systems.

> If yes, then do it exactly like this.
> 
> Not:
> 
> 	IF deferred:
> 	 	log
> 	ELSE IF SMCA:
> 		IF deferred:
> 			log
> 

This works so I don't know why it's not okay. Your suggestion also does an
SMCA check. So code that does a check-and-return is preferable to code
using if/else-if statements? If that's the case then I can try to rework it.

> but:
> 
> 	IF deferred:
> 		log_deferred:
> 			log
> 			IF cannot log from normal MSRs

How does log_error() know if we can't use the normal MSRs? We check
for MCI_STATUS_VAL in log_error(). We also need to check for
MCI_STATUS_DEFERRED but only if we're coming from the deferred error
handler.

> 				log from DE
> 
> Why are we even wasting time with this?!
> 

I don't know. 

Thanks,
Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ