From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754640AbcEPTwl (ORCPT ); Mon, 16 May 2016 15:52:41 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38041 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753491AbcEPTwk (ORCPT ); Mon, 16 May 2016 15:52:40 -0400 Date: Mon, 16 May 2016 20:52:37 +0100 From: Matt Fleming To: Steven Rostedt Cc: Namhyung Kim , Masami Hiramatsu , LKML , Ingo Molnar , x86@kernel.org, Borislav Petkov , "H.J. Lu" Subject: Re: [PATCH] ftrace/x86: Fix function graph tracer reset path Message-ID: <20160516195237.GE6574@codeblueprint.co.uk> References: <1463147623-2575-1-git-send-email-namhyung@kernel.org> <20160515094141.0cff3ee44f1f0fa101b98b02@kernel.org> <20160515130652.GA7745@danjae.aot.lge.com> <20160516175614.53e0ceed3ec0880526fa1799@kernel.org> <20160516123250.GA16239@danjae.aot.lge.com> <20160516095833.08478147@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160516095833.08478147@gandalf.local.home> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May, at 09:58:33AM, Steven Rostedt wrote: > > Can we solve this by doing the same thing it did for the kernel? > > -- Steve > > diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S > index ed48a9f465f8..e13a695c3084 100644 > --- a/arch/x86/kernel/mcount_64.S > +++ b/arch/x86/kernel/mcount_64.S > @@ -182,7 +182,8 @@ GLOBAL(ftrace_graph_call) > jmp ftrace_stub > #endif > > -GLOBAL(ftrace_stub) > +/* This is weak to keep gas from relaxing the jumps */ > +WEAK(ftrace_stub) > retq > END(ftrace_caller) Works for me. Tested-by: Matt Fleming