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:	Mon, 17 Dec 2007 14:14:58 -0800
From:	Joe Perches <joe@...ches.com>
To:	Auke Kok <auke-jan.h.kok@...el.com>
Cc:	jeff@...zik.org, netdev@...r.kernel.org, davem@...emloft.net,
	john.ronciak@...el.com, jesse.brandeburg@...el.com,
	randy.dunlap@...cle.com
Subject: Re: [PATCH] e1000: Dump the eeprom when a user encounters a bad
	checksum

On Mon, 2007-12-17 at 13:50 -0800, Auke Kok wrote:
> diff --git a/drivers/net/e1000/e1000_main.c
> b/drivers/net/e1000/e1000_main.c
> index efd8c2d..aac55be 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -979,23 +1036,29 @@ e1000_probe(struct pci_dev *pdev,
>  	e1000_reset_hw(&adapter->hw);
>  
>  	/* make sure the EEPROM is good */
> -
>  	if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
>  		DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
> -		goto err_eeprom;
> +		e1000_dump_eeprom(adapter);
> +		/*
> +		 * set MAC address to all zeroes to invalidate and temporary
> +		 * disable this device for the user. This blocks regular
> +		 * traffic while still permitting ethtool ioctls from reaching
> +		 * the hardware as well as allowing the user to run the
> +		 * interface after manually setting a hw addr using
> +		 * `ip set address`
> +		 */
> +		memset(adapter->hw.mac_addr, 0, netdev->addr_len);

Do you need to set netdev->dev_addr too?

> +	} else {
> +		/* copy the MAC address out of the EEPROM */
> +		if (e1000_read_mac_addr(&adapter->hw))
> +			DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
>  	}
> -
> -	/* copy the MAC address out of the EEPROM */
> -
> -	if (e1000_read_mac_addr(&adapter->hw))
> -		DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
> +	/* don't block initalization here due to bad MAC address */

I just sent a patch to fix these typos and another pops up...

	initialization

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ