From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbcEPWIh (ORCPT ); Mon, 16 May 2016 18:08:37 -0400 Received: from mail.kernel.org ([198.145.29.136]:41360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbcEPWIg (ORCPT ); Mon, 16 May 2016 18:08:36 -0400 Date: Tue, 17 May 2016 07:08:26 +0900 From: Masami Hiramatsu 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: <20160517070826.6b3464c53d69ba7af14d68f8@kernel.org> In-Reply-To: <20160516095833.08478147@gandalf.local.home> 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> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May 2016 09:58:33 -0400 Steven Rostedt wrote: > > Nice work Masami! > > On Mon, 16 May 2016 21:32:50 +0900 > Namhyung Kim wrote: > > > > > -/* This is global to keep gas from relaxing the jumps */ > > > -ENTRY(early_idt_handler) > > > +/* This is weak to keep gas from relaxing the jumps */ > > > +WEAK(early_idt_handler) > > > cld > > > So IIUC, this -mshared option disables the optimization on branch > > instructions and generates slightly bigger code. Not sure how much > > affected by this though. > > > > Steve, do you think it's better to use this option? > > Can we solve this by doing the same thing it did for the kernel? Looks good to me :) Reviewed-by: Masami Hiramatsu Thanks! > > -- 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) > -- Masami Hiramatsu