Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1690542ybb; Fri, 29 Mar 2019 09:20:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxozP/Pv2RiTUM6L3KWexgK83LWw0JbtBHKsF5yXm/Ko9myYjjuRDGe3DQ+P/MAhhwJLXbw X-Received: by 2002:a63:2141:: with SMTP id s1mr46737603pgm.430.1553876423615; Fri, 29 Mar 2019 09:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553876423; cv=none; d=google.com; s=arc-20160816; b=wsBbLUfhunB5sIOURPIEm9H51zDr5FSsg/f8dLTbRIlYFRLCxVB9XkfFeJmVk0kV+1 SSEm2pcCGdwhm4IN2x8OEEsMIcZHT+Z4gAI+aRikdAazhEKYL3WcYBRGsU5kBVTIbdyb 8ax1jRjgFeV4mWWwv6Y3ZvxbBwZ86SDXLyJC6TAti29hR8CzwvOkLCu0XlTQCu8c4unA Uav1tJ2cQOqRS8dje/bC6tWLsu0xsbSY6RFrJjbDv1YU34kChwRUCglvRXCc4mPtxMNy GXxblFGIO16KQMxT2DL9/WCfqRTioKlz3HnpVeY6xaV1Ombwn22frvS11FdKKay8xOS2 jMNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LYd48GLm76RNcVQs4i+gAMwkQz6rMYUcGPDpnr3oUI4=; b=vtHW+P/5JaJycSAzbDlH2JLY9RmEg7EpPInQNvnS2RjDMFSq3yCtGG2SzZJkoTHYXe jzMpVk+Zl4T6K0z8MOdc7/GdrE02Wq90iHoAXBE5AkcmlgiK75xpXq931CmyDIq1f4fh RYIXwJ2MimIGEJpjKoTedRql9M1JT1t4Gde8cJ/lTbtd9WMYDh+QGIBGq4DoxYUCEUX9 DshnC+hIkpttu9ZF7cGbZXYTPBqrqM68IgdRpjUh4b5AAfw0555wnhALwhC1GQgVngi9 y5LsCysC8fzdAnqbUsMfLurAPY9rOgoQUoPWTr1Pik6qIW/kS35uIVbDWLQWPF7OqI5E Ssng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C4ks38dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59si2282422plp.100.2019.03.29.09.20.07; Fri, 29 Mar 2019 09:20:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C4ks38dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729646AbfC2QTT (ORCPT + 99 others); Fri, 29 Mar 2019 12:19:19 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52848 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728839AbfC2QTS (ORCPT ); Fri, 29 Mar 2019 12:19:18 -0400 Received: by mail-wm1-f65.google.com with SMTP id a184so3109023wma.2 for ; Fri, 29 Mar 2019 09:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LYd48GLm76RNcVQs4i+gAMwkQz6rMYUcGPDpnr3oUI4=; b=C4ks38dkiOwmMeTZpv1vrTkBNwFJr2oxk/x5+5YVAKFaiseBHMPG3NFWu3B2mtPUi9 tqI05KO7SKMWv8SeTasRpZKF0pb2amZZeVRHmu5iNz2n/0u9/DXutfyHVUV5Kzfo1cJ+ r8cpbuYzt3yNYLAdwSth+AyhoSECqq+xqAaueARsRe4u/z73dSIifXhbbK4Yi8PpaIcA 6h83lw+eQ799iet3UeQc8WyY+skfxlEYdIeXc4wQ3r9coNbmvzkI07zKuKyGbwArWnCx l+Kv0ajrZrfO0xCW2zqhXHY0wVAWF1GJLDtzBjUAdEUYdBv5r/OuL8A7m5V5Cy7meWNj 5xVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LYd48GLm76RNcVQs4i+gAMwkQz6rMYUcGPDpnr3oUI4=; b=E7p28X8QkxxTFVGxq9pr1ZoAPSc/kJgTwZ2tvYYNItXQaQiuyuufTuNwLQRyLPXxKq Fmy1L8eVUeCVeQRKoKDokHNlXv0X06BAGFkhBNBCzJKkOpRBFRemaaGAukio+uF0UPfd IKII91sadhrxsY6RsLlstfhzrJF6mHHrXNM/422q1qp/hqzPUH+nVSM3c5CTH+EYLtP7 4z+rjCH6DtsjP03ys5lq4BgkVX+UsrJ2IFaUiFm7PLvSrpeRynEs0ADsB+KQZAXOCNAV 5Ew7EkQIUrx5WZeIYT4r8IpN4FGcEEKFXa+uf3bRFEwdIWEkGCnJiqAjAQ6czTSMs2rl 9CtA== X-Gm-Message-State: APjAAAVWjdRwwSVHvBRG5HRtVXobjm9ZiGMhKe/+liHvK8LmeLBEn9l/ 67daelBUngWL/8fs280eYuGIxpJ3GSY1LbSj+cc= X-Received: by 2002:a7b:c404:: with SMTP id k4mr4350292wmi.117.1553876357162; Fri, 29 Mar 2019 09:19:17 -0700 (PDT) MIME-Version: 1.0 References: <1553865808-30604-1-git-send-email-yuzenghui@huawei.com> <237b00d0-8a8d-ede6-91b1-c3e23e61925c@arm.com> <20190329105332.6b7fc1ae@gandalf.local.home> <20190329114558.586a4f84@gandalf.local.home> In-Reply-To: <20190329114558.586a4f84@gandalf.local.home> From: Zenghui Yu Date: Sat, 30 Mar 2019 00:19:05 +0800 Message-ID: Subject: Re: [RFC PATCH] irqchip/gic-v3: Make gic_handle_irq() notrace To: Steven Rostedt Cc: Zenghui Yu , Mark Rutland , julien.thierry@arm.com, Marc Zyngier , catalin.marinas@arm.com, suzuki.poulose@arm.com, Will Deacon , linux@armlinux.org.uk, LKML , Ingo Molnar , james.morse@arm.com, wanghaibin.wang@huawei.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 29, 2019 at 11:46 PM Steven Rostedt wrote: > > On Fri, 29 Mar 2019 23:35:59 +0800 > Zenghui Yu wrote: > > > Hi Steven, > > > > On 2019/3/29 22:53, Steven Rostedt wrote: > > > On Fri, 29 Mar 2019 13:58:40 +0000 > > > Marc Zyngier wrote: > > > > > >> On the other hand, if you can generate pseudo-NMIs, you could end-up > > >> tracing gic_handle_irq whilst being inside the tracing code with > > >> interrupts being notionally disabled (and that could be pretty bad). > > > > > > Actually, that should still be safe. The tracing code is expected to > > > trace NMIs. > > > > > > Now the entry of an NMI can be an issue because of the way tracing is > > > enabled. But this would also cause function tracing to crash, which was > > > not stated. Does function tracing have the same issue, or is this just > > > with function_graph tracing? > > > > This is just with function_graph tracing. Function tracing works fine. > > Then we can rule out the break point issue. > > > > > > > > > This is because a breakpoint is added to all the places that are going > > > to be traced so that the "nops" at the beginning of function calls are > > > going to be converted to calls to the tracer. Now that means a > > > breakpoint is being added at the beginning of gic_handle_irq(). I don't > > > know how this pseudo NMI works, but we have notrace set for do_NMI > > > because breakpoints at the entry (before it can fix things) causes > > > issues. But this still doesn't make sense because the gic_handle_irq() > > > call doesn't fix things up either, so other functions that are traced > > > by gic_handle_irq() should blow up too, which appears (by the patch) > > > not to be the case. > > > > Thanks for your explanation. I will read the code around further, and > > get back to you if there's any discovery. > > Well, if it only affects function_graph tracing, then we don't need to > investigate the break point issue. If it was the break point issue, it > would cause function tracing to break too. OK. > > Also, which architecture is this for? ARM or ARM64? on ARM64. thanks, zenghui