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=1796377269; b=te3xoHF/htnMIjmzIxkxYgFJOyvPcxW2/0jqeksjgKrZgDjry0KKc7qrECktPuU1D75g VaYAgS/JPFmLh2W0lM1HBLA/Jc89iKD4eTyj84QBK7u5AwFJo2eHEzCm1OSN21rwG2+u9 FUO2qtCRHEP+DG72zGjm13+FidudgMIlFzGe6Rv5m/CPni5dCC79Kr2HJJGUvqORZGKHD /o2XvPYFe1Nu+no4fefQLfZLcwYkKsuZ/ZB0/pGO93ux3OV22NakQ77A6EsPeJHzBIli2 Fi2AexOXEgDs7DtJ8sKsH5XvosPtyzrVlSN2r2JyaoTTQBjc9LGlKZ9VbxduDj4q1Aw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796377269; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=ckT589NiZA+Qa4qNF6J/0MPfTBKHQrxqzNCPw9h5Oyg=; b=s65Kw8a6SLNNmNpUot5F9yaMc/IPg+TN50KEGBixlsBt05LLCuoDSFQ7tXVpkKD9ljgM Xv6I4jAlkRtGnwKx9ni86p0ENHd6ZjUps/3TkY22aHAr6dLu72LQtCAVAhdxCz6DdlEIw oc7+08vkhsJB0hliyPlBg7XR4Gz5CM1dKMv5Kvm7ADmIS07X293vISeBsWhxQmH6NWkvI QHKM5Ct/fWkOsV8k/fyWLdbAYvBcCqMAPAJOeIZMt4hrNhp916WmVEyFchbM6pIBhgLMV J4DYYQNnGKu56buxtxJAgq89qJ/NQREBiR5agzeADUDVQl6MApiX0Vw0uz/kRN2EvjA== 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=LU7nF7JB; 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 B4FB2606A32F; Fri, 4 Dec 2026 09:41:09 +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=LU7nF7JB Received: by smtp.kernel.org (Postfix) with ESMTPSA id B60F81F000C2; Fri, 4 Dec 2026 09:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796377269; bh=ckT589NiZA+Qa4qNF6J/0MPfTBKHQrxqzNCPw9h5Oyg=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=LU7nF7JBpyj01lraF4xUTq0JhPQaYVATObGnT/QL3N5hw1J975FgQhnKLNAKWFXt8 o6vH/IS9s9up5CzFnQ3yYdDKTUlV+1AR3T5sIbxE9iTd6js2pYSFa9/n3tnfEJuu1y wxGbFcnpzZwZb5R/WbtB3ImvmSbRzJeSs42yI98fQBJotaeWnSYPfhRR/OG/n26qza LyJhXdyektUEgEEsXokUTxblwQDga1UXgkedVMy2zuMJ++Ssxg+7+rk+yCLHBWraow YwOOFQukjd0WFxZArLvps78078bzPY0GGnBiiWHQdPvDwpp0R7ZnplCkBPij0Y5uh9 jnz5XtnYGVnTQ== Message-ID: <3c6ff1c3-817b-4417-acce-90a1b3231a89@kernel.org> Date: Fri, 4 Dec 2026 10:40:58 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v2 46/54] s390: remove set_memory_rwnx() To: Mike Rapoport , Heiko Carstens Cc: linux-mm@kvack.org, =?UTF-8?Q?Adrian_Barna=C5=9B?= , Alexander Gordeev , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Brendan Jackman , Catalin Marinas , Dave Hansen , David Hildenbrand , Gerald Schaefer , 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 References: <20261126-generic-set-memory-v0-1-v2-0-723f1e33c3d8@kernel.org> <20261126-generic-set-memory-v0-1-v2-46-723f1e33c3d8@kernel.org> <20261203104925.77590A0b-hca@linux.ibm.com> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 03/12/2026 à 15:30, Mike Rapoport a écrit : > On Thu, Dec 03, 2026 at 11:49:25AM +0100, Heiko Carstens wrote: >> On Thu, Nov 26, 2026 at 01:14:59PM +0200, Mike Rapoport (Microsoft) wrote: >>> set_memory_rwnx() has no users since commit 33bd8d153c33 ("s390: Keep >>> inittext section writable"). >>> >>> Remove it. >>> >>> Signed-off-by: Mike Rapoport (Microsoft) >>> --- >>> arch/s390/include/asm/set_memory.h | 1 - >>> 1 file changed, 1 deletion(-) >> >> I'd rather keep it, since it would be useful for execmem_force_rw(), which >> is doing set_memory_nx() + set_memory_rw(), which could be replaced with >> set_memory_rwnx(). >> >> set_memory*() calls are quite expensive on s390 (I guess that's true for all >> architectures). Collapsing calls doesn't seem to be the worst idea. > > I agree that it makes sense. riscv also has set_memory_rwnx() and it can be > added on x86 and maybe others as well. > > Since the rework is going to be slow, I can take it from here and post > a more general patch that updates other architectures too. RISCV names it set_memory_rw_nx() not set_memory_rwnx(). > >> Something like the below maybe? Yes would be nice to just do like for set_memory_rox(), with a fallback in include/linux/set_memory.h Christophe