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 242FBCA0EC0 for ; Mon, 11 Aug 2025 09:15:31 +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-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a5BVqGRC7mt8UCz+TMj9FSxvG8dTEsxdm54Eqx1sbUU=; b=B2T9QEIdiasFa+62KHSx9nWI0h oK2V1V/791R4HEg8mP5h4G0WBPv8TIllNW2hfedSvhjQq3efKtjh5tD377P9b6D8QD/HdwpQwLthb czfBScT7yUQxL3sNbiW2rnhL66pi+LaToJztK5xNbyxRVGJWmDB8xcGj8dwrkNxyNpnxBGQuO015W L7Rktit8ZfQ/BI5VG/ODIhLiK4NxWjwseE6JNeorRRxX2Lyq+o1sn60pg69QwFPf5czXf5N8gnFIF sJF/XD+ef3VL24k6C1gIjdZrsCC9qdzpI0akEobaCxkFuXNjdEzQ3AHZNdMhNd1JzPyGRJXZbFbkK IcCAKQUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulOcm-000000072WJ-2kCY; Mon, 11 Aug 2025 09:15:24 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulOK1-00000006vdH-35In for linux-arm-kernel@lists.infradead.org; Mon, 11 Aug 2025 08:56:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 394204504F; Mon, 11 Aug 2025 08:56:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF100C4CEED; Mon, 11 Aug 2025 08:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754902560; bh=lNj1WYQDuAybp9hh5uHTdOd6pAu51sUyTeB6rUxBVoo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=p7Lv2aqR72vWDgb3SBe701yJLkpi222424qdE8zzvgeOb8BGbMi2lqDhJQzED9zZw wjXnm6Qdr76gMdJQxu1+hQLpCcKDQcoOWsac8hRnrhomMRhS+fzu71uz21l/uf6Rs9 XcHZFV/e18IIw25zmXpmGNMN4odjbyosaxbwjj3PJyunmg3MeLWF8MtAB02u0O+zFJ CVrPvWPJhVrfIOwaGscSG57XiKPbYK1l1bf4TAoKLdcBl9h45BKQHs4qKmekomlEk3 6O6G35BzS7ThxuEVZjLL4EiwtOacC5Yz3QtR56NZMqQycp9SfYDm9f5KMYEuutWDy9 ymkn+9ke4gAvA== 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 1ulOJv-0068Ao-NR; Mon, 11 Aug 2025 09:55:55 +0100 Date: Mon, 11 Aug 2025 09:55:55 +0100 Message-ID: <86y0rq8cf8.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: <587b3c08.7e85.19898424fdb.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> 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=US-ASCII 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250811_015601_803542_87EB5ED2 X-CRM114-Status: GOOD ( 15.65 ) 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 09:32:19 +0100, fanqincui wrote: > > > Hi marc, > The callback function is designed by the developer. Developers need > to use the callback function to patch their own module code. Under > this premise, developers are responsible for providing the correct > callback function. > A correct callback function implementation does not require further > patching. 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. > Furthermore, the callback itself must be executable. If the callback > function has problems, the module's functionality will be affected. Exactly. Hence my question. M. -- Without deviation from the norm, progress is not possible.