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]
Message-ID: <2134f66e-057b-ac49-25eb-4f0904fa8240@huawei.com>
Date:   Mon, 11 Apr 2022 16:01:12 +0800
From:   "wangjie (L)" <wangjie125@...wei.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Guangbin Huang <huangguangbin2@...wei.com>
CC:     <davem@...emloft.net>, <pabeni@...hat.com>, <mkubecek@...e.cz>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <lipeng321@...wei.com>, <chenhao288@...ilicon.com>
Subject: Re: [PATCH net-next 2/3] net: ethtool: move checks before rtnl_lock()
 in ethnl_set_rings



On 2022/4/9 5:58, Jakub Kicinski wrote:
> On Fri, 8 Apr 2022 15:12:44 +0800 Guangbin Huang wrote:
>> +	if (tb[ETHTOOL_A_RINGS_RX_BUF_LEN] &&
>> +	    nla_get_u32(tb[ETHTOOL_A_RINGS_RX_BUF_LEN]) != 0 &&
>
> I think we can drop the value checking. If attribute is present and
> drivers doesn't support - reject. I don't think that would require
> any changes to existing user space but please double check.
>
I have checked user space code and tested the delete version on my 
server, these value checking will be dropped in v2.
>> +	    !(ops->supported_ring_params & ETHTOOL_RING_USE_RX_BUF_LEN)) {
>> +		ret = -EOPNOTSUPP;
>> +		NL_SET_ERR_MSG_ATTR(info->extack,
>> +				    tb[ETHTOOL_A_RINGS_RX_BUF_LEN],
>> +				    "setting rx buf len not supported");
>> +		goto out_dev;
>> +	}
>> +
>> +	if (tb[ETHTOOL_A_RINGS_CQE_SIZE] &&
>> +	    nla_get_u32(tb[ETHTOOL_A_RINGS_CQE_SIZE]) &&
>> +	    !(ops->supported_ring_params & ETHTOOL_RING_USE_CQE_SIZE)) {
>> +		ret = -EOPNOTSUPP;
>> +		NL_SET_ERR_MSG_ATTR(info->extack,
>> +				    tb[ETHTOOL_A_RINGS_CQE_SIZE],
>> +				    "setting cqe size not supported");
>> +		goto out_dev;
>> +	}
>
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ