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] [day] [month] [year] [list]
Date:	Sat, 05 Dec 2009 14:32:55 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	"kirjanov@...il.com"@sunset.davemloft.net.davemloft.net,
	kirjanov@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net: Modify return value for the .ndo_set_mac_address

From: "Denis Kirjanov <kirjanov@...il.com" <kirjanov@...il.com>
Date: Sat, 5 Dec 2009 22:29:26 +0300

> On Fri, Dec 04, 2009 at 13:30 -0800, David Miller wrote:
>> From: "Denis Kirjanov <kirjanov@...il.com" <kirjanov@...il.com>
>> Date: Fri, 4 Dec 2009 14:47:22 +0300
>> 
>> > Return -EADDRNOTAVAIL insted of -EINVAL in .ndo_set_mac_address.
>> > 
>> > Signed-off-by: Denis Kirjanov <kirjanov@...il.com>
>> 
>> Why?
>> 
>> The address is "invalid" so we return "invalid" error.
>> 
>> What's the problem?
>> 
>> And whether there is a good reason or not, your commit message did not
>> describe that reason so needs to be updated.

Will you please talk to me instead of just responding in the
commit message itself?  I want to have a real conversation about
this.

> Some drivers in drivers/net return -EINVAL in .ndo_set_mac_address,
> but some -EADDRNOTAVAIL. Thus, we use
> "Cannot assign requested address" in the case of setting up new hw address
> to be more consistent across drivers/net in
> .ndo_set_mac_address function.

This doesn't by itself make EADDRNOTAVAIL a better choice.

If you look elsewhere, this error code is used in cases where
tries to use  an address is not configured on a device or a
socket.

This is different than the usage you are trying to make the
tree use consistently here.

I still think -EINVAL makes more sense.

Yes it is a problem that UNIX lacks more verbose and precise error
code specifications, but that itself should be attacked as a problem
rather than used as a reason to choose EADDRNOTAVAIL as an
error code here.

I'm not applying your patches, I do not agree with your reasoning.
I still think -EINVAL is better, and therefore you still need to
respin your other patch.

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