From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D28CC433F5 for ; Tue, 25 Jan 2022 14:00:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D8E006B0073; Tue, 25 Jan 2022 09:00:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D3E846B007B; Tue, 25 Jan 2022 09:00:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDFF96B007D; Tue, 25 Jan 2022 09:00:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id AB6536B0073 for ; Tue, 25 Jan 2022 09:00:45 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 620841842C4BD for ; Tue, 25 Jan 2022 14:00:45 +0000 (UTC) X-FDA: 79068970050.28.8340BF8 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by imf19.hostedemail.com (Postfix) with ESMTP id C24DC1A0006 for ; Tue, 25 Jan 2022 14:00:44 +0000 (UTC) Received: by mail-lj1-f171.google.com with SMTP id q127so2120671ljq.2 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=Ex1dYnXT73ogCyBZAEgYvMHQqx+dvCAhMpoiT/855Gr7Mqfn1Mk1FXYnmh0sEHjIJE FvXWFA66O+/xdzXoCM6xBKpnFSlznyqZ18hPAVGoOoBNORiLm+YaawiRnydkCgHyz0oD fIC4CascN/B17qrzypKCmCpLWAxrfdGqx72BB/YDa2IotgAre7qrBt0rg/VA9SX58qa4 WdcZZYMTG/0CSXboUlwFLqMeJRZK+PDo9RFKjbenDhdLnJenYUkEewJvQE0s7f7MDcEr vhIhqVFtK/Z6Qj95Bw/G9igC0V8uOrxtqb9uAFvKwRSY+v9OUGrqKJ1DTLkjJ3+J2PUn g4PA== X-Gm-Message-State: AOAM533wVSV293dyiQjQSu68GkfrL+UjdTbgQejFs6JEgiDSbwbZvBZx aXt4/TndIJSTDCjR/vln5ktJ6A== X-Google-Smtp-Source: ABdhPJzwDU03/3/lYn+e29qN9G04dI/m9iuoAGuQYcq3nmcfKuiUkZoE86mXTsxivN3kWvmOPTYuSw== 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: X-Stat-Signature: 87eqjbrz4wbfy8mbujo5mks8tk1wwrie X-Rspam-User: nil Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=C80cnNOr; spf=none (imf19.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.208.171) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: C24DC1A0006 X-HE-Tag: 1643119244-516238 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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