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]
Message-ID: <20220316194614.3e38cadc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 16 Mar 2022 19:46:14 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Kuniyuki Iwashima <kuniyu@...zon.co.jp>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Rao Shoaib <Rao.Shoaib@...cle.com>,
        Kuniyuki Iwashima <kuni1840@...il.com>,
        <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net 2/2] af_unix: Support POLLPRI for OOB.

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. 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ