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:   Thu, 13 Apr 2023 11:14:01 +0200
From:   Stefano Garzarella <sgarzare@...hat.com>
To:     Arseniy Krasnov <avkrasnov@...rdevices.ru>
Cc:     "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>,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel@...rdevices.ru,
        oxffffaa@...il.com
Subject: Re: [RFC PATCH v1] vsock/loopback: don't disable irqs for queue
 access

On Sun, Apr 09, 2023 at 10:17:51PM +0300, Arseniy Krasnov wrote:
>This replaces 'skb_queue_tail()' with 'virtio_vsock_skb_queue_tail()'.
>The first one uses 'spin_lock_irqsave()', second uses 'spin_lock_bh()'.
>There is no need to disable interrupts in the loopback transport as
>there is no access to the queue with skbs from interrupt context. Both
>virtio and vhost transports work in the same way.

Yep, this is a good point!

>
>Signed-off-by: Arseniy Krasnov <AVKrasnov@...rdevices.ru>
>---
> net/vmw_vsock/vsock_loopback.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

LGTM! (net-next material)

Reviewed-by: Stefano Garzarella <sgarzare@...hat.com>

Thanks,
Stefano

>
>diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
>index e3afc0c866f5..5c6360df1f31 100644
>--- a/net/vmw_vsock/vsock_loopback.c
>+++ b/net/vmw_vsock/vsock_loopback.c
>@@ -31,8 +31,7 @@ static int vsock_loopback_send_pkt(struct sk_buff *skb)
> 	struct vsock_loopback *vsock = &the_vsock_loopback;
> 	int len = skb->len;
>
>-	skb_queue_tail(&vsock->pkt_queue, skb);
>-
>+	virtio_vsock_skb_queue_tail(&vsock->pkt_queue, skb);
> 	queue_work(vsock->workqueue, &vsock->pkt_work);
>
> 	return len;
>-- 
>2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ