Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1795517rwd; Wed, 17 May 2023 01:12:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4uU1K+HVGgm2cxmeB2kDgO1j5uKdYZ7/vGTTi4lKpMlwL5mquwtmJ3OwdZ9rg6bzE0Vix3 X-Received: by 2002:a05:6a00:198a:b0:643:791b:892d with SMTP id d10-20020a056a00198a00b00643791b892dmr49401935pfl.18.1684311174504; Wed, 17 May 2023 01:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684311174; cv=none; d=google.com; s=arc-20160816; b=s4td8PtnRPyMjmyME1SKg8QhdibP5i9yc1XNIstGtZRbhRmqIDMCMdiHeXnV63OSrp X9tNSpl1R7fJWnjxyfIFtoubsDPRqvjnppyQIKoKNXptDfAn4WnbFbTRuraeuu3KBOuY 3YOVfCN1l9xNhmPcUcbAf3R8VmDc/qF4RH7D71ujm7D/IPzfI4R8G46q38uSuHaQI/I+ /nvwzTFuRiCsDEQYzcLfmO2LFsoMt08tQT2ATESqvc3c2o8tNm8KEh+q6EvXapWEmqNv TSe8C+sg3eVOm41z5xpwNBT75knC9N3gl01Nw46mceVyy4ab7s0knAzBZCNPq01DGc3u RBWg== 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=HPDWw34wuVd8ioS24/GeMKLCeS2AVAgFryvQOngyNIQ=; b=lUxUJSi6AEFGNLEYkNMmV9PYCpREeeypL+SsTgZGuHZvEGNRK/DAtb0vFKSfEdhPr/ 22ta3EGOvrbAGJyGa4z89iKfNi8ImJOBtkSvMUV/Qm+nsutSsjw6rc6PcFhMElHw4rCb 60nICKQKkLq93XlSyBzniDfl6t+fDKRoJVc+es3QdATBOWAQ6KdtdbiXnwvtGzEkV3sI GKyIWcxZmXPsI6Uct1NSvOnv5vEt8aHnNSPk/EjElcuGmMdLcSQiU6gkUdj0IbcHbyPj mQ60ck/uTPKPxflY0rbdHMnNVdmuewhyMg++eywJ61C7lA+NIVDWP/9aIpv3hoziquZr 3pNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=MsacaJGq; 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 i13-20020a056a00004d00b005e1cabb612fsi21225058pfk.67.2023.05.17.01.12.39; Wed, 17 May 2023 01:12:54 -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=@infradead.org header.s=bombadil.20210309 header.b=MsacaJGq; 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 S230120AbjEQHmf (ORCPT + 99 others); Wed, 17 May 2023 03:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbjEQHmd (ORCPT ); Wed, 17 May 2023 03:42:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3478B1BF; Wed, 17 May 2023 00:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HPDWw34wuVd8ioS24/GeMKLCeS2AVAgFryvQOngyNIQ=; b=MsacaJGq7G6gp1g2tKwWD9aPxj lIWiYSjSeZTbTQc8SB3TDcwvIoK1SbqwWRIlPhC4YSIUXLoxKBxmBJ58tJRS9JpJmnWpamWhDDysS V+k9SiF1Gr/FG74fEbS0WLGg5+wM8WHBsWbZPUbLL61ZV6/WLTgCmsVZQ0eHVUJ6f5q8AhU/DBoow 9bum13Vokx8ry+6dEIpVmJ8nUJYyawYXr4VnZAj+bk7J7JugOSOwIcYMLgnY3TWJ9XtR7iQY9Doiw wbuan1SLeZK8/F+6tjRql9ysljB4YE9pY/nSPiZeshU2J/+GFfaBZVfQ90285TEWrjn1EYa4PYQ/M 3YyGF0Jg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzBnk-008iGg-1Y; Wed, 17 May 2023 07:42:24 +0000 Date: Wed, 17 May 2023 00:42:24 -0700 From: Christoph Hellwig To: Jan Kara Cc: Lorenzo Stoakes , 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 , 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: References: <20230515110315.uqifqgqkzcrrrubv@box.shutemov.name> <7f6dbe36-88f2-468e-83c1-c97e666d8317@lucifer.local> <20230517072920.bfs7gfo4whdmi6ay@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230517072920.bfs7gfo4whdmi6ay@quack3> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Wed, May 17, 2023 at 09:29:20AM +0200, Jan Kara wrote: > > > 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. Full agreement here. The whole concept of supporting writeback for long term mappings does not make much sense. > > > 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. I have no idea what total flexbility is even supposed to be.