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 3B376E8FDB3 for ; Tue, 3 Oct 2023 20:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240871AbjJCUWp (ORCPT ); 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-Google-Smtp-Source: AGHT+IE1us9YsAy4zroBwMwR+GwfiHfM87maalEVWo8Ggo0EdogasY6gSCuj6gjLUHCv5mmQk23vSg== 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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