Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758742AbaKURLs (ORCPT ); Fri, 21 Nov 2014 12:11:48 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.230]:36990 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755353AbaKURLr (ORCPT ); Fri, 21 Nov 2014 12:11:47 -0500 Date: Fri, 21 Nov 2014 12:11:36 -0500 From: Steven Rostedt To: Tejun Heo Cc: Frederic Weisbecker , Thomas Gleixner , Linus Torvalds , Dave Jones , Don Zickus , Linux Kernel , the arch/x86 maintainers , Peter Zijlstra , Andy Lutomirski , Arnaldo Carvalho de Melo Subject: Re: frequent lockups in 3.18rc4 Message-ID: <20141121121136.18df4ecb@gandalf.local.home> In-Reply-To: <20141121170151.GC30603@home.goodmis.org> References: <20141119235033.GE11386@lerouge> <20141120122339.GA14877@htj.dyndns.org> <20141120221122.GA25393@htj.dyndns.org> <20141120230514.GB25393@htj.dyndns.org> <20141121141332.GA8808@lerouge> <20141121162506.GA15461@htj.dyndns.org> <20141121170151.GC30603@home.goodmis.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Nov 2014 12:01:51 -0500 Steven Rostedt wrote: > Looking at kernel/trace/trace_functions.c: function_trace_call() which is > registered with RECURSION_SAFE, I see that the recursion check is done > before the per_cpu_ptr() call to the dynamically allocated per_cpu data. > > It looks OK, but... > > Oh! but if we trace the page fault handler, and we fault here too > we just nuked the cr2 register. Not good. Ah! Looking at the code, I see that do_page_fault (called from assembly) is marked notrace. And the first thing it does is: unsigned long address = read_cr2(); And uses that. Thus if the function tracer were to fault on exception_enter() or __do_page_fautt(), the address wont be clobbered. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/