Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp764683rwl; Wed, 5 Apr 2023 07:27:22 -0700 (PDT) X-Google-Smtp-Source: AKy350Z/s/RBi2nhUpL4Jg37gJ+WHsejuZZnl6Cgu2VUdA1Nzr7rSFUFJ5YytDzZcKVAlimFy9vO X-Received: by 2002:a62:1cc7:0:b0:622:dd9b:e2d8 with SMTP id c190-20020a621cc7000000b00622dd9be2d8mr6237410pfc.3.1680704842409; Wed, 05 Apr 2023 07:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704842; cv=none; d=google.com; s=arc-20160816; b=v28tBwYs50iP7ayQoJ2JKk2KV5V3FVvGP70MSBmHealXLitJga2xVQ8rXi0Elo92ls ODeEAAxAK7YBr9eQhRwZJQpHUAN8iMmtkONMMYIKWw12HV/Om2HE3LNxKDB6SPHV0dSB h2on9pwehDXhrdiqYTwQMqCKz2BRWi9LPdvss+W6qzGH1my7ZfaTIuRM/r3Lef1wsGqT 7ZZIzA5KoxqHmEnkoD8jjBM5CdxJGrLkiq2m1AZA6deISK8EvCjdJ3xot+BevMEpnHwl S4zBGEmGNC+8WSxps2aakrYoFZN2i0O9FstQINEfhTuSSm6/7yTQls5Rn/Z8qHUnLE7V cahA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/PrTUC1frDc4ONSybRkUjf9mg/0PMjE5a3fC6SdvA4M=; b=bycz/Nm0LLNaxrkrJ9BSyKKFJz1QTS2V2aYTWh+AN5tKEl0MmUFNKZrS6UoZtbTqeW mvIgTy1YVITu+AP5UBy804xhSHE9pvIJCfKAVUyGsytROXmuNc7U28WqG8BCXpkFeGR5 75oagmakQfqgyjh6VEl24bL/qza1GDs8nm4AHbTFvj2gkOnZA1VoDolJKo/5Ee2huG+x 0ZOtoQYmH5fjFcKNH08fjlRon4WVQlNEULlWPAJb/yQmFW5cQnJuqcSjh9zHR5rdeX3L hFBkwJcd5Q06exnv9CLGHEtwKdmyN2EJzY9zHluwrxW3kC1EIrO1fonJqRn3GB2whb2L abWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=O8kDLQgi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a634b47000000b0050f817e8564si1894913pgl.86.2023.04.05.07.27.10; Wed, 05 Apr 2023 07:27:22 -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=@redhat.com header.s=mimecast20190719 header.b=O8kDLQgi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238410AbjDEO05 (ORCPT + 99 others); Wed, 5 Apr 2023 10:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238372AbjDEO0z (ORCPT ); Wed, 5 Apr 2023 10:26:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 663AE4EFD for ; Wed, 5 Apr 2023 07:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680704740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/PrTUC1frDc4ONSybRkUjf9mg/0PMjE5a3fC6SdvA4M=; b=O8kDLQgiUJvQ9zjmJMtBFdJpgb3lKU/Jp9CYkg3Lzys6I4SL9ihO7l50sZOdPPAP4f8SsP ZKvuWpEVQ4nNIH+UNhkl2Z6y1pyJMudPJjLxR5AFWQtc4PAe6xqSMW7LQ4VZhLhpPJJDRt rKzXTSLaZlUWzxgHdbE+5VfqXcKKcPU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-17-69bBNsnbO2ix0dbsL13xbg-1; Wed, 05 Apr 2023 10:25:37 -0400 X-MC-Unique: 69bBNsnbO2ix0dbsL13xbg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C2CC85C069; Wed, 5 Apr 2023 14:25:37 +0000 (UTC) Received: from t480s.fritz.box (unknown [10.39.195.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01FDC400F4F; Wed, 5 Apr 2023 14:25:35 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Peter Xu , Muhammad Usama Anjum Subject: [PATCH v1 0/2] mm/userfaultfd: fix and cleanup for migration entries with uffd-wp Date: Wed, 5 Apr 2023 16:25:33 +0200 Message-Id: <20230405142535.493854-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 One fix (I have a simple reproducer but it's too long to paste it into the commit) and one cleanup. uffd-wp migration entry handling for PTE/PMDs should now be fairly similar code-wise. Cc: Andrew Morton Cc: Peter Xu Cc: Muhammad Usama Anjum David Hildenbrand (2): mm/userfaultfd: fix uffd-wp handling for THP migration entries mm/userfaultfd: don't consider uffd-wp bit of writable migration entries mm/huge_memory.c | 16 ++++++++++++---- mm/mprotect.c | 2 -- 2 files changed, 12 insertions(+), 6 deletions(-) -- 2.39.2