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: <17bc270e-9cc1-485a-d6bb-0ebfa143e65e@cogentembedded.com>
Date:   Mon, 18 Sep 2017 22:29:51 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Nisar Sayed <Nisar.Sayed@...rochip.com>, davem@...emloft.net
Cc:     UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org
Subject: Re: [PATCH v4 net 2/3] lan78xx: Allow EEPROM write for less than
 MAX_EEPROM_SIZE

Hello!

On 09/19/2017 01:02 AM, Nisar Sayed wrote:

> Allow EEPROM write for less than MAX_EEPROM_SIZE
> 
> Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
> Signed-off-by: Nisar Sayed <Nisar.Sayed@...rochip.com>
> ---
>   drivers/net/usb/lan78xx.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index fcf85ae37435..3292f56ffe02 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -1290,11 +1290,10 @@ static int lan78xx_ethtool_set_eeprom(struct net_device *netdev,
>   	if (ret)
>   		return ret;
>   
> -	/* Allow entire eeprom update only */
> -	if ((ee->magic == LAN78XX_EEPROM_MAGIC) &&
> -	    (ee->offset == 0) &&
> -	    (ee->len == 512) &&
> -	    (data[0] == EEPROM_INDICATOR))
> +	/* Invalid EEPROM_INDICATOR at offset zero will result in fail to

    s/fail/a failure/.

> +	 * load data from EEPROM
> +	 */
> +	if (ee->magic == LAN78XX_EEPROM_MAGIC)
>   		ret = lan78xx_write_raw_eeprom(dev, ee->offset, ee->len, data);
>   	else if ((ee->magic == LAN78XX_OTP_MAGIC) &&
>   		 (ee->offset == 0) &&
> 

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ