Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4275417pxb; Mon, 8 Feb 2021 12:10:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHqBQtKUfWzcEScHKRtjDDE9mNPsBaFVOQa2qzUjUvv/scSeyd5qPDsStS9Xu9+5gUQumS X-Received: by 2002:adf:f1d1:: with SMTP id z17mr3207679wro.67.1612815045495; Mon, 08 Feb 2021 12:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612815045; cv=none; d=google.com; s=arc-20160816; b=f0Dk9AaivaNTQHJRnlxu+IyIY3Eo5LaJqZGyhz1TJ0yiLixNG8W5F95GoHMyNKdRqe UpGju2J7tqPsGIqWkayXxU7k9mtfjwQNkXfGOgMROCNIakhBMoKwC7Pl0CjthB7BqQ9S ael/lSW/q0GxrCfX3zaEPK9MDjH+ZvQBrqMAI/EJjecRJK75/Pbi04wu57UqF+y0wKb4 CVHGty3Jc7pnHQKYUsWCaPzwQFEgPrNr6DJmJVnfSDSANP8ntYz6wkXGPzQ2DQQjx9OJ oWMBBvu8sXOH2kouze5GLI9R0CohsNA4wKNDgcG32SpyPsd/sKYEsOUK6INn6q1F8lC1 pyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zsGQUeCVE+9P7aNp54v7uYNj84EfUFjIYL1mjfYFnhM=; b=RVkCVUiojJ5MnipS62avNtWK3HpjUfHtme84PIMOkGCb1VIn03itoTuvb9kMQt6wJQ yutmy7ZsK51mXm51LeijdVJheomigTPdGdsjhwIm7TZ0rW7o/Tlj2CxFOXBzK2PFbxR3 gBXLhJ4N+GgcisQ42v1C2HdT5Kc/JqevRTpp8Bz5Ihq5F/dOeKY7xKCyCPcvGoC3FYCG zfcy76sbsLsVFy6JY5++U7H7xH2vkyuCnWAHuTI7yOYpkjiuli4UwsD5CVuL5GMKO39y O8Al33kfojdNHH0vrNY27JL5sy7lHIOuiAKY4td+Z4nLAWw7WhRrsxENrsBidpJeAAM4 KSQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=FVZOhOlO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w29si15263347edl.2.2021.02.08.12.10.20; Mon, 08 Feb 2021 12:10:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=FVZOhOlO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234506AbhBHUJb (ORCPT + 99 others); Mon, 8 Feb 2021 15:09:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231529AbhBHSeb (ORCPT ); Mon, 8 Feb 2021 13:34:31 -0500 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD4AC06178B for ; Mon, 8 Feb 2021 10:33:50 -0800 (PST) Received: by mail-qt1-x835.google.com with SMTP id w20so11062143qta.0 for ; Mon, 08 Feb 2021 10:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zsGQUeCVE+9P7aNp54v7uYNj84EfUFjIYL1mjfYFnhM=; b=FVZOhOlO1m/ZSXYxWqQ3/Ohq3Wp/tvRDC8GTvP+9bSnDEiozixF3Jhu580CVCPRbPm HJk4/2MMunffgKDn9bqK046yfyDvCxzIoA7T9EVtyNZfNB349GjItsMZSxgoMAhgi9KK nGadbvWT0KrcPvYiuq0YMFcdBLGx2QWttauttC9CmU/yQLFXG/FJzLeOF3qlZ6ifMM/6 cG0R8kzOetckivQvI1vkoOdcGpp0+q8eD+xtEdsggBY1OP0qQ8kRpli+JjTQL4jj+cJE pYd3v7VG89h1Pnv0+WhajdC+jmuARDnJ7f5CKBccsE/96SEKVSqegmKaKZUt1ONCwfOI 3mqQ== 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=zsGQUeCVE+9P7aNp54v7uYNj84EfUFjIYL1mjfYFnhM=; b=jLDZ6vwlaLMndmKIO4cSuqvAX2HDGoW1STMcnw2sqRoJ+UehBCeqSWrb6dZcsypZkq S04Apwe7HHXBYrWqt/LEbImyb10z/J1gTPmX4IglG06+lBKDYSfPdDcKn9Kbc/mh7hrV urJ+DVPHWmzu3OLANcnrp1kKt7uDx4yIZdI1y9kHqd6O8fgws7IpFXgRangE8gwXgIBv Ma7zvxEboIJ+5tkOafLVa7jGyn8uWHo8pRfJwcUQYdFVNszsp5Qcyis3hQkmNHJGGJdg FuyQJW0RS0qwPkhPkdqXBBAJcT5u+683T2xT0QTrahjZ18Ccv6X7qhVe2e9UuEI30jtD Z+0g== X-Gm-Message-State: AOAM533kD1FIOA6qVfkHN+7C+P9gEkZ+UYrWC3XV1lmwTbVsWpq32CxF 241DWXeGYCalruG1sAV4d1DC3vuKGXVYBLdP X-Received: by 2002:aed:38e3:: with SMTP id k90mr16286292qte.119.1612809230040; Mon, 08 Feb 2021 10:33:50 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id p18sm16809839qkj.130.2021.02.08.10.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 10:33:49 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1l9BM4-005254-G1; Mon, 08 Feb 2021 14:33:48 -0400 Date: Mon, 8 Feb 2021 14:33:48 -0400 From: Jason Gunthorpe To: David Hildenbrand Cc: Zhou Wang , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-api@vger.kernel.org, Andrew Morton , Alexander Viro , gregkh@linuxfoundation.org, song.bao.hua@hisilicon.com, kevin.tian@intel.com, jean-philippe@linaro.org, eric.auger@redhat.com, liguozhu@hisilicon.com, zhangfei.gao@linaro.org, Sihang Chen Subject: Re: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin Message-ID: <20210208183348.GV4718@ziepe.ca> References: <1612685884-19514-1-git-send-email-wangzhou1@hisilicon.com> <1612685884-19514-2-git-send-email-wangzhou1@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 09:14:28AM +0100, David Hildenbrand wrote: > People are constantly struggling with the effects of long term pinnings > under user space control, like we already have with vfio and RDMA. > > And here we are, adding yet another, easier way to mess with core MM in the > same way. This feels like a step backwards to me. Yes, this seems like a very poor candidate to be a system call in this format. Much too narrow, poorly specified, and possibly security implications to allow any process whatsoever to pin memory. I keep encouraging people to explore a standard shared SVA interface that can cover all these topics (and no, uaccel is not that interface), that seems much more natural. I still haven't seen an explanation why DMA is so special here, migration and so forth jitter the CPU too, environments that care about jitter have to turn this stuff off. Jason