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]
Date: Wed, 24 Jan 2024 17:25:27 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Furong Xu <0x1207@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, 
	Alexandre Torgue <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, 
	Joao Pinto <jpinto@...opsys.com>, Simon Horman <horms@...nel.org>, netdev@...r.kernel.org, 
	linux-stm32@...md-mailman.stormreply.com, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, xfr@...look.com, rock.xu@....com
Subject: Re: [PATCH net] net: stmmac: xgmac: fix safety error descriptions

On Tue, Jan 23, 2024 at 04:50:37PM +0800, Furong Xu wrote:
> Commit 56e58d6c8a56 ("net: stmmac: Implement Safety Features in
> XGMAC core") prints safety error descriptions when safety error assert,
> but missed some special errors, and mixed correctable errors and
> uncorrectable errors together.
> This patch complete the error code list and print the type of errors.

The XGMAC ECC Safety code has likely been just copied from the DW GMAC
v5 (DW QoS Eth) part. So this change is partly relevant to that code too. I
can't confirm that the special errors support is relevant to the DW
QoS Eth too (it likely is though), so what about splitting this patch
up into two:
1. Elaborate the errors description for DW GMAC v5 and DW XGMAC.
2. Add new ECC safety errors support.
?

On the other hand if we were sure that both DW QoS Eth and XGMAC
safety features implementation match the ideal solution would be to
refactor out the common code into a dedicated module.

-Serge(y)

> 
> Fixes: 56e58d6c8a56 ("net: stmmac: Implement Safety Features in XGMAC core")
> Signed-off-by: Furong Xu <0x1207@...il.com>
> ---
>  .../ethernet/stmicro/stmmac/dwxgmac2_core.c   | 36 +++++++++----------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> index eb48211d9b0e..ad812484059e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> @@ -748,29 +748,29 @@ static void dwxgmac3_handle_mac_err(struct net_device *ndev,
>  }
>  
>  static const struct dwxgmac3_error_desc dwxgmac3_mtl_errors[32]= {
> -	{ true, "TXCES", "MTL TX Memory Error" },
> +	{ true, "TXCES", "MTL TX Memory Correctable Error" },
>  	{ true, "TXAMS", "MTL TX Memory Address Mismatch Error" },
> -	{ true, "TXUES", "MTL TX Memory Error" },
> +	{ true, "TXUES", "MTL TX Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 3 */
> -	{ true, "RXCES", "MTL RX Memory Error" },
> +	{ true, "RXCES", "MTL RX Memory Correctable Error" },
>  	{ true, "RXAMS", "MTL RX Memory Address Mismatch Error" },
> -	{ true, "RXUES", "MTL RX Memory Error" },
> +	{ true, "RXUES", "MTL RX Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 7 */
> -	{ true, "ECES", "MTL EST Memory Error" },
> +	{ true, "ECES", "MTL EST Memory Correctable Error" },
>  	{ true, "EAMS", "MTL EST Memory Address Mismatch Error" },
> -	{ true, "EUES", "MTL EST Memory Error" },
> +	{ true, "EUES", "MTL EST Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 11 */
> -	{ true, "RPCES", "MTL RX Parser Memory Error" },
> +	{ true, "RPCES", "MTL RX Parser Memory Correctable Error" },
>  	{ true, "RPAMS", "MTL RX Parser Memory Address Mismatch Error" },
> -	{ true, "RPUES", "MTL RX Parser Memory Error" },
> +	{ true, "RPUES", "MTL RX Parser Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 15 */
> -	{ false, "UNKNOWN", "Unknown Error" }, /* 16 */
> -	{ false, "UNKNOWN", "Unknown Error" }, /* 17 */
> -	{ false, "UNKNOWN", "Unknown Error" }, /* 18 */
> +	{ true, "SCES", "MTL SGF GCL Memory Correctable Error" },
> +	{ true, "SAMS", "MTL SGF GCL Memory Address Mismatch Error" },
> +	{ true, "SUES", "MTL SGF GCL Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 19 */
> -	{ false, "UNKNOWN", "Unknown Error" }, /* 20 */
> -	{ false, "UNKNOWN", "Unknown Error" }, /* 21 */
> -	{ false, "UNKNOWN", "Unknown Error" }, /* 22 */
> +	{ true, "RXFCES", "MTL RXF Memory Correctable Error" },
> +	{ true, "RXFAMS", "MTL RXF Memory Address Mismatch Error" },
> +	{ true, "RXFUES", "MTL RXF Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 23 */
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 24 */
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 25 */
> @@ -796,13 +796,13 @@ static void dwxgmac3_handle_mtl_err(struct net_device *ndev,
>  }
>  
>  static const struct dwxgmac3_error_desc dwxgmac3_dma_errors[32]= {
> -	{ true, "TCES", "DMA TSO Memory Error" },
> +	{ true, "TCES", "DMA TSO Memory Correctable Error" },
>  	{ true, "TAMS", "DMA TSO Memory Address Mismatch Error" },
> -	{ true, "TUES", "DMA TSO Memory Error" },
> +	{ true, "TUES", "DMA TSO Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 3 */
> -	{ true, "DCES", "DMA DCACHE Memory Error" },
> +	{ true, "DCES", "DMA DCACHE Memory Correctable Error" },
>  	{ true, "DAMS", "DMA DCACHE Address Mismatch Error" },
> -	{ true, "DUES", "DMA DCACHE Memory Error" },
> +	{ true, "DUES", "DMA DCACHE Memory Uncorrectable Error" },
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 7 */
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 8 */
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 9 */
> -- 
> 2.34.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ