From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754256AbbKQQfo (ORCPT ); Tue, 17 Nov 2015 11:35:44 -0500 Received: from mail.efficios.com ([78.47.125.74]:48956 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbbKQQfm (ORCPT ); Tue, 17 Nov 2015 11:35:42 -0500 Date: Tue, 17 Nov 2015 16:35:35 +0000 (UTC) From: Mathieu Desnoyers To: rostedt , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , "pt, masami" Cc: LKML Message-ID: <559989072.111063.1447778135704.JavaMail.zimbra@efficios.com> Subject: trace: trace_kprobe.c always shows interrupts off MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [78.47.125.74] X-Mailer: Zimbra 8.6.0_GA_1178 (ZimbraWebClient - FF42 (Linux)/8.6.0_GA_1178) Thread-Topic: trace: trace_kprobe.c always shows interrupts off Thread-Index: yh4ixpeJw4KpSJGfPXl/GCQEQnD8Dw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I notice that trace_kprobe.c does local_save_flags() within __kprobe_trace_func(), which is called (at least on x86) with interrupts always disabled. This is then used as interrupt on/off state within the recorded event, which is misleading. I also don't understand why arch/x86/kernel/kprobes/ftrace.c pre handler disables interrupts, considering the following comment above arch/x86/kernel/kprobes/core.c: kprobe_int3_handler() * Interrupts are disabled on entry as trap3 is an interrupt gate and they * remain disabled throughout this function. A struct pt_regs is received by this function, but I don't see any way to get the state of irq enable/disable from struct pt_regs across architectures. Any thoughts on how to fix this ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com