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-next>] [day] [month] [year] [list]
Message-Id: <B0201E3D-98F5-490E-81CF-45B16A06760D@gmail.com>
Date:   Wed, 11 May 2022 15:59:41 +0800
From:   lixue liang <lixue.liang5086@...il.com>
To:     Paul Menzel <pmenzel@...gen.mpg.de>
Cc:     Jesse Brandeburg <jesse.brandeburg@...el.com>,
        anthony.l.nguyen@...el.com, Jakub Kicinski <kuba@...nel.org>,
        intel-wired-lan@...ts.osuosl.org, Netdev <netdev@...r.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH] igb_ethtool: fix efficiency issues in
 igb_set_eeprom

Hi Paul,

Thank you very much for your reply and suggestions.I have made the corresponding changes according to your suggestion.

In addition, for the problem that the invalid mac address cannot load the igb driver, I personally think there is a better way to modify it, 
and I will resubmit the patch about igb_main.c.

It's the same question, but I may not know how to continue submitting new patches on this email, sorry about that.

> 2022年5月11日 14:41,Paul Menzel <pmenzel@...gen.mpg.de> 写道:
> 
> Dear lianglixue,
> 
> 
> Thank you for your patch.
> 
> Am 10.05.22 um 03:21 schrieb lianglixue:
> 
> It’d be great if you spelled your name with spaces (if possible).
> 
> Also, currently your Google Mail address would be used for the Author field. If you want to use your company(?) address, please add a From: line at the top.
> 
>> Modify the value of eeprom in igb_set_eeprom. If the mac address
>> of i210 is changed to illegal, then in igp_probe in the
>> igb_main file, is_valid_eth_addr (netdev->dev_addr) exits
>> with an error, causing the igb driver to fail to load,
>> such as ethtool -E eth0 magic 0x15338086 offset 0 value 0x01.
>> In this way, the igb driver can no longer be loaded,
>> and the legal mac address cannot be recovered through ethtool;
>> add is_valid_eth_addr to igb_set_eeprom to determine
>> whether it is legal to rewrite, so as to avoid driver
>> errors due to illegal mac addresses.
> 
> Please reflow the text for 75 characters per line.
> 
>> Signed-off-by: lianglixue <lianglixue@...atwall.com.cn>
>> ---
>> drivers/net/ethernet/intel/igb/igb_ethtool.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> index 2a5782063f4c..30554fd684db 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> @@ -798,6 +798,13 @@ static int igb_set_eeprom(struct net_device *netdev,
>> 	if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
>> 		return -EFAULT;
>> +	if (hw->mac.type == e1000_i210 && eeprom->offset == 0) {
>> +		if (!is_valid_ether_addr(bytes)) {
>> +			dev_err(&adapter->pdev->dev, "Invalid MAC Address for i210\n");
>> +			return -EINVAL;
>> +		}
>> +	}
>> +
>> 	max_len = hw->nvm.word_size * 2;
>> 	first_word = eeprom->offset >> 1;
> 
> 
> Kind regards,
> 
> Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ