From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796197960; b=NkcdjLkYQnGkPnmvjP2XmNqU14NpevfEDmJa8oqqB20dJ3cvTAYyfqFmREhhC8K5B8Gj dVzp+ICMnQE2TqhVlXOc0YCg4YCTxdT1Whl/4yFmF7kyRe0G7tLBd4JqszR+2S8anzfCT m3pS2t6hZn1hkQVl7bU5H20ksZmkXV2Tmi8Ibc9BR5E5o/zWmGz3mdPhaAhtit7NKZkdN 85X0Nvz6aMUdpVg2I7WcIwXpjt2yxjnkCJG7ej0/nXJbVOh1I+5ay0k20GUG32KY6NpGX NofJKKqjFvxYCgC5Nuh996n8Bjy6vaNUdbkwDc1MzVIJhZOeZHTJNN+0OkjIbELuHhg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796197960; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=J2Xjt9ceGbc1Gx9SgRmd4yunzXMlFEgBnlK+s6GL9h4=; b=yVZiLkoMxJoRvS83+vVI8r7jXLxcpX1FXIIY3K+W5aIjMxWHRED5HVl0RLkNciOMrJS5 AYbTJqrLDjbwBbOD79pmG8wB1e+JfkdpoNECR2I1F+Prc63A5mL6NKifNlKZMVgoqHCw7 W3Iss9T0M8Jzdw8p0tICTPh3LKokiNcME6anxn4AN+9lSarFp1Sa2Zg7cEuTvMrPK2WI/ bmYnYoXuZM414bnTcz/T9Srsx4b6AWk8U0qpKTAtlbMfaWbNvi8MamMctfGy2nXAYjJgY 5Cckx0Ww3ftsjlVU9vNmHHj6Ac4FNVTEbNTEPAMWiGEr/p2lWBe2X+7/DdQ8QGcUZ3Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="ZNsVCOS/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58432606A31A; Wed, 2 Dec 2026 07:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZNsVCOS/ 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-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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> 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.