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:   Tue, 22 Mar 2022 20:21:14 +0100
From:   Oliver Hartkopp <socketcan@...tkopp.net>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH net-next v3] net: remove noblock parameter from
 skb_recv_datagram()



On 22.03.22 19:41, Jakub Kicinski wrote:
> On Tue, 22 Mar 2022 09:03:17 +0100 Oliver Hartkopp wrote:
>> skb_recv_datagram() has two parameters 'flags' and 'noblock' that are
>> merged inside skb_recv_datagram() by 'flags | (noblock ? MSG_DONTWAIT : 0)'
>>
>> As 'flags' may contain MSG_DONTWAIT as value most callers split the 'flags'
>> into 'flags' and 'noblock' with finally obsolete bit operations like this:
>>
>> skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, flags & MSG_DONTWAIT, &rc);
>>
>> And this is not even done consistently with the 'flags' parameter.
>>
>> This patch removes the obsolete and costly splitting into two parameters
>> and only performs bit operations when really needed on the caller side.
>>
>> One missing conversion thankfully reported by kernel test robot. I missed
>> to enable kunit tests to build the mctp code.
>>
>> Reported-by: kernel test robot <lkp@...el.com>
>> Signed-off-by: Oliver Hartkopp <socketcan@...tkopp.net>
> 
> Would it be a major inconvenience if I asked you to come back with this
> patch after the merge window? We were hoping to keep net-next closed
> for the time being. No new features should go in in the meantime so it's
> unlikely the patch itself would break.

Definitely no problem. Just had the idea for an improvement, when 
looking at my own code.

No urgent thing - so I will resend after the merge window.

Many thanks!

Oliver


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ