Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp558648imd; Thu, 1 Nov 2018 01:38:32 -0700 (PDT) X-Google-Smtp-Source: AJdET5dInrfOwc6OE+C7Ap46ieU3elDTuyIMOJOiifpuu5Wrfv1iVZFj0heE3GBSE+gvl2S0727E X-Received: by 2002:a62:6d04:: with SMTP id i4-v6mr6760147pfc.131.1541061512286; Thu, 01 Nov 2018 01:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541061512; cv=none; d=google.com; s=arc-20160816; b=g25lLGkXU0kn2fgpjXTvIlxCFaAqqk/YhcTKAxtEb/RpOfArNqrPB4B3uTnHJkfopN BuEXfa8Tu4XPMjAZzTCrzOh8k2bLuPzCEIVkBAruT2YJMRw3dVxRzSEBwirh0EBbArcY QBUQ9O+6xasOcNvpNWKWUkC2u5KmpohODhlWVAKLPySLwuvi+8KDDZAHZSUT6n8HNc+k HdJdwui2K8YMQKPddzW/wEWYDtVxZJpjRdCCfEhzEpug5nvJ3maUNwCdkVOqNpb62qaY /4zQx+Dd799ZK3GBi88Gr98Mqkr51ViDKoqRqiZIiWPTNJkOUNPinVbSjhFUzipafCnO X1XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OdVsoRJOqLpn3GAKxuwuqzG8XaIf+jx9NfQWIPQRF7Y=; b=VSonIyrV91902sv3kZjqrDTCyEqZFbharJ3t6rvAKhGN6xhBxoXeuA3Kw2nnJllaj+ dN3lqImr/Qqw+BoOiWlnAmEUJqB/HC8gYwu2QPysO/eHWAhJpYisSFDP3FEuu2twVv6d /YPofapTnqckQfh+sL2KoUfjKod/+KodX0/pWuOtVUsRqCcpOzO5wos0ezHN5adOS2LR pcXnSgvNq5+bu5hv5zlL/59X5VFSNHbRuq/YUVCrXoasnN/QxzBuDe3TD9DufghGdJN/ AL3Sj2R7Nuil7/cOEBXnYpA6aktyyrbF4H09ibldum0HFzXBVZNrjazkLC+SGEe0TtHO VACA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18si681929pgf.97.2018.11.01.01.38.17; Thu, 01 Nov 2018 01:38:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728308AbeKARie (ORCPT + 99 others); Thu, 1 Nov 2018 13:38:34 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:41586 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728287AbeKARie (ORCPT ); Thu, 1 Nov 2018 13:38:34 -0400 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 314BD4B93B; Thu, 1 Nov 2018 09:36:31 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id EVgxWEYcnJev; Thu, 1 Nov 2018 09:36:30 +0100 (CET) From: Aleksa Sarai To: "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Steven Rostedt , Shuah Khan , Alexei Starovoitov , Daniel Borkmann Cc: Aleksa Sarai , Aleksa Sarai , Christian Brauner , Brendan Gregg , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v3 2/2] trace: remove kretprobed checks Date: Thu, 1 Nov 2018 19:35:51 +1100 Message-Id: <20181101083551.3805-3-cyphar@cyphar.com> In-Reply-To: <20181101083551.3805-1-cyphar@cyphar.com> References: <20181101083551.3805-1-cyphar@cyphar.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is effectively a reversion of commit 76094a2cf46e ("ftrace: distinguish kretprobe'd functions in trace logs"), as the checking of kretprobe_trampoline *for tracing* is no longer necessary with the new kretprobe stack trace changes. Signed-off-by: Aleksa Sarai --- kernel/trace/trace_output.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 6e6cc64faa38..951de16bd4fd 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -321,36 +321,14 @@ int trace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...) } EXPORT_SYMBOL_GPL(trace_output_call); -#ifdef CONFIG_KRETPROBES -static inline const char *kretprobed(const char *name) -{ - static const char tramp_name[] = "kretprobe_trampoline"; - int size = sizeof(tramp_name); - - if (strncmp(tramp_name, name, size) == 0) - return "[unknown/kretprobe'd]"; - return name; -} -#else -static inline const char *kretprobed(const char *name) -{ - return name; -} -#endif /* CONFIG_KRETPROBES */ - static void seq_print_sym_short(struct trace_seq *s, const char *fmt, unsigned long address) { char str[KSYM_SYMBOL_LEN]; #ifdef CONFIG_KALLSYMS - const char *name; - kallsyms_lookup(address, NULL, NULL, NULL, str); - - name = kretprobed(str); - - if (name && strlen(name)) { - trace_seq_printf(s, fmt, name); + if (strlen(str)) { + trace_seq_printf(s, fmt, str); return; } #endif @@ -364,13 +342,9 @@ seq_print_sym_offset(struct trace_seq *s, const char *fmt, { char str[KSYM_SYMBOL_LEN]; #ifdef CONFIG_KALLSYMS - const char *name; - sprint_symbol(str, address); - name = kretprobed(str); - - if (name && strlen(name)) { - trace_seq_printf(s, fmt, name); + if (strlen(str)) { + trace_seq_printf(s, fmt, str); return; } #endif -- 2.19.1