From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF337606A330 for ; Wed, 2 Dec 2026 07:52:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=NYnAK00N; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZNsVCOS/ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=J2Xjt9ceGbc1Gx9SgRmd4yunzXMlFEgBnlK+s6GL9h4=; b=NYnAK00N9bjZgAGHV0c7Kgipe2 jr3VVHVeoguRS9FZqzHuR+Kmqfv9GUGgVWwDC3MNvX7OkcwseEGsriwKazHUciLCqhXB+U7TSpZ74 JeqT3OKR6paw4sqSMmegGALTXfKZhOEE1EJC6E0m85Gaj3PUGsmgYf/255Hic0blJo6SfstEji7sw 2gWGV7PlEOH+2pzkSbKSqwLS7EhB3iNbxxoEzZuKHvaFY1VIAN5kn2X9IfnG+NWX1fWlhl9aR83S7 IiI9PWyVNlZl7gTsVPznOekoZjs2nSnPSr9efjGyCQ8QfzcUY/7BZQItOYDTBa9yjzEX/mKtKE8hq syl2nahw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYf8s-0000000AZZe-1Ulz; Wed, 02 Dec 2026 07:52:42 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYf8q-0000000AZXh-2Ko2; Wed, 02 Dec 2026 07:52:40 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 4F845442DD; Wed, 2 Dec 2026 07:52:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 143241F00893; Wed, 2 Dec 2026 07:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796197960; bh=J2Xjt9ceGbc1Gx9SgRmd4yunzXMlFEgBnlK+s6GL9h4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ZNsVCOS/fMX6btbb7jdhV0ZkaVCiLg2zoaysohkKblSFMSO+O7yam334PwUX5K9pN 2Lb97kroOrCA1mMIqJnZdQZZubeCkHNEmtQdVeC1+3mfabjTrHzhN/pbDHVM95Dk7t Pv1X/7q3ptX4NZp7o9js1tYp3sUmMN+2OhnKQa9DhPkZKWZzkAKxu2a7mTc0KlZERf YBipdY/60wdQqBvzHnDzXKgNfUbdiyk/hmrwD7T04tKevgxCwfJrRRqcFutCV+KRc6 FSN7cgrzu0FX1q5HjZAW3RuQw/hvcspBF4qZS++5pvpKJ3H6zMN0n2AAdEJfePFk/o saR7hPeSFKQdw== Date: Wed, 2 Dec 2026 09:52:25 +0200 From: Mike Rapoport To: Dave Hansen Cc: linux-mm@kvack.org, Adrian =?utf-8?Q?Barna=C5=9B?= , Alexander Gordeev , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Brendan Jackman , Catalin Marinas , Dave Hansen , David Hildenbrand , Gerald Schaefer , Heiko Carstens , Huacai Chen , Ingo Molnar , Kevin Brodsky , "Liam R. Howlett" , Lorenzo Stoakes , Madhavan Srinivasan , Michal Hocko , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Russell King , Suren Baghdasaryan , Thomas Gleixner , Vasily Gorbik , Vlastimil Babka , Will Deacon , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, x86@kernel.org Subject: Re: [PATCH RFC v2 00/54] arch, mm: create a generic set_memory/change_page_attr core Message-ID: References: <20261126-generic-set-memory-v0-1-v2-0-723f1e33c3d8@kernel.org> <4304e697-55f4-4676-aeb4-4c3cd742972b@intel.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4304e697-55f4-4676-aeb4-4c3cd742972b@intel.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Dec 01, 2026 at 04:09:55PM -0800, Dave Hansen wrote: > On 11/26/26 03:14, Mike Rapoport (Microsoft) wrote: > > x86's implementation is the most versatile and most battle tested and as > > such it is the best base for the generic implementation: it preserves large > > mappings when it can, it splits when it must, it handles the direct map > > alias, it serializes against itself and it sanity checks the result. The > > others are catching up one bug at a time 😉 > > This is so sad. It's such a mess. :) > > To be honest, I wonder if we should just start fresh. Use the x86 > implementation to build a nice set of comprehensive tests and then try > to build a new, generic set_memory from scratch. I hesitated a lot about it. I went with pulling x86 implementation into the core, as rfc v1 did it and it was easier to continue from there :) This way we start from something we know already works and in about 40 small(ish) steps make it into the generic core. Also it reduces amount of churn, at least in x86, and makes it easier to review for the most picky x86 maintainers ;-P OTOH, there still gaps from where we want set_memory to be, the most important is that a set_memory call leaves a range with mixed protections if it fails midway. With a fresh core we can deal with it from day 1. Starting fresh sounds good to me and I surely can make the next version that way. -- Sincerely yours, Mike.