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] [day] [month] [year] [list]
Message-ID: <VI1PR0401MB1855CB589F417686E859C76BFF9A0@VI1PR0401MB1855.eurprd04.prod.outlook.com>
Date:	Fri, 1 Apr 2016 01:39:27 +0000
From:	Fugang Duan <fugang.duan@....com>
To:	Fabio Estevam <festevam@...il.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"troy.kisky@...ndarydevices.com" <troy.kisky@...ndarydevices.com>,
	"gerg@...inux.org" <gerg@...inux.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Fabio Estevam <fabio.estevam@....com>
Subject: RE: [PATCH] fec: Do not access unexisting register in Coldfire

From: Fabio Estevam <festevam@...il.com> Sent: Thursday, March 31, 2016 11:05 PM
> To: davem@...emloft.net
> Cc: Fugang Duan <fugang.duan@....com>; troy.kisky@...ndarydevices.com;
> gerg@...inux.org; netdev@...r.kernel.org; Fabio Estevam
> <fabio.estevam@....com>
> Subject: [PATCH] fec: Do not access unexisting register in Coldfire
> 
> From: Fabio Estevam <fabio.estevam@....com>
> 
> Commit 55cd48c821de ("net: fec: stop the "rcv is not +last, " error
> messages") introduces a write to a register that does not exist in Coldfire.
> 
> Move the FEC_FTRL register access inside the FEC_QUIRK_HAS_RACC 'if' block,
> so that we guarantee it will not be used on Coldfire CPUs.
> 
> Reported-by: Greg Ungerer <gerg@...inux.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@....com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 37c0815..08243c2 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev)
>  		else
>  			val &= ~FEC_RACC_OPTIONS;
>  		writel(val, fep->hwp + FEC_RACC);
> +		writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
>  	}
> -	writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
>  #endif
> 
>  	/*
> --
> 1.9.1

If you stick to do it like this,  you must add comments on the quirk flag FEC_QUIRK_HAS_RACC. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ