Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2198244rdb; Tue, 3 Oct 2023 13:22:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEFY/NwHMeqwFcb0FwMD7U45BxsUlfkf65BSYxpU36klQFmybBhSI6W860CQH9YXoZ9WRM X-Received: by 2002:a17:903:2348:b0:1c7:47ca:f07f with SMTP id c8-20020a170903234800b001c747caf07fmr660516plh.21.1696364573385; Tue, 03 Oct 2023 13:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696364573; cv=none; d=google.com; s=arc-20160816; b=boVckCcNycaXpkuIZxBr/MycPomHhhgegPMBCqt83ds0MbWEAP110POJZmFbM7GJNs dd8b6bBjOgawpM2anR8E87aLTAS6b0SoQ4zpok0jJ6/waSpkhE0w6ohVzWL4boH4k6Of FBUBKZEgFX6H72/ePYSWCmQVWobseiYcdbSxVVDQIggmSUZYPSRMHHmo90rUw7AYWIOE EBctI/xnXQ6MTJg3vmaJ1avvMElexiq12jt/vb1XthE4G+XAp3pFOl6AuvWNFqirQIn0 kErpNDu+XFc6sLuU9JQcsYxDs3tqZWrj1/zX1C6+vAiimLhGNHR4T415wW/TSjds0pD0 8cCg== 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=lGz/zPDmfUe9p/qsYHyjDH/ju5fxgNmRfXXQH4ZGRfQ=; fh=QhqNDzjLz98dsIPvdMRiJdX+vSFlV/SMvlkwYxfuSss=; b=VL1MVy4TJWguGS8V6fmH+VGWtLHnj/4ueem4k3AzwA4yPl/oHMAcPNv4XV7BDoS8UC YpBjAyuHpWIcEV5rpRWdpy3ncIGjnNZ2PIwHm+lWMC2001aipqaBl9Q6hJDKQz3wUCl1 FHp7iNl9K+hU6kM6Yu4Xyp0GzzV1YS1TpVNZ2WB3crfcZtf4SqxBP/+nzwch/0GwSKg+ k19qKGWVjOtRpUkhmeIu/NE8QoUaYjzXRtNAC9GJImmJYdNsnFrpdj0azgjoL9kV8Z62 37aCzoAYJPnWEW+uHEm0kW/51Xpyllp79Tmb0ZuIm4XVn8LpAzy2GgLWrtum1yK5rXzK mL8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EkqQjfpl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o2-20020a170903210200b001c737e1d3bfsi2063198ple.237.2023.10.03.13.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 13:22:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EkqQjfpl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7C41E80ECAE4; Tue, 3 Oct 2023 13:22:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240823AbjJCUWp (ORCPT + 99 others); Tue, 3 Oct 2023 16:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240702AbjJCUWo (ORCPT ); Tue, 3 Oct 2023 16:22:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73AC7A6 for ; Tue, 3 Oct 2023 13:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696364518; h=from:from:reply-to:subject:subject: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=lGz/zPDmfUe9p/qsYHyjDH/ju5fxgNmRfXXQH4ZGRfQ=; b=EkqQjfpldRC2BCBcTJ68LVuX0Bw8ZlVOyjDEjK89zT+YSpYKau35htluhoqcWWrXy5nhXp ymLmB6hjXkuBIYggXk71vGdpoLqaLFWX6i6LJ53Znq/CzSL3rhu2+iZdpf8lMGmaHw4g/T t9Tnr/WOX324Hp30r9GCUork8OmdiOw= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-578-ujP67jUHNVuATY_tzlc93g-1; Tue, 03 Oct 2023 16:21:46 -0400 X-MC-Unique: ujP67jUHNVuATY_tzlc93g-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-77423bb5579so36598385a.1 for ; Tue, 03 Oct 2023 13:21:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696364505; x=1696969305; 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=lGz/zPDmfUe9p/qsYHyjDH/ju5fxgNmRfXXQH4ZGRfQ=; b=kXNkNh1ufwWZjSTca4zStYAbRMEe7gonIZA9U6xHXHP7yj3viScqkDllSuoG2pwWh7 hLRLJx2TOZQmbKhUsjzdqdbde6ctwjpHMiMhRmfcqYecpbDYijRU+EGviUOSut7l3N/v HTMIi5Tyh7qsFtqNgbBbbJKgEwK9nt5eDOw0tpM7eMvMTgaPzdRRsoAVQlvDjNVQNfXP 2yyotgFEHh1/p+8j9heoGXau6Z+fjKHWFSx7gwNrZRsALTQqJ9aPNWFNB80FfQ7xln6s F6E5GrqX6+kxTP9t1h3bl6GWicq36IRg48WsBczRXgyy/hpg2BZ08R5c3ViGNVmhcte+ tNWg== X-Gm-Message-State: AOJu0YxtQ8PrMKayZt3JBDp9gRgIFF9+/JTvgwjStQdkVMpTMi9jo8OO NQzE6Sp7oy6th5Ft7djZhoh8Z9/tPuUQIiz/kpij28P1o68a3wdQRWPLzImiMUTUFJB4Bm6JyhC Lky9sQDb6r+vxsCBxIHQUAHLS X-Received: by 2002:a05:620a:1914:b0:773:b634:b05a with SMTP id bj20-20020a05620a191400b00773b634b05amr664278qkb.2.1696364505541; Tue, 03 Oct 2023 13:21:45 -0700 (PDT) X-Received: by 2002:a05:620a:1914:b0:773:b634:b05a with SMTP id bj20-20020a05620a191400b00773b634b05amr664260qkb.2.1696364505180; Tue, 03 Oct 2023 13:21:45 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id w13-20020ae9e50d000000b0077407e3d68asm729062qkf.111.2023.10.03.13.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 13:21:44 -0700 (PDT) Date: Tue, 3 Oct 2023 16:21:41 -0400 From: Peter Xu To: Suren Baghdasaryan Cc: Lokesh Gidra , David Hildenbrand , Jann Horn , akpm@linux-foundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, hughd@google.com, mhocko@suse.com, axelrasmussen@google.com, rppt@kernel.org, willy@infradead.org, Liam.Howlett@oracle.com, zhangpeng362@huawei.com, bgeffon@google.com, kaleshsingh@google.com, ngeoffray@google.com, jdduke@google.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v2 2/3] userfaultfd: UFFDIO_REMAP uABI Message-ID: References: <85e5390c-660c-ef9e-b415-00ee71bc5cbf@redhat.com> <9434ef94-15e8-889c-0c31-3e875060a2f7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 13:22:50 -0700 (PDT) On Tue, Oct 03, 2023 at 01:04:44PM -0700, Suren Baghdasaryan wrote: > Ok, I think it makes sense to implement the strict remap logic but in > a way that we can easily add copy fallback if that's needed in the > future. So, I'll change UFFDIO_REMAP to UFFDIO_MOVE and will return > some unique error, like EBUSY when the page is not PAE. If we need to > add a copy fallback in the future, we will add a > UFFDIO_MOVE_MODE_ALLOW_COPY flag and will implement the copy > mechanism. Does that sound good? For the clear failing approach, sounds all good here. For the name, no strong opinion, but is there any strong one over MOVE? MOVE is a fine name, however considering UFFDIO_REMAP's long history.. I tend to prefer keeping it called as REMAP - it still sounds sane, and anyone who knows REMAP will know this is exactly that. Thanks, -- Peter Xu