Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4511492pxb; Tue, 25 Jan 2022 11:58:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsz4Hj15jRnhpmV5hXW5IPMIB3mGz6TvXAijzZTIZ4efdTw1lQV5GDkS+/5OP4KGmERX4J X-Received: by 2002:a50:e68c:: with SMTP id z12mr21927236edm.297.1643140707391; Tue, 25 Jan 2022 11:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643140707; cv=none; d=google.com; s=arc-20160816; b=m8vP7V035bmWlq8NR2eyajpyXrh7n4w7NOPMFTguw9CTguNwFed7ilEFwK0OkW9gBk vmDJr1DITX0xSPC5X9ULp4TiBycmPyjmAkwXXWE2KfQwW0qEo9mOUZtVLPWZqWekoyFH dAWWqEtIdSIrR+R/poLNPGaRtpJSu0K8i+CUVNDy9LYDLaezs06DiXF5FVpp/McCnmuI +XtHY2oA0Ve7Mo+giMnjambwzXq4DjGlWAVCDTPzSO0+WuqswpkZq0OzxE1ROGHDLVka uqdRg/+FF1prKyDkld+2oRwT+/1do/7QwQL+aHHl1oPFBsEnmAaOdobo2BXlxk17HiL1 +wcQ== 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=jCE3Q9w0pYZdgf9y0akmYzNqAp0U6bL6oFF7qLl/HS4=; b=MmcYvgApJvmK/iViUcCkg7B84/IcQAmnIhAOoOYk6v3OEts1WwYznZKMeCpIQYvU6l 3cC/fKjqHlXEvmsez2UKZH27gInnrXjEBdL45WvFyD2MKo/7YfK0KgyKoV8Axk5LM/Pk CQdQ2szQIoErazVOEry/Q7lRzgJbgGDtWinsBSScBqpdxJA1doXkzZQIP/r6Vixg2gwH UvHrWMcuTPVqFBvTQPjWSerkkrwCTwc6BRKz3/9ljaQuVVfsHnCWRQv2TFVhk0auF0XF 58i8Oo4oB37BKnhtbsJGGmLWbrVW+zyqGqeYtDqMECe7689KBg/Y+g9sqCSRtrIqphsJ oKFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=C80cnNOr; 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 p11si5125484edh.410.2022.01.25.11.58.02; Tue, 25 Jan 2022 11:58:27 -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=@shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=C80cnNOr; 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 S1449370AbiAYOES (ORCPT + 99 others); Tue, 25 Jan 2022 09:04:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234877AbiAYOAu (ORCPT ); Tue, 25 Jan 2022 09:00:50 -0500 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A6C0C06176C for ; Tue, 25 Jan 2022 06:00:45 -0800 (PST) Received: by mail-lj1-x22e.google.com with SMTP id a25so13035939lji.9 for ; Tue, 25 Jan 2022 06:00:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jCE3Q9w0pYZdgf9y0akmYzNqAp0U6bL6oFF7qLl/HS4=; b=C80cnNOrbC/ii20I5s7FIzvQcERCV/9osEmLgdRKjY/XGh8q+JbuYn32GnnFQx3eMi jXQ7fNrTUQiNOrOQP8vCSxGLBbV6gdmCNdmNNY/v7NsMW6d5gn60uBIAmJohvxc/yRM9 QcJiF+XA+Bvfj/vfqjJdk7ydzwymuvqknSTufiXApG7fxcyYKZNpeVM0uF1xWTT2A2c6 K2w/rHWss33ijX+OKtsYvnNU6U4vt4L8wnX4+NFYCIB/J+BoQd2gedaBwyF3YoHGqRd/ 9EAuggep4kxiP7jdPVGKUgzNe4FRemYsuZYyDy5ksk2zvTqra+D4ny0UGcry7OTnBYRH HB3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jCE3Q9w0pYZdgf9y0akmYzNqAp0U6bL6oFF7qLl/HS4=; b=TggXZ+tp2x/7uYMpT87AnA1BFyT8S9kt63r9knfLN6IxchcikR/y7oJBLet9uw/8MK SU/ekt/1gc6OksP4ZPnGGCgbW5XbhlqVzsgD1MuimIBw1TtIrsrwgMHhKArBnFS380Jg hwIR344QMN3Kb8cJCio2RfW33wlLFGCWuvwl1m93deX86SQd90i3+v7PEZVoaAEfnU6z O3Gqo7tfV/hhGgr2bZVVbRSBwIB7wb1duvoTeh22t8Ostx6RMz0vLTOAehr9OJ6hwhBp T0OyDXXnL46GXG254PnIRkFCOLnfxAL7umo9vwPI5y6IWsXXBfOj45ebib3LzbXXFMcI QCKg== X-Gm-Message-State: AOAM532wfAsgk7KlnRSrjlI055OnbbmXJjbKT4H61cCkRiloAeHg4FPI ew5RtIHjy3xsajG/vQm0FikyJA== X-Received: by 2002:a2e:878a:: with SMTP id n10mr3245940lji.400.1643119243345; Tue, 25 Jan 2022 06:00:43 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id u1sm1222580lfc.98.2022.01.25.06.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 06:00:42 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 21B16103C0E; Tue, 25 Jan 2022 17:01:16 +0300 (+03) Date: Tue, 25 Jan 2022 17:01:16 +0300 From: "Kirill A. Shutemov" To: David Hildenbrand Cc: William Kucharski , Khalid Aziz , akpm@linux-foundation.org, willy@infradead.org, longpeng2@huawei.com, arnd@arndb.de, dave.hansen@linux.intel.com, rppt@kernel.org, surenb@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 0/6] Add support for shared PTEs across processes Message-ID: <20220125140116.db2lg6qmwlpdbgcg@box.shutemov.name> References: <20220125114212.ks2qtncaahi6foan@box.shutemov.name> 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 Tue, Jan 25, 2022 at 02:18:57PM +0100, David Hildenbrand wrote: > On 25.01.22 13:09, William Kucharski wrote: > > I would think this should be the case; certainly it seems to be a more effective approach than having to manually enable sharing via the API in every case or via changes to ld.so. > > > > If anything it might be useful to have an API for shutting it off, though there are already multiple areas where the system shares resources in ways that cannot be shut off by user action. > > > > I don't have time to look into details right now, but I see various > possible hard-to-handle issues with sharing anon pages via this > mechanism between processes. Right. We should not break invariant that an anonymous page can only be mapped into a process once. Otherwise may need to deal with new class of security issues. -- Kirill A. Shutemov