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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C3F6C7EE25 for ; Mon, 1 May 2023 07:27:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbjEAH11 (ORCPT ); Mon, 1 May 2023 03:27:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjEAH1Z (ORCPT ); Mon, 1 May 2023 03:27:25 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC791B4 for ; Mon, 1 May 2023 00:27:22 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-64115e652eeso25127186b3a.0 for ; Mon, 01 May 2023 00:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1682926042; x=1685518042; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ibXuk7FbYrowdFzsiIEHtgPKzlyAO+Sfsye0fqZ102E=; b=IKlhLUer77vP+NjL6egKLZ4SBjsZvxj/D3clB+asMNMvxbEKZVyD67jL8L+HgQcTZP bx2+VCvjy6HeCWRCAKSjdVeCtOUPiNZOnarnxDf2Ay6KT0thLI2fnISAw3lEGAFT3jl2 kDsM3kvKxVx4yCWkUsfVNm1hwj4coNk2oyMCtjatrEV3EX4+4UoJMiPf3zbEvc9Jjg1m 0bcMJvDlbUEMRKu34+4Ed5M78tX9h6w4sQUUsnBU8Gli1HsSt1NKbMvyBp/4K2SrmTSi DEZoHLZVnAjL+yBP9KaRc6NDRzIuI950QrEuS8Jegk9aH6BmTEHBRYboZ8q0GghNqhi2 OyTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682926042; x=1685518042; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ibXuk7FbYrowdFzsiIEHtgPKzlyAO+Sfsye0fqZ102E=; b=R5xgb7s8aTcBTwwiXYfOlSBmfk9CQK+1S/UfCkHtyMFYtB7aoFFRQ69u1hO3GQhTNp pfpvt4WuCdRwoQBRYVY0nR9JgMExbhYVXb1FWS0bqym3uoQVX0iKUn3lYvV2mBifCXlS YsB/JeRkBDX9/x8ySc8UU1DVGiUxLQbgTslbU+Jjs3zq65mR4ix4TcbwjMigWNxi/C/B K7v+MpODpLQbWzAqGW+/VNvxBsdvaGrwxjL0yNZRyWMpUJLpw/IU0tKoRyn1uYGQXoZR PKuR8Cl04EkjNZjE8Ng8NicI9nu5w3gbZ4eSq4QnFd8eTZVquO4zTqyYShP9ACU5mk/4 hrVQ== X-Gm-Message-State: AC+VfDxcU0WomCVFqH9D+JSt06IaPhY3FUXZJho5BTq5iGG5ZSES9mH6 llEuC+OUe/wY5wZ6eGHV0hqScg== X-Google-Smtp-Source: ACHHUZ4UvG80mxUfpvf1acfCnS2H3KC6jDEcSFVNzFYuXXy+v/xi65gkE5IdZ0bX/96Zq1X5x+FUpg== X-Received: by 2002:a05:6a00:a16:b0:63d:3c39:ecc2 with SMTP id p22-20020a056a000a1600b0063d3c39ecc2mr17292848pfh.12.1682926041931; Mon, 01 May 2023 00:27:21 -0700 (PDT) Received: from dread.disaster.area (pa49-181-88-204.pa.nsw.optusnet.com.au. [49.181.88.204]) by smtp.gmail.com with ESMTPSA id t40-20020a056a0013a800b0063d29df1589sm19371079pfg.136.2023.05.01.00.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 00:27:21 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1ptNwM-009yXy-1S; Mon, 01 May 2023 17:27:18 +1000 Date: Mon, 1 May 2023 17:27:18 +1000 From: Dave Chinner To: Jason Gunthorpe Cc: Theodore Ts'o , David Hildenbrand , Lorenzo Stoakes , 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 , "Kirill A . Shutemov" , Pavel Begunkov , Mika Penttila , David Howells , Christoph Hellwig Subject: Re: [PATCH v5] mm/gup: disallow GUP writing to file-backed mappings by default Message-ID: <20230501072718.GF2155823@dread.disaster.area> References: <6b73e692c2929dc4613af711bdf92e2ec1956a66.1682638385.git.lstoakes@gmail.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-perf-users@vger.kernel.org On Sat, Apr 29, 2023 at 08:01:11PM -0300, Jason Gunthorpe wrote: > On Sat, Apr 29, 2023 at 12:21:09AM -0400, Theodore Ts'o wrote: > > > In any case, the file system maintainers' position (mine and I doubt > > Dave Chinner's position has changed) is that if you write to > > file-backed mappings via GUP/RDMA/process_vm_writev, and it causes > > silent data corruption, you get to keep both pieces, and don't go > > looking for us for anything other than sympathy... > > This alone is enough reason to block it. I'm tired of this round and > round and I think we should just say enough, the mm will work to > enforce this view point. Files can only be written through PTEs. It has to be at least 5 years ago now that we were told that the next-gen RDMA hardware would be able to trigger hardware page faults when remote systems dirtied local pages. This would enable ->page-mkwrite to be run on file backed pages mapped pages just like local CPU write faults and everything would be fine. Whatever happened to that? Are we still waiting for hardware that can trigger page faults from remote DMA transfers, or have hardware vendors given up on this? Cheers, Dave. -- Dave Chinner david@fromorbit.com