From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30D8BC87FDB for ; Mon, 11 Aug 2025 11:52:23 +0000 (UTC) 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:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3m3NYhX0f+KYzxRPEtnipkDoKtNhsNCJr3ndSmVjep0=; b=c+ThmHqYN1vXAFqHy7vuIDIlq4 b/Oi0pg9OVG/6ghJJ8pmHjqGlw3ncr++WgIJK3dOVMUmsD9aB1FnIteE2l7eGGCDQKOambZ+IOugD 4o9Yu0LlK/A+IWHKf1UVq2aXQhNscj588oM/105ijjhcnbhqydeYJaPmtnqFJMLrZRF5CocRJe1i/ qpIgic3iN2LdpsF0SdnTL+eUhovcxFofNyb7qebaOLrjVfe8K88qbnH57hd8EqCmKSqzquAHpkQNx DkETrw4/EgAGq4Bdi8WESxDshN08IPXABtEwSuO8YJYs2i88wgZK9iqPI/4wzV/tj0qpbipFzf/3+ LE5UtaNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulR4Y-00000007Zcy-41ON; Mon, 11 Aug 2025 11:52:14 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulR1z-00000007ZUg-0hiS for linux-arm-kernel@lists.infradead.org; Mon, 11 Aug 2025 11:49:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 8D527601F8; Mon, 11 Aug 2025 11:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3436EC4CEF1; Mon, 11 Aug 2025 11:49:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754912974; bh=QWJh3XA4bQPH/hLuxXXWVMN3sbdcGGCp6Qd7aRGBJRo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kY6EvQcKrhDxNus5IyHzP0ejklCNGDJW1rLtX68H92A3y+B7cZKLyN+fskBUh8oja 4iqbif8gokwIabUpPEoeeW9EsyUdAmbwMEAApDBE4Lati69S80+QlU7u56MmwQ07yv 04417JW1yqcrfROuKS6vG8DnepZpITq75mIMh2ZE71A/a64u4yjE2jIgrOUndA7NTO SPd2pHVq2EewQqSBDoBnu6O1P89n2kPZ0p50jG7HOfGtDVy0I5nLi4MJz1TkgHMmjA t71OtK1Qgrxh4XeU0PgBHcUolyiALO3wx4EQ1hhK4h/K1ut49tKKfNfgJ0wUlqD5su 4Wjys771lajhg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ulR1t-006Cex-8i; Mon, 11 Aug 2025 12:49:29 +0100 Date: Mon, 11 Aug 2025 12:49:28 +0100 Message-ID: <86wm7a84dz.wl-maz@kernel.org> From: Marc Zyngier To: fanqincui Cc: "Will Deacon" , catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Fanqin Cui" , hanht2@chinatelecom.cn Subject: Re: [PATCH] arm64/module: Support for patching modules during runtime In-Reply-To: <56b98f57.954f.1989890838d.Coremail.fanqincui@163.com> References: <20250807072700.348514-1-fanqincui@163.com> <3d4011c0.6aaa.198981027d7.Coremail.fanqincui@163.com> <86zfc68exk.wl-maz@kernel.org> <587b3c08.7e85.19898424fdb.Coremail.fanqincui@163.com> <86y0rq8cf8.wl-maz@kernel.org> <56b98f57.954f.1989890838d.Coremail.fanqincui@163.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: fanqincui@163.com, will@kernel.org, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, cuifq1@chinatelecom.cn, hanht2@chinatelecom.cn X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 11 Aug 2025 10:57:44 +0100, fanqincui wrote: > > >Well, you can't know about that. We patch basic primitives such as > >atomics, system register access, and plenty of other things. These > >things need to interoperate with the rest of the kernel. > > > >It's already difficult to guarantee inside the kernel itself. Having > >it in random modules will be even harder. > > >=20 >=20 > Okay, so the kernel patches you mentioned, are they already patched > when the module is installed? Yes. > This doesn't conflict with the kernel patching. In what sense? > I mean, the specific patching within the module is up to me. No. > If the chicken-and-egg problem you mentioned exist, module > developers should avoid it in their own code.=C2=A0 We're not in the business of making the kernel more fragile and hard to maintain than it already is. So either it *always* works, or it is completely disallowed. > I think the kernel should provide modules with the ability to patch > themselves, right? Only if it is safe to do so. Which is why I asked a question in my initial reply, which you still haven't answered. M. --=20 Without deviation from the norm, progress is not possible.