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, 27 Nov 2017 09:08:01 -0700
From:   David Ahern <dsa@...ulusnetworks.com>
To:     Arkadi Sharshevsky <arkadis@...lanox.com>,
        Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, mlxsw@...lanox.com, andrew@...n.ch,
        vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
        michael.chan@...adcom.com, ganeshgr@...lsio.com,
        saeedm@...lanox.com, matanb@...lanox.com, leonro@...lanox.com,
        idosch@...lanox.com, jakub.kicinski@...ronome.com, ast@...nel.org,
        daniel@...earbox.net, simon.horman@...ronome.com,
        pieter.jansenvanvuuren@...ronome.com, john.hurley@...ronome.com,
        alexander.h.duyck@...el.com, linville@...driver.com,
        gospo@...adcom.com, steven.lin1@...adcom.com, yuvalm@...lanox.com,
        ogerlitz@...lanox.com, roopa@...ulusnetworks.com
Subject: Re: [patch net-next RFC v2 02/11] devlink: Add support for resource
 abstraction

On 11/23/17 5:25 AM, Arkadi Sharshevsky wrote:
> [...]
>>>>> +
>>>>> +	resource = devlink_resource_find(devlink, NULL, resource_id);
>>>>> +	if (!resource)
>>>>> +		return -EINVAL;
>>>>> +
>>>>> +	if (!resource->resource_ops->size_validate)
>>>>> +		return -EINVAL;
>>>>
>>>> genl_info has extack; please add user messages for the above failures.
>>>>
>>>
>>> Isn't EOPNOTSUPP enough ?
>>
>> No, I mean every failure above returns EINVAL. Add an extack message
>> telling the user what is wrong. e.g,
>>
>> 	resource = devlink_resource_find(devlink, NULL, resource_id);
>> 	if (!resource) {
>> 		NL_SET_ERR_MSG(extack, "Invalid resource id");
>> 		return -EINVAL;
>> 	}
>>
>> similarly for the rest.
>>
> 
> I don't understand why actually, extended ack should be used when
> typical errno is not enough, for example something driver specific
> like "KVD overlapping is not supported".
> 
> But here if the user provided id for setting the resource, I think
> EINVAL is enough if devlink cannot find it.
> 

EINVAL is returned in multiple places, so an EINVAL response does not
uniquely tell you the problem.

Further, we have infrastructure to give users explicit text on why the
request fails. Let's use it and make Linux more user friendly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ