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 C1D57606A322 for ; Fri, 4 Dec 2026 09:41:22 +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=iURdpllu; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LU7nF7JB 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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID: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=ckT589NiZA+Qa4qNF6J/0MPfTBKHQrxqzNCPw9h5Oyg=; b=iURdplluXJc4LK tsm+4tuWTogu54iXstlCtSDmKwRzAb8AyIkeMqC2Dw4cPN6b8yFzlktFqMYqAgDzpEzu31kIwkHc8 wZN7jFaOYNFB+ZAvxIRfzd5nvUoqQzYPVHaL1Vg7FgQmM0eGr/i7pmEIAwNol4ZB5vDTJ5K/xHOfD V0B1d5qC9IBroEGB+aeq4u8fAKoDzIC0dBQXAvR+FUPGCRRvYe/LV5x7M+v8r5ejsmW7egpSHK6Vu 4kVOwQsg6PjHD7IGitDNeu4M1apE+ssNGYM5aLjJi/qCNDR1W5YwVhdDZJGhnOnpJ05FRSj+jho8Y j8G9Mthp0ZG/O38XQhAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZPn0-0000000HObZ-1CLO; Fri, 04 Dec 2026 09:41:14 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZPmv-0000000HOaa-3UF2; Fri, 04 Dec 2026 09:41:13 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 5B27F40DC7; Fri, 4 Dec 2026 09:41:09 +0000 (UTC) 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-Archived-By: 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 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=-17.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 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