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:
 <SA1PR12MB89471067967E0A5F46CEE1DF8175A@SA1PR12MB8947.namprd12.prod.outlook.com>
Date: Wed, 11 Jun 2025 11:42:33 +0000
From: "Datta, Shubhrajyoti" <shubhrajyoti.datta@....com>
To: Borislav Petkov <bp@...en8.de>
CC: "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-edac@...r.kernel.org"
	<linux-edac@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "git (AMD-Xilinx)" <git@....com>, "Simek,
 Michal" <michal.simek@....com>, Tony Luck <tony.luck@...el.com>, James Morse
	<james.morse@....com>, Mauro Carvalho Chehab <mchehab@...nel.org>, Robert
 Richter <rric@...nel.org>
Subject: RE: [PATCH] EDAC/synopsys: Clear the ecc counters at init

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Borislav Petkov <bp@...en8.de>
> Sent: Wednesday, June 4, 2025 3:08 PM
> To: Datta, Shubhrajyoti <shubhrajyoti.datta@....com>
> Cc: linux-arm-kernel@...ts.infradead.org; linux-edac@...r.kernel.org; linux-
> kernel@...r.kernel.org; git (AMD-Xilinx) <git@....com>; Simek, Michal
> <michal.simek@....com>; Tony Luck <tony.luck@...el.com>; James Morse
> <james.morse@....com>; Mauro Carvalho Chehab <mchehab@...nel.org>;
> Robert Richter <rric@...nel.org>
> Subject: Re: [PATCH] EDAC/synopsys: Clear the ecc counters at init
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Wed, Jun 04, 2025 at 05:58:22AM +0000, Datta, Shubhrajyoti wrote:
> > zynqmp_get_ecc_state is getting called from probe/init.
> > I will update the commit message to reflect the same.
>
> No need.
>
> Next question: There's zynq_get_ecc_state() which is almost the same. Does
> that need clearing too?
Yes

>
> If so, the right thing to do is to unify both functions and get rid of the silly
> function pointers calling them but simply do ECC state reading once in
> mc_probe() and be done with it.
>
> The duplication here is very much unnecessary.

However the registers for Zynqmp and Zynq is different to differentiate
Should the usage of quirk be fine code snippet below

static bool get_ecc_state(struct synps_edac_priv *priv)
{
       enum dev_type dt;
       u32 ecctype, clearval;

       if (!priv->p_data->quirks) {
               check ecc and write to ECC_CTRL_OFST to clear the counters.
       } else {
              Zynqmp handling ..
               Checkecc and write to ECC_CLR_OFST clear the zynqmp ecc counters.
       }
}

And then call the get_ecc_state in probe.
>
> Thx.
>
> --
> Regards/Gruss,
>     Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ