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: <7bc7a054-f180-444a-aac0-61997b43e5d6@huawei.com>
Date: Wed, 21 Aug 2024 14:04:01 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <shaojijie@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<pabeni@...hat.com>, <shenjian15@...wei.com>, <wangpeiyang1@...wei.com>,
	<liuyonglong@...wei.com>, <sudongming1@...wei.com>, <xujunsheng@...wei.com>,
	<shiyongbang@...wei.com>, <libaihan@...wei.com>, <andrew@...n.ch>,
	<jdamato@...tly.com>, <horms@...nel.org>, <jonathan.cameron@...wei.com>,
	<shameerali.kolothum.thodi@...wei.com>, <salil.mehta@...wei.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 net-next 11/11] net: add is_valid_ether_addr check in
 dev_set_mac_address


on 2024/8/21 9:55, Jakub Kicinski wrote:
> On Tue, 20 Aug 2024 22:01:54 +0800 Jijie Shao wrote:
>> core need test the mac_addr not every driver need to do.
>>
>> Signed-off-by: Jijie Shao <shaojijie@...wei.com>
>> ---
>>   net/core/dev.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index e7260889d4cb..2e19712184bc 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -9087,6 +9087,8 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
>>   		return -EOPNOTSUPP;
>>   	if (sa->sa_family != dev->type)
>>   		return -EINVAL;
>> +	if (!is_valid_ether_addr(sa->sa_data))
>> +		return -EADDRNOTAVAIL;
> not every netdev is for an Ethernet device

ok, this patch will be removed in v3.
and the check will move to hibmcge driver.
Thanks a lot.
	
	Jijie Shao



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ