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 2BDE4CD11DD for ; Wed, 27 Mar 2024 23:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Message-Id:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R7u8LWiV7o75TN685hkG4d85pRBKOyl5V/AEa1nFVwI=; b=Y9FDwkMJWJOz3I pD/4EM+td67i64EoG07Ffxwan5PEoIsiDOfTx8rFrJqe3fIT2cp8zU9Ndm7VzDjUZE+tjRVJi00Eq J2q6Asd2I5Q0Fm69fuPNlbfYBqYe6U1FsbRaPnF3JTi9KFmT9IFMOxk0cdNwU2nY3tu9mcEmV11JU w0fdj2o6c+d1P9iDRxyX3xR0XrTYNKMwyMZt2xrcLmfo5Aq0tp4FPOCiUnfA0025ZB3sIGrdFVwkP Cfu0ha7A13hHp8Hbn+3vyPt6sp6y36j0g4hylut0QCdrL4v2a6RSLJgt3eE2MsRIzd+7JpIJ8qH5z 8obP7Wr05eGd0sINsjoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpcz9-0000000BfSM-3JPi; Wed, 27 Mar 2024 23:47:11 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpcz6-0000000BfQo-0KD2 for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2024 23:47:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 80CB0616EC; Wed, 27 Mar 2024 23:47:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7D56C43390; Wed, 27 Mar 2024 23:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711583226; bh=jU+OV0dHSp1ZxKpRZ0+i6PqAFqCMuCo98JSSgv9BlMI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nF1BuN86XRvETf583AaXG//SATz82Qzf/cHIuYpOmGfynFdKtEuR+Zz+YneJNd8Z4 5IZiWb4aL+j0ZcO6Ao2CIiu5GhhOqQJtzPvklBET5mDqLCXfl4X2YDV4mpgWpx0Xgp tWH1D17IbCE+6GK337XlgmomgGFP1PMF3T+lhJGgKYn46VIgiy08QpEzYm3eHwWoHn wCzeRA2Z4NzWc9e51DuITbo5/9I1Qe9uWP1fzLs8WFTT1I7P7qrz8i3ZTLEjK3aedn BEamMPmfnHI95BOgPyGHqilMKetiuXC4axOuNr23jZcd2TDtwUNDRMISGNMdxNV6zP QQxKjNkz9hfrg== Date: Thu, 28 Mar 2024 08:47:01 +0900 From: Masami Hiramatsu (Google) To: "Jarkko Sakkinen" Cc: "Mark Rutland" , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 4/4] kprobes: Remove core dependency on modules Message-Id: <20240328084701.84aacecba30e83a9ce08a6d8@kernel.org> In-Reply-To: References: <20240326163624.3253157-1-mark.rutland@arm.com> <20240326163624.3253157-5-mark.rutland@arm.com> <20240327090155.873f1ed32700dbdb75f8eada@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_164708_348917_B6F7F358 X-CRM114-Status: GOOD ( 28.40 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 27 Mar 2024 19:46:50 +0200 "Jarkko Sakkinen" wrote: > On Wed Mar 27, 2024 at 2:01 AM EET, Masami Hiramatsu (Google) wrote: > > On Tue, 26 Mar 2024 17:38:18 +0000 > > Mark Rutland wrote: > > > > > On Tue, Mar 26, 2024 at 07:13:51PM +0200, Jarkko Sakkinen wrote: > > > > On Tue Mar 26, 2024 at 6:36 PM EET, Mark Rutland wrote: > > > > > > > > +#ifdef CONFIG_MODULES > > > > > /* Check if 'p' is probing a module. */ > > > > > *probed_mod = __module_text_address((unsigned long) p->addr); > > > > > if (*probed_mod) { > > > > > @@ -1605,6 +1606,8 @@ static int check_kprobe_address_safe(struct kprobe *p, > > > > > ret = -ENOENT; > > > > > } > > > > > } > > > > > +#endif > > > > > > > > This can be scoped a bit more (see v7 of my patch set). > > > > > > > > +#ifdef CONFIG_MODULES > > > > > static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk) > > > > > { > > > > > char *p; > > > > > @@ -129,6 +130,9 @@ static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk) > > > > > > > > > > return ret; > > > > > } > > > > > +#else > > > > > +#define trace_kprobe_module_exist(tk) false /* aka a module never exists */ > > > > > +#endif /* CONFIG_MODULES */ > > > > > > > > > > static bool trace_kprobe_is_busy(struct dyn_event *ev) > > > > > { > > > > > @@ -670,6 +674,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk) > > > > > return ret; > > > > > } > > > > > > > > > > +#ifdef CONFIG_MODULES > > > > > /* Module notifier call back, checking event on the module */ > > > > > static int trace_kprobe_module_callback(struct notifier_block *nb, > > > > > unsigned long val, void *data) > > > > > @@ -699,6 +704,9 @@ static int trace_kprobe_module_callback(struct notifier_block *nb, > > > > > > > > > > return NOTIFY_DONE; > > > > > } > > > > > +#else > > > > > +#define trace_kprobe_module_callback (NULL) > > > > > +#endif /* CONFIG_MODULES */ > > > > > > > > The last two CONFIG_MODULES sections could be combined. This was also in > > > > v7. > > > > > > > Other than lgtm. > > > > > > Great! I've folded your v7 changes in, and pushed that out to: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=kprobes/without-modules > > > > > > I'll hold off sending that out to the list until other folk have had a chance > > > to comment. > > > > Yeah, the updated one looks good to me too. > > > > Thanks! > > As for RISC-V: > > Tested-by: Jarkko Sakkinen # arch/riscv Thank you for testing! > > I'm fine with adding to all patches because it would be hard > to place tested-by to any specific patch (e.g. if this was a > syscall I would give tested-by just for that patch). Except for the 1st patch because that is for arm64, right? :) > > Just adding disclaimer because depending on subsystem people > are more or less strict with this tag :-) > > BR, Jarkko Thanks, -- Masami Hiramatsu (Google) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel