Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5522276imb; Thu, 7 Mar 2019 18:21:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyH0N8fFzoRCRjQluEpOgPROS/SpHGwGYCWouIiG+mq5Vo46JpjXve2Cql0tMolEh8HTG/S X-Received: by 2002:a17:902:87:: with SMTP id a7mr16200824pla.295.1552011704913; Thu, 07 Mar 2019 18:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552011704; cv=none; d=google.com; s=arc-20160816; b=srnwNgJ4b9LcQ6NG7O5sJAOxhKRjucbdc209+/KrOYWMU82RFaiXA59xSIQG8ChoXp YW5WyWwoudY0SctOe8vkah1vQTp2x7cPDxQyFvNSZryHkGIpO85P8bBn+ROn/mGBYxVU RH/zjYjz0ZR7vRcBYFGiaSNdXL0XSmuZ1Rb7LHg0MIbziu+oft91GmejewmzKCyiNX3u RG7fH8mao/PJDNl27sB0QnTn2Wn9T1KATVAUq7RXKOj+pOXp0SiGkpSUU5wcKynD9+Z5 VX6itHdZUW9wmFyZ22glQnrHTWP9EfN00k7vpclgrQRJoXWhXijmPucHbl/MU5t4zLs8 2nFQ== 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=2TXa20qb/Eg4W3WSZnBQT88vOwNyfmVbxryiRAAOMZ0=; b=0IiBLT/oXeMRf+3M60VumDxvZomOMTi/43SXsXnBK6d2UNpf2JHEuNJlwS4ysEfNBj Q9uqdTKcliAuWbD3muy53xugk1mfHF0klyfxdvyQ0pAGZFWjzvysHsAgTvDegCtNiYnZ gGiyjqxVaEhi1vIkG210TNXWsL3NUwi+blDwwVz8Oh5sqwU46BjctR5UsxrSm1mtHXcy b0GDcZN2bTSTO/nzbJ8kxoLZDk/YRRZpRmOybTjCX/X/EasXOMa0evV5McBM1wcFJsFM whHsfbsnff4UJlRw1Y4a2sTF54EZbOurbqBpq3u9otL0nWMC3goc/zL1u4GI2pFuk6Sy igtA== 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 u5si6188343plm.225.2019.03.07.18.21.29; Thu, 07 Mar 2019 18:21:44 -0800 (PST) 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 S1726338AbfCHCVH (ORCPT + 99 others); Thu, 7 Mar 2019 21:21:07 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:38914 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfCHCVH (ORCPT ); Thu, 7 Mar 2019 21:21:07 -0500 Received: by mail-qt1-f195.google.com with SMTP id o6so19649405qtk.6 for ; Thu, 07 Mar 2019 18:21:06 -0800 (PST) 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=2TXa20qb/Eg4W3WSZnBQT88vOwNyfmVbxryiRAAOMZ0=; b=SZnfZ+oACUO1kPtp+qimlj3MqLgUsSWosrl62RA3F133MVaDOsm2aXzHrFCblzEzvb VkZ7U17kk16L9EHIe1mCOBBEr8TtWEUNftRodabyNQzLPDhgXg3m4ckmDvyRgqymE+mY ZuDcsSTfVlOHGAL67SvYlY2GUo+ccVz0saT0UKXexMCvfdCpyzmJzv3brq2uqpoGZJQe hl/4rUtCGtL4RdQdqNBfy1OTle1EK0LeLPjG5IxZ7unJMD1Pt3XhTM5FQC5id+PgA8a9 Ms5CWlFT2hzB8xP/KWLsgrgaALkdneie9tbYcidLj06VciAsRBoL/3DjqlPEoJmHqohQ 71Kw== X-Gm-Message-State: APjAAAWEjBoCMYp6FpSbj1pE2m5udzrYzRULiGD0FU4coOwIZIJYhHRe yJptWMixqOBl8sr4vXP8+DgddA== X-Received: by 2002:a0c:a8d4:: with SMTP id h20mr13474604qvc.46.1552011666383; Thu, 07 Mar 2019 18:21:06 -0800 (PST) Received: from redhat.com (pool-173-76-246-42.bstnma.fios.verizon.net. [173.76.246.42]) by smtp.gmail.com with ESMTPSA id q57sm3931129qtj.79.2019.03.07.18.21.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Mar 2019 18:21:05 -0800 (PST) Date: Thu, 7 Mar 2019 21:21:03 -0500 From: "Michael S. Tsirkin" To: Jerome Glisse Cc: Jason Wang , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterx@redhat.com, linux-mm@kvack.org, aarcange@redhat.com Subject: Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address Message-ID: <20190307211506-mutt-send-email-mst@kernel.org> References: <1551856692-3384-1-git-send-email-jasowang@redhat.com> <1551856692-3384-6-git-send-email-jasowang@redhat.com> <20190307103503-mutt-send-email-mst@kernel.org> <20190307124700-mutt-send-email-mst@kernel.org> <20190307191720.GF3835@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190307191720.GF3835@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 02:17:20PM -0500, Jerome Glisse wrote: > > It's because of all these issues that I preferred just accessing > > userspace memory and handling faults. Unfortunately there does not > > appear to exist an API that whitelists a specific driver along the lines > > of "I checked this code for speculative info leaks, don't add barriers > > on data path please". > > Maybe it would be better to explore adding such helper then remapping > page into kernel address space ? I explored it a bit (see e.g. thread around: "__get_user slower than get_user") and I can tell you it's not trivial given the issue is around security. So in practice it does not seem fair to keep a significant optimization out of kernel because *maybe* we can do it differently even better :) -- MST