Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp454851pxb; Wed, 27 Jan 2021 11:51:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1BZzgBjCfCyEl8MAs1pNVLqSyQhnAFJH3tHKtmrT9gWdZDlH+oNVtTu3FvkE+MBu38BMm X-Received: by 2002:a05:6402:3552:: with SMTP id f18mr10420046edd.111.1611777100626; Wed, 27 Jan 2021 11:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611777100; cv=none; d=google.com; s=arc-20160816; b=wp8KcmbaUXAsIPs5nSx43dPKM16scaZrsjLtOVGaLSaCU1H9rvDdEP5Pe0XN3TBMD2 NkiDzghr57J2K2WMrj1LgWaA3r+zqp7y7OZhas41GpSEPvqQ9Pb78/1CSkjQAXAP09dL 251JS3gxmoOmXOL5QG7xyosPc68wxKQMaID2+JxOQUjeu+SfeRFuiVFilCy4soygfWjj WrgDRNiu8TfpGScD/lXX9GuqGVBdFDg3ZXo8fTWPtq8MsVZ9y8359QHhhGc8pTtWuG/P iXuyvy9PTKmMXFGvS62GkzGINIq3gQU+d8IVj7F8Z/fq1QIOQrK5DcdS8uS7u8a6+INs xGUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Zi2eVdHgbKqJ1N11esQFomJGeW4SU2LQYrmwbfdrmCw=; b=MDUIfn4NvSlfU+5i7A2/42C6DBJAWoBpkpG3RVSZwSN0YnmZcqLCfYjv8GfiO2Kl8V uOjbqqEtvpGhpgguILYqOGLZf5NFy2W7ItP2eYcwgsvS0qR7aIc2tg6fymYZcbaTrBw3 WsKc5GxGkbsAvxC6xy7QEM69fzNooG9vBbuoWTtVYmA/qks8gJtAoczpwvuUaqdTgO5g 16Vuzu3Ja5ezVC2UOzoXItOGC54njDkFCB+D1GM4/wE1HuHBz1WpAJkkinfm/Hb8eS3Q 9+d0xA4SN6pjK5WzwcOoNwc8FLfUuCLa6KgfM1gIJm4LRW5BKAiPKi0Lmb5FPskOR2Bu 3G+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ze12si1201704ejb.221.2021.01.27.11.51.15; Wed, 27 Jan 2021 11:51:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235538AbhA0DT7 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Jan 2021 22:19:59 -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