Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1770887rwd; Wed, 17 May 2023 00:47:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5X2ByjQh05epeq2/NT++1He5wFa5nA3xfLYxqqAqnAf6cwEECBlAJB6OqcA1WcZqSOsrMP X-Received: by 2002:a17:90a:3ccd:b0:250:4847:426a with SMTP id k13-20020a17090a3ccd00b002504847426amr36968227pjd.11.1684309655280; Wed, 17 May 2023 00:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684309655; cv=none; d=google.com; s=arc-20160816; b=n/ht9V9IxRM+caYktMerp2zliVSBkkQScWPerm7mxFR3xeBAA0wSgt27YIejBhnsXR Zmi3yJpJFTo9t4VUcN77QeekZks6qJWEiWGS8a5hH1JQmbvvnGESOu1DlnUYZriHrp1G JJLTDU8+tYCQzBHzcL++zfbdELzRuPjzzoUcD/6wmYDdwyXR3ErvRC30w2huIvf3RypH romGlXlgg52v6DZHXOQ9+vNGMd6A0fiYHYkw1ZxUrA/OEVoHudsImGXcGZSgRhxSAvOb HJkCr5GyjFvHdu5KseDm4UxvDRh1eso2r/UFbtRddU/kEptIm0TSsufG0+uYhj98PV+K zhXg== 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 :dkim-signature; bh=eii5ss2ocLxG8N7/nX823yY9WNM71xoVrkq3X6PC3iI=; b=CXTNG41+v67P8QRLzhrNeEZwNYAzPcoQiDA3g30H5tl4aPIP9t5Zjc2Hyjp/AviBoK F9Vn+6+PZAvL9jm2tLZ2VE1TaKMhKy8ZEFfI6+B2Ooh+XDWrkENXxgsenF8+MopXCZ1d S8N26stT+9HrxYcWoakRUwQhq19Kq3SlpFe44SZ7HZQSOIwmQjgPtI9tLOQ/4GhLtS2T Ka1Luf3pO0hf0jFDoq5WjzktOAywXHBeil6wKsdvRI3jMNsF3L/NKnBMZ7DApxLbEkrQ gF8Jpl30Q6Zw/8gOCN0qXzhzud7kEJXD9u8YRCpWhlq8pxTD63CitRLv/6wraEn8xFnx cR6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=hQvUWIwV; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=6b8pr7Ag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a17090a8a0900b0025343d81e98si993602pjn.177.2023.05.17.00.47.19; Wed, 17 May 2023 00:47:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=hQvUWIwV; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=6b8pr7Ag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbjEQH3b (ORCPT + 99 others); Wed, 17 May 2023 03:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbjEQH30 (ORCPT ); Wed, 17 May 2023 03:29:26 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5436B1726; Wed, 17 May 2023 00:29:22 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EF577204F8; Wed, 17 May 2023 07:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1684308561; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eii5ss2ocLxG8N7/nX823yY9WNM71xoVrkq3X6PC3iI=; b=hQvUWIwV6dCGwuy3cNq5IQT6P4+C/VAVmwLb4GtYKRRH2ugi1jPXhCde+huPj1CQ4BTIvb Mq7gF5pblxgfVMZ0MzePq08W3e416/qsT2eooe28/Ge9FinmDOZxJd/ttsaYqUU6FtLcXy 3WifwYteFwOXitONZ5p8n1bpd6ozBMk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1684308561; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eii5ss2ocLxG8N7/nX823yY9WNM71xoVrkq3X6PC3iI=; b=6b8pr7AgWnQi46BzKh0rbfqRBGeaL4LkESIM594OVIo6t6RKDV5ot9JIBptg6ZdgmCqX7G 5J23DXq7PolfGmDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D8A75139F5; Wed, 17 May 2023 07:29:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id q0FVNFCCZGSmDQAAMHmgww (envelope-from ); Wed, 17 May 2023 07:29:20 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 24F03A0735; Wed, 17 May 2023 09:29:20 +0200 (CEST) Date: Wed, 17 May 2023 09:29:20 +0200 From: Jan Kara To: Lorenzo Stoakes Cc: Jason Gunthorpe , "Kirill A . Shutemov" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Jens Axboe , Matthew Wilcox , Dennis Dalessandro , Leon Romanovsky , Christian Benvenuti , Nelson Escobar , Bernard Metzler , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Bjorn Topel , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Brauner , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Oleg Nesterov , John Hubbard , Jan Kara , Pavel Begunkov , Mika Penttila , David Hildenbrand , Dave Chinner , Theodore Ts'o , Peter Xu , Matthew Rosato , "Paul E . McKenney" , Christian Borntraeger Subject: Re: [PATCH v9 0/3] mm/gup: disallow GUP writing to file-backed mappings by default Message-ID: <20230517072920.bfs7gfo4whdmi6ay@quack3> References: <20230515110315.uqifqgqkzcrrrubv@box.shutemov.name> <7f6dbe36-88f2-468e-83c1-c97e666d8317@lucifer.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 15-05-23 14:07:57, Lorenzo Stoakes wrote: > On Mon, May 15, 2023 at 09:12:49AM -0300, Jason Gunthorpe wrote: > > On Mon, May 15, 2023 at 12:16:21PM +0100, Lorenzo Stoakes wrote: > > > Jason will have some thoughts on this I'm sure. I guess the key question > > > here is - is it actually feasible for this to work at all? Once we > > > establish that, the rest are details :) > > > > Surely it is, but like Ted said, the FS folks are not interested and > > they are at least half the solution.. > > :'( Well, I'd phrase this a bit differently - it is a difficult sell to fs maintainers that they should significantly complicate writeback code / VFS with bounce page handling etc. for a thing that is not much used corner case. So if we can get away with forbiding long-term pins, then that's the easiest solution. Dealing with short-term pins is easier as we can just wait for unpinning which is implementable in a localized manner. > > The FS also has to actively not write out the page while it cannot be > > write protected unless it copies the data to a stable page. The block > > stack needs the source data to be stable to do checksum/parity/etc > > stuff. It is a complicated subject. > > Yes my sense was that being able to write arbitrarily to these pages _at > all_ was a big issue, not only the dirty tracking aspect. Yes. > I guess at some level letting filesystems have such total flexibility as to > how they implement things leaves us in a difficult position. I'm not sure what you mean by "total flexibility" here. In my opinion it is also about how HW performs checksumming etc. Honza -- Jan Kara SUSE Labs, CR