From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD58D199223 for ; Mon, 11 Aug 2025 11:49:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754912974; cv=none; b=C3ixGSFUg0ULYYKjHKlB11l60Q7ri1ZmMiQHBe0GKZSXRA/cr0mNAprJyq01lAPNE4VdF/cXMeKOzGv++V7EBPf5cjMoo73wgWQufWHQrjsfscB/2IFTs77yL7bDS/3RKHu2vwxREmoP7pKMh2a4AWbxgNWE7O1zuLbIzRHqnCs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754912974; c=relaxed/simple; bh=QWJh3XA4bQPH/hLuxXXWVMN3sbdcGGCp6Qd7aRGBJRo=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=gXYln+dh83TH+DaKchycVjzdM9IqLSUCd1lRz3V55s2bHi+0vBNTFAf0Cn7UMxWLBTN6GftnJ2yKt+Ovs9tVzvnVGudKsmb0zJdjH0BuFfGZ2ljNHD06takJP6vBGm4Zagi/37+Ecdf1FkZNKaSyoGAvPexa1p4FXAO0cPs0kNU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kY6EvQcK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kY6EvQcK" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.