Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6217362imd; Wed, 31 Oct 2018 08:29:13 -0700 (PDT) X-Google-Smtp-Source: AJdET5fOwPUAIoKKrvBNcyntIepU17yky2N5iNQtFjPT4+44l4kO+Oc04tNS0+CTm+iuFCLoTkTy X-Received: by 2002:a63:3842:: with SMTP id h2-v6mr3553778pgn.300.1540999753619; Wed, 31 Oct 2018 08:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540999753; cv=none; d=google.com; s=arc-20160816; b=0SsY7R5V64GoU86fTg5m3SHwOV69ETOuScMfvUMCuehXyOGRTXJpe1+MroLMmigubd IbLj+OdQrML0Nas6opY9BZNCMR4Vkmh0mhwDOiKfqvrLNICvswEmi5vvZ+6vMijYYnEW eYVbedUi0Bzzd0jcUUy7Nt6BFmVnSTpasvUeG89YQwEfJMKVhNQ5HCyrfzCas9HJTh+n /P+Rk3MKk9CYczCb48aq/qnqb4zR+M45DWq4q74oEYXfXP08s4UkAkEVqcOUwNz36+Zw cFGgHk8HbzXqQPr2AgTVuX3pCjyuydJJvxchMkdbET+lCLbpXHDyW4+DEjC43udeV3xt uR2w== 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=glCCZRlCzm83uuVjKwiUWpLXDjs8e+4Eh85l3eRxCXv6i4cZL4m9j2Qe6pYEfGmWTl fD0NxWWo4YuFN/OY+64JgYz4flev0TnQGnEweJjm0zZ2nt3LcDAwoGsMwYZbQXyhP9OG aoxMXrEmQfokhS0pV3nx528JgmR7TQr1qW8B0bP+eYFwLc9e/LAs9WPz7Th6ti9oz/qJ 20Vx5T2mVtx2ACYdzpCxZCh6oncjmJ+uFbwzLLG9shUirsOJ302Y+/h1Y8/ro6SNRYKH uTxRndvYYzAH2TtPQGS1XAArqE9xGvVbMV8/rwtrR6iV11Ak82ZrVzKwilFfwOTIQGWd C9Dg== 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 e67-v6si16870967plb.401.2018.10.31.08.28.59; Wed, 31 Oct 2018 08:29:13 -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 S1729579AbeKAAYx (ORCPT + 99 others); Wed, 31 Oct 2018 20:24:53 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:35652 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728698AbeKAAYw (ORCPT ); Wed, 31 Oct 2018 20:24:52 -0400 Received: from smtp1.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 62960A11EE; Wed, 31 Oct 2018 16:26:21 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id ryuJHW3PXG4w; Wed, 31 Oct 2018 16:26:20 +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 v2 2/2] trace: remove kretprobed checks Date: Thu, 1 Nov 2018 02:25:43 +1100 Message-Id: <20181031152543.12138-3-cyphar@cyphar.com> In-Reply-To: <20181031152543.12138-1-cyphar@cyphar.com> References: <20181031152543.12138-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