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]
Date:   Thu, 21 Sep 2017 14:28:53 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Stefano Stabellini <sstabellini@...nel.org>,
        xen-devel@...ts.xen.org
Cc:     linux-kernel@...r.kernel.org, jgross@...e.com,
        Stefano Stabellini <stefano@...reto.com>
Subject: Re: [PATCH v4 05/13] xen/pvcalls: implement connect command



On 09/15/2017 07:00 PM, Stefano Stabellini wrote:
> Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for
> the active socket.
> 
> Introduce fields in struct sock_mapping to keep track of active sockets.
> Introduce a waitqueue to allow the frontend to wait on data coming from
> the backend on the active socket (recvmsg command).
> 
> Two mutexes (one of reads and one for writes) will be used to protect
> the active socket in and out rings from concurrent accesses.
> 
> Signed-off-by: Stefano Stabellini <stefano@...reto.com>

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>

with a couple of nits below and comments from previous patch applicable 
here.


> +	bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
> +					PVCALLS_RING_ORDER);

I don't think the cast is needed.


> +	map = (struct sock_mapping *) sock->sk->sk_send_head;

Space between cast and variable.

 > +	req = RING_GET_REQUEST(&bedata->ring, req_id);
 > +	req->req_id = req_id;
 > +	req->cmd = PVCALLS_CONNECT;
 > +	req->u.connect.id = (uint64_t)map;
 > +	memcpy(req->u.connect.addr, addr, sizeof(*addr));

Move this down (I don't think there are any dependencies)

 > +	req->u.connect.len = addr_len;
 > +	req->u.connect.flags = flags;
 > +	req->u.connect.ref = map->active.ref;
 > +	req->u.connect.evtchn = evtchn;
 > +


-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ