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:   Thu, 17 Mar 2022 11:56:43 +0900
From:   Kuniyuki Iwashima <kuniyu@...zon.co.jp>
To:     <kuba@...nel.org>
CC:     <Rao.Shoaib@...cle.com>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <kuni1840@...il.com>, <kuniyu@...zon.co.jp>,
        <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net 2/2] af_unix: Support POLLPRI for OOB.

From:   Jakub Kicinski <kuba@...nel.org>
Date:   Wed, 16 Mar 2022 19:46:14 -0700
> On Wed, 16 Mar 2022 03:38:55 +0900 Kuniyuki Iwashima wrote:
>> The commit 314001f0bf92 ("af_unix: Add OOB support") introduced OOB for
>> AF_UNIX, but it lacks some changes for POLLPRI.  Let's add the missing
>> piece.
>> 
>> In the selftest, normal datagrams are sent followed by OOB data, so this
>> commit replaces `POLLIN | POLLPRI` with just `POLLPRI` in the first test
>> case.
>> 
>> Fixes: 314001f0bf92 ("af_unix: Add OOB support")
>> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.co.jp>
> 
>> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
>> index 0c37e5595aae..f94afaa5a696 100644
>> --- a/net/unix/af_unix.c
>> +++ b/net/unix/af_unix.c
>> @@ -2049,7 +2049,7 @@ static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
>>   */
>>  #define UNIX_SKB_FRAGS_SZ (PAGE_SIZE << get_order(32768))
>>  
>> -#if (IS_ENABLED(CONFIG_AF_UNIX_OOB))
>> +#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
>>  static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other)
>>  {
>>  	struct unix_sock *ousk = unix_sk(other);
>> @@ -2115,7 +2115,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>>  
>>  	err = -EOPNOTSUPP;
>>  	if (msg->msg_flags & MSG_OOB) {
>> -#if (IS_ENABLED(CONFIG_AF_UNIX_OOB))
>> +#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
>>  		if (len)
>>  			len--;
>>  		else
>> @@ -2186,7 +2186,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>>  		sent += size;
>>  	}
>>  
>> -#if (IS_ENABLED(CONFIG_AF_UNIX_OOB))
>> +#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
>>  	if (msg->msg_flags & MSG_OOB) {
>>  		err = queue_oob(sock, msg, other);
>>  		if (err)
> 
> If we want to keep this change structured as a fix and backported we
> should avoid making unnecessary changes. Fixes need to be minimal
> as per stable rules.

Exactly, I should have taken care of that more.
I'll will keep this in mind.
Sorry for bothering and thank you!


> 
> Could you make removal of the brackets a patch separate from this
> series and targeted at net-next?

Sure, I will submit v4 and separate one soon.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ