From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753155AbdC0OJF (ORCPT ); Mon, 27 Mar 2017 10:09:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54790 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536AbdC0OIw (ORCPT ); Mon, 27 Mar 2017 10:08:52 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9A7CA8047F Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9A7CA8047F Date: Mon, 27 Mar 2017 09:08:43 -0500 From: Josh Poimboeuf To: "Rafael J. Wysocki" Cc: Steven Rostedt , Paul Menzel , Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: [PATCH] acpi: fix incompatibility with mcount-based function graph tracing Message-ID: <20170327140843.fx5y32rnc3mqiyke@treble> References: <6559f36c6c6cdc2552b0bccf31de967367aa790d.1489672478.git.jpoimboe@redhat.com> <20170324181254.gouyrbmppukrrbb6@treble> <20170324144114.16a37d47@gandalf.local.home> <5766300.HtmE7iLEgV@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5766300.HtmE7iLEgV@aspire.rjw.lan> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 27 Mar 2017 14:08:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 25, 2017 at 02:20:11PM +0100, Rafael J. Wysocki wrote: > On Friday, March 24, 2017 02:41:14 PM Steven Rostedt wrote: > > On Fri, 24 Mar 2017 13:12:54 -0500 > > Josh Poimboeuf wrote: > > > > > > > Instead I was able to "fix" it by ignoring ftrace calls in real mode: > > > > > > ----- > > > index 8f3d9cf..5c0d0c6 100644 > > > --- a/arch/x86/kernel/ftrace.c > > > +++ b/arch/x86/kernel/ftrace.c > > > @@ -983,6 +983,9 @@ void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent, > > > unsigned long return_hooker = (unsigned long) > > > &return_to_handler; > > > > > > + if (__builtin_return_address(0) < TASK_SIZE_MAX) > > > + return; > > > + > > > if (unlikely(ftrace_graph_is_dead())) > > > return; > > > --------------- > > > > > > I'm not sure what the best fix should really be. A few ideas off the > > > top of my head: > > > > > > - A real mode check similar to the above (except it should probably be > > > more precise) > > > > The real mode check hack may be good enough for now. Make sure that > > it's commented well. > > Agreed. Just to clarify, there are two bugs related to function graph tracing and suspend/resume. The original patch in this thread (which removes '-Os' from the acpi Makefile) is still needed. -- Josh