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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70B9BC433E0 for ; Wed, 27 Jan 2021 03:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B349206CC for ; Wed, 27 Jan 2021 03:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235543AbhA0DUA convert rfc822-to-8bit (ORCPT ); Tue, 26 Jan 2021 22:20:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:40966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392352AbhAZUnp (ORCPT ); Tue, 26 Jan 2021 15:43:45 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73F1322B3F; Tue, 26 Jan 2021 20:43:04 +0000 (UTC) Date: Tue, 26 Jan 2021 15:43:02 -0500 From: Steven Rostedt To: Oleg Nesterov Cc: Masami Hiramatsu , Jianlin Lv , mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] tracing: precise log info for kretprobe addr err Message-ID: <20210126154302.302a3bb0@gandalf.local.home> In-Reply-To: <20210126202058.GC12469@redhat.com> References: <20210125160108.2147511-1-Jianlin.Lv@arm.com> <20210125181926.GA10248@redhat.com> <20210125133840.511b1496@gandalf.local.home> <20210126131536.f6e3a737a7b948799084fa7a@kernel.org> <20210126202058.GC12469@redhat.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jan 2021 21:20:59 +0100 Oleg Nesterov wrote: > > No, not wrong. Even offset != 0, if the symbol exists in the kernel, > > kprobe_on_func_entry() will check it. > > Yes, but unless I am totally confused... if kprobe_on_func_entry() returns false, > then trace_kprobe_create() should fail with BAD_RETPROBE even if offset == 0 ? >From what I understand. kprobe_on_func_entry() can return false if you pass in: "MOD:not_yet_loaded_module_func", but this is OK, because when the module is loaded, and the "not_yet_loaded_module_func" exists, the kretprobe will then be added. The strchr(symbol,":") check is to see if "MOD:" (or some other ":" command) is in the name, and we don't want it to fail if it is. Which is why we should have that commented. -- Steve