Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1004607ybp; Fri, 11 Oct 2019 07:40:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaH/A06s3/yUkmNcuViASvdoBkHekX73NO9mk5+t4og2ronKhGo0kbpTfBLMDIBWaNpiQw X-Received: by 2002:aa7:d888:: with SMTP id u8mr13468847edq.144.1570804819032; Fri, 11 Oct 2019 07:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570804819; cv=none; d=google.com; s=arc-20160816; b=sb3J+j50YxPyUxtTgabyh4Qap3XbJ5R+uF5JmwffbkNRrPmFuV/wpMpj4c72pIRvzm wYinuVeshI++IKdL9fqurDtwYCN5M5VDUhKMYpt7vTAwjOi6dlFUlVFxLeqmfCU54IeO rx5/XH9gXnSZTugNbtEkFelQDznkfAlBxGQjJYiZBuW5xtc7Y3boQ/loi4wYuWzlfY3R mDck2d1Gu9GJ9ookxK1x3DhlJwnTapv29V90r4TeV3aXcb2P2iAlWxeNpZeVjibkKEXU SlQ33gynSZhmG92vx78ndqNO5+FT8/IqzkKu+5Dbz3D8cQvKxJ31RcBcd3i/wfizGQvN iVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=liQbAgHSmXMDz2MwPXfH9RoWMwZsEiL9QVC3TV8t25k=; b=S2TfuisvJ+yq1aK+txcWJ+EPhM8a2MfgL/3iX2033kojGIjhUDl1sTVl4tisCLEIwQ oQ56qWNFKtgNE3MAlGU0qzO97hOUf4eYchtH+1f2IVLlLBOnqNWtcXUlJMWE325KObph GCkeYDMG21ETalVLKAQKr1VbBhT6gVDBBVLzeyzQzCWtGgZ9XeYCzHfEpyk8wryaZ927 MzQMubJa2nNJzkSY9vd2CES7IpKcrauUHSKBed5yae0cZJ/oiSTfmu+XRSAoXs8zUBW0 wON6x9GNvmI+2X28PpHdG0GYsZzzyGMCeJJp5CM8aa8SHeCMt5iogBH91Bh6M1z7qnw5 iClw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si6503466edf.283.2019.10.11.07.39.54; Fri, 11 Oct 2019 07:40:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726828AbfJKOjf (ORCPT + 99 others); Fri, 11 Oct 2019 10:39:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43582 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbfJKOje (ORCPT ); Fri, 11 Oct 2019 10:39:34 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BFD2C01FBD9 for ; Fri, 11 Oct 2019 14:39:34 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id c188so2861924wmd.9 for ; Fri, 11 Oct 2019 07:39:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=liQbAgHSmXMDz2MwPXfH9RoWMwZsEiL9QVC3TV8t25k=; b=ScK6gM3hiL6QAo/BBLSvnRxxUxusAJAeLNyXex0jJ/O4UwgIXyUBFCeGhOhp+XGeIX t1pe6F/5NbjJgphjlcZRKw7SatWQlJyYmHv1dA4h++FLkULd201Xb2p9kGa7BS/AKtsB ngC3ZcWVi4jGX3h9r1Y6D0/EzrX0TeqnM2oCaGsdYyxreT9xgjeuiWVxCklRbMb9qmgo V/VMiECJzqhTQCwogaTJr6STJykGLIsgVyaktjUgOYGKMQKRfFCAqjDOKt8CsgVs/YaS u1Oki1eFsSQLjDCBX4pq890r/9cuo7ouuTq0oDr1g3lm9rBGBsYN+fh5k5vzAO5PL1lX QlGg== X-Gm-Message-State: APjAAAUXSiGKruc6y1R+X1Ki6UuYkjiuPeNs9gpaEFQQsONg1cJbE0w9 qbh0w6psUWu2YQWZV0l6rj15A28o/VnFwyM20LBQURsw4XauVW0nHH2s9zqnKh+QPOLlMxY40Vz ZMl0C69s4KPB6sHemWNebRIzI X-Received: by 2002:a5d:6984:: with SMTP id g4mr13566586wru.43.1570804773107; Fri, 11 Oct 2019 07:39:33 -0700 (PDT) X-Received: by 2002:a5d:6984:: with SMTP id g4mr13566561wru.43.1570804772906; Fri, 11 Oct 2019 07:39:32 -0700 (PDT) Received: from steredhat (host174-200-dynamic.52-79-r.retail.telecomitalia.it. [79.52.200.174]) by smtp.gmail.com with ESMTPSA id u25sm9661696wml.4.2019.10.11.07.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 07:39:32 -0700 (PDT) Date: Fri, 11 Oct 2019 16:39:30 +0200 From: Stefano Garzarella To: "Michael S. Tsirkin" Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, Jorgen Hansen , "David S. Miller" , Stefan Hajnoczi , Adit Ranadive , Jason Wang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 2/2] vhost/vsock: don't allow half-closed socket in the host Message-ID: <20191011143930.hs2pkz5i2bci7igs@steredhat> References: <20191011130758.22134-1-sgarzare@redhat.com> <20191011130758.22134-3-sgarzare@redhat.com> <20191011102246-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191011102246-mutt-send-email-mst@kernel.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 11, 2019 at 10:26:34AM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 11, 2019 at 03:07:58PM +0200, Stefano Garzarella wrote: > > vmci_transport never allowed half-closed socket on the host side. > > In order to provide the same behaviour, we changed the > > vhost_transport_stream_has_data() to return 0 (no data available) > > if the peer (guest) closed the connection. > > > > Signed-off-by: Stefano Garzarella > > I don't think we should copy bugs like this. > Applications don't actually depend on this VMCI limitation, in fact > it looks like a working application can get broken by this. > > So this looks like a userspace visible ABI change > which we can't really do. > > If it turns out some application cares, it can always > fully close the connection. Or add an ioctl so the application > can find out whether half close works. > I got your point. Discard this patch. Thanks, Stefano