From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Cook Subject: Re: Tracers+cyclictest causing kernel oops Date: Fri, 21 Jun 2013 15:58:58 +0100 Message-ID: References: <20130503160546.GF8230@linutronix.de> <519B57A7.1010901@linutronix.de> <51A86C1A.2040100@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: RT Return-path: Received: from mail-pa0-f49.google.com ([209.85.220.49]:36550 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423052Ab3FUO66 (ORCPT ); Fri, 21 Jun 2013 10:58:58 -0400 Received: by mail-pa0-f49.google.com with SMTP id ld11so7882691pab.22 for ; Fri, 21 Jun 2013 07:58:58 -0700 (PDT) In-Reply-To: Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Fri, Jun 21, 2013 at 3:17 PM, Tom Cook wrote: > On Fri, Jun 21, 2013 at 12:21 PM, Tom Cook wrote: > [snip] >> I think I'm nearly starting to get my head around what's going on >> here. The USB driver uses FIQs, which normally isn't a problem >> because nothing would interrupt the FIQ handler (or if it did, it >> wouldn't generate a page fault). But cyclictest runs at a higher >> priority than the USB handler and generates page faults (at least when >> it is initialising). Eventually it interrupts a USB FIQ handler and >> the memory manager doesn't know what to do with a page fault in a FIQ >> handler, so it oopses. Does that sound about right? > > Or, of course, perhaps the tracer is instrumenting the USB FIQ handler > with a hardware watchpoint. These turn up as data aborts, which are > unhandled in FIQ mode. Some evidence for this is that if I use > set_ftrace_filter to restrict the tracing to only a few system > functions then the crash doesn't happen. On that note, is there a way to disable ftrace for fiq handlers in the source code? Something must be done about hard irqs, since data aborts are not handled there, either. Does trace_hardirq_enter deal with this in some way? Tom