From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58495C433E0 for ; Thu, 18 Feb 2021 02:06:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14B776146D for ; Thu, 18 Feb 2021 02:06:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14B776146D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Qgbsv4y7DyL+AONCO4beClPBwd7+JCMw0GVPZKKA5Zs=; b=JVH5DG1vXxZJsbUB9bAitQ7eK aKarJmjXevOId0iXF76TMrTKQrU8GL+7vabMA6ETWL5E2EC1L55fd3axZl1jJajpSrceY2S/pz8rx g4p6omcrevau5e51RjvPcwvmfy0K/4H9jXiwgSt90M0x7Vat7iJgCMz7Qh+6hAgZLUnEXj3u9w/2j 1CWXwslE17qrMDL8Nayan2fj3EoMokqsN1EmLdsHVQxMxsRRFzHCsKaGUfcy0wL48HfUfWYoMGUCx C/4uJUM4o0nSH+ty5O1lDSPLNTY7P64GCGJ2/qsjmUaWzdHoc2a1DwJXzNwq31Kp7YsxvWWAw44Mv YtAXTjoYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCYfd-0001Ej-HB; Thu, 18 Feb 2021 02:03:57 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCYfZ-0001DI-E6 for linux-arm-kernel@lists.infradead.org; Thu, 18 Feb 2021 02:03:55 +0000 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Dgycg19bkzlLkD; Thu, 18 Feb 2021 10:01:39 +0800 (CST) Received: from [127.0.0.1] (10.174.179.202) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Thu, 18 Feb 2021 10:03:22 +0800 Subject: Re: [PATCH 1/1] ARM: hw_breakpoint: Do not directly check the event's overflow_handler hook To: Will Deacon References: <20210207105934.2001-1-thunder.leizhen@huawei.com> <20210212100159.GA30991@willie-the-truck> From: "Leizhen (ThunderTown)" Message-ID: <16641f07-e2fd-f3d0-88de-c4c5deb2ad45@huawei.com> Date: Thu, 18 Feb 2021 10:03:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20210212100159.GA30991@willie-the-truck> Content-Language: en-US X-Originating-IP: [10.174.179.202] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210217_210353_772034_8080AAAD X-CRM114-Status: GOOD ( 17.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Wang Nan , Russell King , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/2/12 18:02, Will Deacon wrote: > On Sun, Feb 07, 2021 at 06:59:34PM +0800, Zhen Lei wrote: >> The commit 1879445dfa7b ("perf/core: Set event's default >> ::overflow_handler()") set a default event->overflow_handler in >> perf_event_alloc(), and replace the check event->overflow_handler with >> is_default_overflow_handler(), but one is missing. >> >> Currently, the bp->overflow_handler can not be NULL. As a result, >> enable_single_step() is always not invoked. >> >> Fixes: 1879445dfa7b ("perf/core: Set event's default ::overflow_handler()") >> Signed-off-by: Zhen Lei >> Cc: Wang Nan >> --- >> arch/arm/kernel/hw_breakpoint.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c >> index 08660ae9dcbce1c..b1423fb130ea4a0 100644 >> --- a/arch/arm/kernel/hw_breakpoint.c >> +++ b/arch/arm/kernel/hw_breakpoint.c >> @@ -886,7 +886,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs) >> info->trigger = addr; >> pr_debug("breakpoint fired: address = 0x%x\n", addr); >> perf_bp_event(bp, regs); >> - if (!bp->overflow_handler) >> + if (is_default_overflow_handler(bp)) >> enable_single_step(bp, addr); >> goto unlock; >> } > > Acked-by: Will Deacon > > Please can you put this into the patch tracker? > > https://www.arm.linux.org.uk/developer/patches/ I've added it. https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=9064/1 > > Will > > . > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel