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 C7638C77B7C for ; Fri, 28 Apr 2023 15:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346233AbjD1PPP (ORCPT ); Fri, 28 Apr 2023 11:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346104AbjD1PPO (ORCPT ); Fri, 28 Apr 2023 11:15:14 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F7B62726 for ; Fri, 28 Apr 2023 08:15:12 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-32ea67ffec0so515815ab.0 for ; Fri, 28 Apr 2023 08:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1682694911; x=1685286911; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KvymAYqQK8KafKPQ5ggpjpSP3LazlAMFXcBeQlY3Tv8=; b=v9IxTveS3HPmNDFvCE4PdJhCt4toAfvjEZHmytNPmIa3Tm64QwiVEScxyI1hdHU6FF eH4V3Hmcfch8d5rp5bxbizVx9JFdZQ5DMpeZvSuqnKZ6Wy/1pDhEj95DYpUW+cCkQPPJ ZR9b8KsQlfhtM7lVA/4ZuvuuMSdpJmXUC43fPEdRrnVMW6TVjqKOuvsEIUG68Vju0UyW bnTKYEAb6CEhsT9Jhlp2YGhJy5OqTb+UuHMS41JelIi5lxgjBN1fzOT4aSasCDIKKDTf l0Lx9nMuplJa1gY29e9SvXtEmd3ibLyo8w6epMBLhKibHnhlDzX8VkcpFriagsO4nMuL rdAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682694911; x=1685286911; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KvymAYqQK8KafKPQ5ggpjpSP3LazlAMFXcBeQlY3Tv8=; b=fTIfAFfzJuQMJzTmoLFqCRRpjncBCd9IruNUPmNfMnDr4zyIBBFsZdD+MAR01kHtbV jUQgQhS7dlWH6eX3TgjSl1tThedcPT2PQ7n2c2rHcsWEQbCtf9NhyK6MvoLshQcg74bz QSo8ImBmrDCY/A9nuKikUz5sGHwQxG075kQeejLOGHfr0faU1bvxumnnneqC55HiJ9Kd AQAjAm0KTWVwwogPbRYXuoz8XOluHbRXzixABwVBJ/J06xrDUqi/LCkTV3YVW8tf4msh +x0CaB3+KOjiJOCQtEU1VcQ2k3bPez0YL1BkEThwLSQ6j4FqkNkesgY8GmqCv7eObHsr zeWw== X-Gm-Message-State: AC+VfDxFyUdwS17PFI7x53sPLmNsJfvog6C6zplKVH+o6orVolwUibnp Vh9yL/4/3jwPfNq9616xZCwRnA== X-Google-Smtp-Source: ACHHUZ7hkEKonWLs0qWMkb0o+prXhuaF3QWK2pa6XoVDvYzAG0Ws5Agj+FneE7A1Jf5T+LYM0qMG6w== X-Received: by 2002:a05:6e02:1be4:b0:32a:a8d7:f099 with SMTP id y4-20020a056e021be400b0032aa8d7f099mr1824171ilv.3.1682694911349; Fri, 28 Apr 2023 08:15:11 -0700 (PDT) Received: from [192.168.1.94] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id x7-20020a92dc47000000b0032f493364c1sm697858ilq.52.2023.04.28.08.15.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Apr 2023 08:15:10 -0700 (PDT) Message-ID: <447d0270-9c0e-23f4-3c62-33c3eff325af@kernel.dk> Date: Fri, 28 Apr 2023 09:15:08 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v5] mm/gup: disallow GUP writing to file-backed mappings by default Content-Language: en-US To: David Hildenbrand , Lorenzo Stoakes Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Jason Gunthorpe , 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 , Jason Gunthorpe , John Hubbard , Jan Kara , "Kirill A . Shutemov" , Pavel Begunkov , Mika Penttila , David Howells , Christoph Hellwig References: <6b73e692c2929dc4613af711bdf92e2ec1956a66.1682638385.git.lstoakes@gmail.com> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 4/28/23 9:13?AM, David Hildenbrand wrote: >>> I know, Jason und John will disagree, but I don't think we want to be very >>> careful with changing the default. >>> >>> Sure, we could warn, or convert individual users using a flag (io_uring). >>> But maybe we should invest more energy on a fix? >> >> This is proactively blocking a cleanup (eliminating vmas) that I believe >> will be useful in moving things forward. I am not against an opt-in option >> (I have been responding to community feedback in adapting my approach), >> which is the way I implemented it all the way back then :) > > There are alternatives: just use a flag as Jason initially suggested > and use that in io_uring code. Then, you can also bail out on the > GUP-fast path as "cannot support it right now, never do GUP-fast". Since I've seen this brougth up a few times, what's the issue on the io_uring side? We already dropped the special vma checking, it's in -git right. Hence I don't believe there are any special cases left for io_uring at all, and we certainly don't allow real file backings either, never have done. -- Jens Axboe