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: <f790ca57-cec9-4884-c8e5-bf8806364dd7@yandex.ru>
Date:   Mon, 4 Jan 2021 00:15:53 +0300
From:   stsp <stsp2@...dex.ru>
To:     Arseny Krasnov <arseny.krasnov@...persky.com>,
        Stefan Hajnoczi <stefanha@...hat.com>,
        Stefano Garzarella <sgarzare@...hat.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Andra Paraschiv <andraprs@...zon.com>,
        Jorgen Hansen <jhansen@...are.com>,
        Arseniy Krasnov <oxffffaa@...il.com>,
        Colin Ian King <colin.king@...onical.com>,
        Jeff Vander Stoep <jeffv@...gle.com>
Cc:     kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] af_vsock: add socket ops for SOCK_SEQPACKET.

03.01.2021 23:04, Arseny Krasnov пишет:
> From: Arseniy Krasnov <oxffffaa@...il.com>
>
> ---
>   net/vmw_vsock/af_vsock.c | 107 +++++++++++++++++++++++++++++++++------
>   1 file changed, 91 insertions(+), 16 deletions(-)
>
> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
> index 7ff00449a9a2..30caad9815f7 100644
> --- a/net/vmw_vsock/af_vsock.c
> +++ b/net/vmw_vsock/af_vsock.c
> @@ -452,6 +452,7 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)
>   		new_transport = transport_dgram;
>   		break;
>   	case SOCK_STREAM:
> +	case SOCK_SEQPACKET:
>   		if (vsock_use_local_transport(remote_cid))
>   			new_transport = transport_local;
>   		else if (remote_cid <= VMADDR_CID_HOST || !transport_h2g ||
> @@ -459,6 +460,12 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)
>   			new_transport = transport_g2h;
>   		else
>   			new_transport = transport_h2g;
> +
> +		if (sk->sk_type == SOCK_SEQPACKET) {
> +			if (!new_transport->seqpacket_seq_send_len ||
> +			    !new_transport->seqpacket_seq_get_len)
> +				return -ENODEV;

Is ENODEV the right error here?
Just a quick look at a man page, and
I am under impression something like
EPROTONOSUPPORT or ESOCKNOSUPPORT
may suit?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ