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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1317390753.4068.32.camel@deadeye>
Date:	Fri, 30 Sep 2011 14:52:31 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, Emil Tantilov <emil.s.tantilov@...el.com>,
	netdev@...r.kernel.org, gospo@...hat.com
Subject: Re: [net-next 11/11] ixgbe: allow eeprom writes via ethtool

On Thu, 2011-09-29 at 22:24 -0700, Jeff Kirsher wrote:
[...]
> +static int ixgbe_set_eeprom(struct net_device *netdev,
> +			    struct ethtool_eeprom *eeprom, u8 *bytes)
> +{
> +	struct ixgbe_adapter *adapter = netdev_priv(netdev);
> +	struct ixgbe_hw *hw = &adapter->hw;
> +	u16 *eeprom_buff;
> +	void *ptr;
> +	int max_len, first_word, last_word, ret_val = 0;
> +	u16 i;
> +
> +	if (eeprom->len == 0)
> +		return -EOPNOTSUPP;
> +
> +	if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
> +		return -EFAULT;
[...]

Both these error codes should be EINVAL.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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