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: <728EC7B8-4187-48AC-9FA5-EC757B72FAAF@vmware.com>
Date:   Thu, 30 Mar 2023 21:40:55 +0000
From:   Vishnu Dasa <vdasa@...are.com>
To:     Arseniy Krasnov <AVKrasnov@...rdevices.ru>
CC:     Stefan Hajnoczi <stefanha@...hat.com>,
        Stefano Garzarella <sgarzare@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Bobby Eshleman <bobby.eshleman@...edance.com>,
        Bryan Tan <bryantan@...are.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel@...rdevices.ru" <kernel@...rdevices.ru>,
        "oxffffaa@...il.com" <oxffffaa@...il.com>,
        Pv-drivers <Pv-drivers@...are.com>
Subject: Re: [RFC PATCH v3 1/4] vsock/vmci: convert VMCI error code to -ENOMEM
 on send



> On Mar 30, 2023, at 1:12 PM, Arseniy Krasnov <AVKrasnov@...rdevices.ru> wrote:
> 
> !! External Email
> 
> This adds conversion of VMCI specific error code to general -ENOMEM. It
> is needed, because af_vsock.c passes error value returned from transport
> to the user, which does not expect to get VMCI_ERROR_* values.
> 
> Fixes: c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")
> Signed-off-by: Arseniy Krasnov <AVKrasnov@...rdevices.ru>

Thanks, looks good to me.

Reviewed-by: Vishnu Dasa <vdasa@...are.com>

> ---
> net/vmw_vsock/vmci_transport.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
> index 36eb16a40745..95cc4d79ba29 100644
> --- a/net/vmw_vsock/vmci_transport.c
> +++ b/net/vmw_vsock/vmci_transport.c
> @@ -1842,7 +1842,13 @@ static ssize_t vmci_transport_stream_enqueue(
>        struct msghdr *msg,
>        size_t len)
> {
> -       return vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
> +       ssize_t err;
> +
> +       err = vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
> +       if (err < 0)
> +               err = -ENOMEM;
> +
> +       return err;
> }
> 
> static s64 vmci_transport_stream_has_data(struct vsock_sock *vsk)
> --
> 2.25.1
> 
> !! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ