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: <20250603090536.GCaD664IbJB5IoR06g@fat_crate.local>
Date: Tue, 3 Jun 2025 11:05:36 +0200
From: Borislav Petkov <bp@...en8.de>
To: Shubhrajyoti Datta <shubhrajyoti.datta@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-edac@...r.kernel.org,
	linux-kernel@...r.kernel.org, git@....com,
	Michal Simek <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

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.

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