Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3827160imu; Mon, 7 Jan 2019 10:08:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN6flh72G5U9Vf5sxzx1n3TL0CQ9tQAk/gVLnuar4S1UicGW3UgGCzXPUz3IdB7htySEHC0P X-Received: by 2002:a63:6442:: with SMTP id y63mr11731075pgb.450.1546884516320; Mon, 07 Jan 2019 10:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546884516; cv=none; d=google.com; s=arc-20160816; b=EqGKuFfVNK/C6z2rNt8IP2Lkq6eqeK1cj8cT6ZtWkzD1VZDeKcHRcUDrnmMaLAke/7 pVv1ymcd8mCEbJQN2UMtb8/nF3eHZpyq6hHNYgGBME6kvgWx+dSb4VdCUWY3I15YaDG+ 0nQ5eR9W14bkugDZTU3fA6IkM/deXF93W24yCShrncd0utADE65PyDnEE0B5OCcpWAnt MpAUMO8WW9/hSccpQXOLs3Nwt4Fzvrds7qDvQBNNdWIVl8KxMe26cWMEWcX/ruXrXCZl uPiQ/Ep08NojKOorotltGy5JQvtlMiOpgakb15qU4YPlnCgK4uNqJEDO1EJtGbIRnmYp dvug== 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:subject:cc:to:from:date; bh=ScprU942SvHkEbqMZsL59DdGXXD/64im4yIRBR7vpdI=; b=SaXQLG9BPUBGlJ0gAFSa6XQN2K78oM4TWYhAkII+8tUgSkWJkEerLGECC4ueq6LwWq 7LxExAY4hAsOEha8M1r5lo8KkoiySLdwhvvZX6y4b2kxgKalyzi1PhUULlu345Si5fP4 yInuHWO7BUJ78RMVGKxj3U1eWf/p2aoywc/2FTfwuWhX+GCOoIYwPv7PM7+V8WDYB5KB DdVVYv9YciTtMcM3ZXn6mHw0ZDfbYRpwOk2lZrzdnWFmIFV2q8e76VnMZnAcZRO4t2Tq FE7CFq6uC7TYCK4YQkKKuERrtggK3AMTd3xjmWBqdc+fe4TXag3zRTElGHVJGh1tWbs9 z6Cg== 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 v7si4488185plo.12.2019.01.07.10.08.20; Mon, 07 Jan 2019 10:08:36 -0800 (PST) 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 S1727927AbfAGR3y convert rfc822-to-8bit (ORCPT + 99 others); Mon, 7 Jan 2019 12:29:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:42922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727176AbfAGR3y (ORCPT ); Mon, 7 Jan 2019 12:29:54 -0500 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 CF2F42087F; Mon, 7 Jan 2019 17:29:52 +0000 (UTC) Date: Mon, 7 Jan 2019 12:29:51 -0500 From: Steven Rostedt To: Andrea Righi Cc: Masami Hiramatsu , Ingo Molnar , peterz@infradead.org, Mathieu Desnoyers , linux-kernel Subject: Re: [PATCH 2/2] kprobes: Mark ftrace mcount handler functions nokprobe Message-ID: <20190107122951.1f843dc6@gandalf.local.home> In-Reply-To: <20190107145536.GA1944@xps-13> References: <154686789378.15479.2886543882215785247.stgit@devbox> <154686795211.15479.15577152313750689302.stgit@devbox> <20190107145536.GA1944@xps-13> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Jan 2019 15:55:36 +0100 Andrea Righi wrote: > On Mon, Jan 07, 2019 at 10:32:32PM +0900, Masami Hiramatsu wrote: > > Mark ftrace mcount handler functions nokprobe since > > probing on these functions with kretprobe pushes > > return address incorrectly on kretprobe shadow stack. > > > > Signed-off-by: Masami Hiramatsu > > Reported-by: Francis Deslauriers > > --- > > kernel/trace/ftrace.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > index f0ff24173a0b..ad4babad4a03 100644 > > --- a/kernel/trace/ftrace.c > > +++ b/kernel/trace/ftrace.c > > @@ -6250,7 +6250,7 @@ void ftrace_reset_array_ops(struct trace_array *tr) > > tr->ops->func = ftrace_stub; > > } > > > > -static inline void > > +static nokprobe_inline void > > I think we need to #include , otherwise: > > CC kernel/trace/ftrace.o > kernel/trace/ftrace.c:6219:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ > static nokprobe_inline void > ^~~~ > > kernel/trace/ftrace.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 3a58ad280d83..0333241034d5 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -32,6 +32,7 @@ > #include > #include > #include > +#include > #include > > #include And zero day just caught it too. Masami, want to fold this into your patch and send out a v2? -- Steve