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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250626141023.GBaF1UzwF9ITE8-LBQ@fat_crate.local>
Date: Thu, 26 Jun 2025 16:10:23 +0200
From: Borislav Petkov <bp@...en8.de>
To: "Datta, Shubhrajyoti" <shubhrajyoti.datta@....com>
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

On Thu, Jun 12, 2025 at 11:42:13AM +0000, Datta, Shubhrajyoti wrote:
> Please find the diff below

Good first try, however...

> -/**
> - * zynqmp_get_ecc_state - Return the controller ECC enable/disable status.
> - * @base:      DDR memory controller base address.
> - *
> - * Get the ECC enable/disable status for the controller.
> - *
> - * Return: a ECC status boolean i.e true/false - enabled/disabled.
> - */
> -static bool zynqmp_get_ecc_state(void __iomem *base)
> +static bool get_ecc_state(struct synps_edac_priv *priv)

This function's signature should be:

static bool get_ecc_state(void __iomem *base, bool is_zynq)

or so.

Or you'd have to invent a proper way to figure out what hardware the driver is
running on. Definitely not:

	if (!priv->p_data->quirks)

I have no clue how the device tree stuff makes the strings you pass in
synps_edac_match available again but there should be a proper way to check the
hw you're running on - not some arbitrary random case where zynq hw doesn't
have quirks because once someone adds quirks, your scheme is down the drain.

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