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, 18 May 2021 17:55:55 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Rao Shoaib <Rao.Shoaib@...cle.com>
Cc:     netdev@...r.kernel.org, kuba@...nel.org,
        linux-kernel@...r.kernel.org, davem@...emloft.net,
        matthew.wilcox@...cle.com
Subject: Re: [RFC net-next af_unix v1 1/1] net:af_unix: Allow unix sockets to
 raise SIGURG

On Tue, May 18, 2021 at 12:43:43AM -0700, Rao Shoaib wrote:
> From: Rao Shoaib <rao.shoaib@...cle.com>
> 
> TCP sockets allow SIGURG to be sent to the process holding the other
> end of the socket.  Extend Unix sockets to have the same ability.
> 
> The API is the same in that the sender uses sendmsg() with MSG_OOB to
> raise SIGURG.  Unix sockets behave in the same way as TCP sockets with
> SO_OOBINLINE set.
> 
> SIGURG is ignored by default, so applications which do not know about this
> feature will be unaffected.  In addition to installing a SIGURG handler,
> the receiving application must call F_SETOWN or F_SETOWN_EX to indicate
> which process or thread should receive the signal.
> 
> Signed-off-by: Rao Shoaib <rao.shoaib@...cle.com>
> Signed-off-by: Matthew Wilcox <matthew.wilcox@...cle.com>

Please don't forge my Signed-off-by.  With that line deleted,

Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>

> ---
>  net/unix/af_unix.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 5a31307ceb76..c8400c002882 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -1838,8 +1838,6 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>  		return err;
>  
>  	err = -EOPNOTSUPP;
> -	if (msg->msg_flags&MSG_OOB)
> -		goto out_err;
>  
>  	if (msg->msg_namelen) {
>  		err = sk->sk_state == TCP_ESTABLISHED ? -EISCONN : -EOPNOTSUPP;
> @@ -1904,6 +1902,9 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>  		sent += size;
>  	}
>  
> +	if (msg->msg_flags & MSG_OOB)
> +		sk_send_sigurg(other);
> +
>  	scm_destroy(&scm);
>  
>  	return sent;
> -- 
> 2.31.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ