Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp981237ybp; Fri, 11 Oct 2019 07:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2NOIi0BZyskWMCQW+ecH7oCIBTvgdB4B4k8oU/V07Z7eAsYKRNeVCvbe2rJxdcyM6bwGD X-Received: by 2002:aa7:cb58:: with SMTP id w24mr13815355edt.158.1570803653665; Fri, 11 Oct 2019 07:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570803653; cv=none; d=google.com; s=arc-20160816; b=DwSz9rNqolVRQmnPKeoQ9UaqwlmgbkiK4RJbXsoCUQSzin232YXWJeRXLcNy8NHzhe GNrpKE2kT8HedC38gB9Rf6Pnj5BmJjYAJYjQDwgibjdBm+Y5q6cQo9vnbpk/EKOuVLcS +aglKS6po/CuTKftIu32LrSvlwWoDIcHTOcpWLhScVgkMM/vnizNa16TDfajNGBuIA0B gtkl/L8cPBDC5xOwHH06QXCU4Z+Lt2MPNtBe1OGCbmlu19kXuyJG6U/5kFDSFXT2eqtZ EXyOYLCyt2QKGtXWcK/v5rJ194iKEBuB6tTkxsecG59oZ7vZ8kSDXK3O2nrjb9iozHfR fOHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tOHWk3jmfyzzhm92cDghOddICmz8kRnulovjwgtaBGg=; b=nAlC2f556bfRpq57VRVk01bQSTrQjeI9PNBDpEkKeMeulAzrdz3rEdRcbWGZzNN8Sg ZpsCcbpnsdO1hx5DG+74daktYfa2qoryMYLJvjtEbEdnuEq0D/U//87STkNcBz/7KaiR 7dhZiR1e4I0dM2lBfFDyY6BHeCHrpLM4Egk4mybe0AOH+EDtBtN2M9CDtc4F8VVKqUYk Et5qIl2fxO9L0OK3OYjqk4x9xGbFUCC5sgFBryFKVKm48oAwgSrksREv3OJZJrDaEaV3 YPTvZBVzihSRMI7Yltz01Wh3YgN2vtFXjM57hdp7RJ5jcJwEfoBoVRVXFkakRM95Ix+V ImEA== 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 d5si5164437edq.60.2019.10.11.07.20.29; Fri, 11 Oct 2019 07:20:53 -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 S1728414AbfJKOTV (ORCPT + 99 others); Fri, 11 Oct 2019 10:19:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46624 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728138AbfJKOTU (ORCPT ); Fri, 11 Oct 2019 10:19:20 -0400 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (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 6B1AC80F83 for ; Fri, 11 Oct 2019 14:19:20 +0000 (UTC) Received: by mail-qt1-f197.google.com with SMTP id d6so9595305qtn.2 for ; Fri, 11 Oct 2019 07:19:20 -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; bh=tOHWk3jmfyzzhm92cDghOddICmz8kRnulovjwgtaBGg=; b=qr9385BrYAVqydR8vfLgJqV3ZadKaxH924rJL0MWfZymVPy+lUNtkF1hFNzWX3lo+I mclPtPGuZsyb2BreB0s3JrXkZXKyi07BVZCYEOU4hpQsdR0ZLJQqnq/rtxfWWMPExn/o dcgMiSaM+/hybZUSCkn6VYf5IZC94jLZbYFynZvWgNgprCwH2Q+0TGX8zPR8NCOk2B0F YbVmfQhKIQXhBpS1tJLNNfkLegBpKEWxTp1m4T5F+L27Sx1tI0UAhM60H6yGLT0p/gK8 U5yUTAbQz4LzFMtqv4aAOoLmHHrHINsgv3LLbtQGFtbk/0KTFSRkhGNptbFYXMCz0HnP intw== X-Gm-Message-State: APjAAAX1e0HuWXSegodtX2KuCD3j83MD7/ZNiw7XLVG8HiXf7nAAJsXX T7mI/3ZFHFREy3GnzYIeRNyTtIKTSPddj3whKBB9/GxzcAXE9Ffz7gWL15jlRdnyo5+XFVIEq18 r0KeJCRhw83ZzeEA24pdpTmTk X-Received: by 2002:a37:5d3:: with SMTP id 202mr15754096qkf.155.1570803559736; Fri, 11 Oct 2019 07:19:19 -0700 (PDT) X-Received: by 2002:a37:5d3:: with SMTP id 202mr15754075qkf.155.1570803559502; Fri, 11 Oct 2019 07:19:19 -0700 (PDT) Received: from redhat.com (bzq-79-176-10-77.red.bezeqint.net. [79.176.10.77]) by smtp.gmail.com with ESMTPSA id s16sm3621356qkg.40.2019.10.11.07.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 07:19:18 -0700 (PDT) Date: Fri, 11 Oct 2019 10:19:13 -0400 From: "Michael S. Tsirkin" To: Stefano Garzarella 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 0/2] vsock: don't allow half-closed socket in the host transports Message-ID: <20191011101408-mutt-send-email-mst@kernel.org> References: <20191011130758.22134-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191011130758.22134-1-sgarzare@redhat.com> 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 03:07:56PM +0200, Stefano Garzarella wrote: > We are implementing a test suite for the VSOCK sockets and we discovered > that vmci_transport never allowed half-closed socket on the host side. > > As Jorgen explained [1] this is due to the implementation of VMCI. > > Since we want to have the same behaviour across all transports, this > series adds a section in the "Implementation notes" to exaplain this > behaviour, and changes the vhost_transport to behave the same way. > > [1] https://patchwork.ozlabs.org/cover/847998/#1831400 Half closed sockets are very useful, and lots of applications use tricks to swap a vsock for a tcp socket, which might as a result break. If VMCI really cares it can implement an ioctl to allow applications to detect that half closed sockets aren't supported. It does not look like VMCI wants to bother (users do not read kernel implementation notes) so it does not really care. So why do we want to cripple other transports intentionally? > Stefano Garzarella (2): > vsock: add half-closed socket details in the implementation notes > vhost/vsock: don't allow half-closed socket in the host > > drivers/vhost/vsock.c | 17 ++++++++++++++++- > net/vmw_vsock/af_vsock.c | 4 ++++ > 2 files changed, 20 insertions(+), 1 deletion(-) > > -- > 2.21.0