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 5ACA72DC321 for ; Mon, 11 Aug 2025 08:56:01 +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=1754902561; cv=none; b=go278/FgECaLFw06qNVv7eywN62DWRmhlRhJ6wdGBcqVowrz4xRS5w4/uGj3rCzgqSNttQ12OIdAkByqbb/8756flDkWcnBJoXloPx6wAezXTmG+64CuQB/VAjBQ4utpRJCtVO5MG2hcOaCVlf3+FXN6MSvq4giFRFLYp2FdXZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754902561; c=relaxed/simple; bh=lNj1WYQDuAybp9hh5uHTdOd6pAu51sUyTeB6rUxBVoo=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=JrREcjSu79U5EKAXPK5MUFieXvTlLf8Nlfw9nNvSBFBsx1znd8yftwhII6WLGyrI/JXbw3BhecqI6I5zaBL9swmkmLnSjcka+zNtcOxv0uEvcxoPEFysBxMvqtLWPpkS5zk4Nozzxil4wWa8QMdB4vWC8VgeUS9fABSb3pYw8qc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p7Lv2aqR; 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="p7Lv2aqR" 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) 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=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 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.