Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1652717ybb; Fri, 29 Mar 2019 08:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyuy4GypISaksrwrgX6JyFeSXpmejOcdSc6EPKzB25UGRZ3bR1bv/5QKjV+fIfx/BccGcT X-Received: by 2002:a65:664d:: with SMTP id z13mr45941614pgv.389.1553873857308; Fri, 29 Mar 2019 08:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553873857; cv=none; d=google.com; s=arc-20160816; b=mzqpfiQr/5qiBg0H7ANAdz2LfztoxPYbDJLXIW4+LbyDHVrQd7DyNxd5I40Cphr4vd s/+an+yS5tE6PtSE9xs4ImSCZsjUAP1UnZSrTYbONb88ZucSSy6FUxdj6Eu5ztJ7w7zH 3H3+eu0Wztgi/wyz99Tvk/Fa4Jsp1zKDb/jNRaC2oI7pMf6SRV6ewKbzKBE/d6Cp/svF xTo8rNaq+bxdxzz/9gh2+LHNNm1xuFJjPSApEDXwFF708VvJhqpYpn2ElW18kR1cnO+O ltqi8g7IMuRV6fQYBcjUD2Bb0VgjiUm0UIEVFF9yQOSNwbvFeNzlHg3pAGAM2H5SDAbJ 87bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=uzpWeC/EuaV9cjS7v6X5cmDx/5IyEL/4FKqM226REko=; b=nAr4bNxbbAUylT6l6frj2RZQbe4AOpD6ZOiLz7jLdeoNRPQnMBvCs309Nlhpp22ThD hC2FE0fIdtyRoRSxV6zLX09GvEisJJJgl4LVf6Aa4dlH+ayjyLpPD12008B56/xVjHtD pEM2iNU8y04FlgFX1whFHyT4elXEJbAV/Q7qdhYb4ybvH1NE6MZmIBuq1EykDAJypKBi xUeBWTBhKucxPyi0o/mCiq7onoGvAQhumn8hlqStN0McxZsdhwN8RacZP0zvU2vkCIvW zjcYdR3ngCo7eA1e5kIIySjMhjLpe8on9LMSkmt6s561JdIE+u752VZtI6fe8xrmUPC5 2g7g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si2177098pld.11.2019.03.29.08.37.20; Fri, 29 Mar 2019 08:37:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbfC2Pgk (ORCPT + 99 others); Fri, 29 Mar 2019 11:36:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55644 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728853AbfC2Pgk (ORCPT ); Fri, 29 Mar 2019 11:36:40 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DBB675080E40E009727B; Fri, 29 Mar 2019 23:36:31 +0800 (CST) Received: from [127.0.0.1] (10.184.12.158) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.408.0; Fri, 29 Mar 2019 23:36:22 +0800 Subject: Re: [RFC PATCH] irqchip/gic-v3: Make gic_handle_irq() notrace To: Steven Rostedt , Marc Zyngier CC: , , , , , , , , , , References: <1553865808-30604-1-git-send-email-yuzenghui@huawei.com> <237b00d0-8a8d-ede6-91b1-c3e23e61925c@arm.com> <20190329105332.6b7fc1ae@gandalf.local.home> From: Zenghui Yu Message-ID: Date: Fri, 29 Mar 2019 23:35:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Thunderbird/64.0 MIME-Version: 1.0 In-Reply-To: <20190329105332.6b7fc1ae@gandalf.local.home> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.184.12.158] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > 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. thanks, zenghui > > -- Steve > > . >