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:
 <SA1PR12MB894764756C6538EE985BDE24816CA@SA1PR12MB8947.namprd12.prod.outlook.com>
Date: Wed, 4 Jun 2025 05:58:22 +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: Tuesday, June 3, 2025 2:36 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, May 28, 2025 at 12:26:50PM +0530, Shubhrajyoti Datta wrote:
> > Subject: Re: [PATCH] EDAC/synopsys: Clear the ecc counters at init
>
> s/ecc/ECC/g
>
> > Clear ECC error and counter registers at init to ensure a clean state
> > by clearing all ECC error and counter registers before registering the
> > controller with the EDAC framework.
> >
> > This avoids reporting stale errors that may have occurred during boot
> > or prior configuration.
>
> Run this commit message through AI and ask it to shorten it and write it in
> imperative tone.
>
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@....com>
> > ---
> >
> >  drivers/edac/synopsys_edac.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/edac/synopsys_edac.c
> > b/drivers/edac/synopsys_edac.c index 5ed32a3299c4..ebd2d6e771a1
> 100644
> > --- a/drivers/edac/synopsys_edac.c
> > +++ b/drivers/edac/synopsys_edac.c
> > @@ -755,7 +755,7 @@ static bool zynq_get_ecc_state(void __iomem
> *base)
> > static bool zynqmp_get_ecc_state(void __iomem *base)  {
> >       enum dev_type dt;
> > -     u32 ecctype;
> > +     u32 ecctype, clearval;
> >
> >       dt = zynqmp_get_dtype(base);
> >       if (dt == DEV_UNKNOWN)
> > @@ -763,8 +763,13 @@ static bool zynqmp_get_ecc_state(void __iomem
> > *base)
> >
> >       ecctype = readl(base + ECC_CFG0_OFST) & SCRUB_MODE_MASK;
> >       if ((ecctype == SCRUB_MODE_SECDED) &&
> > -         ((dt == DEV_X2) || (dt == DEV_X4) || (dt == DEV_X8)))
> > +         ((dt == DEV_X2) || (dt == DEV_X4) || (dt == DEV_X8))) {
> > +             clearval = readl(base + ECC_CLR_OFST) |
> > +                             ECC_CTRL_CLR_CE_ERR | ECC_CTRL_CLR_CE_ERRCNT |
> > +                             ECC_CTRL_CLR_UE_ERR | ECC_CTRL_CLR_UE_ERRCNT;
> > +             writel(clearval, base + ECC_CLR_OFST);
>
> A getter function clears registers and commit message talks about "at init"?!?!
>
> This looks like a hack.


zynqmp_get_ecc_state is getting called from probe/init.
I will update the commit message to reflect the same.

>
> --
> 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