From patchwork Mon May 17 14:00:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 440117 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1163257jac; Mon, 17 May 2021 07:56:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9+CjmKruZtjMs4SvbEeUyjWWnqgRkMDBY4AQmu4mC3XpKDpKkhh0mFCFwoi+NC1gSQmNg X-Received: by 2002:a5d:9c58:: with SMTP id 24mr308804iof.153.1621263376750; Mon, 17 May 2021 07:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621263376; cv=none; d=google.com; s=arc-20160816; b=O1IvvZf/pFyq3ipgnfsy8aoxF1lva8orKoZ0vrWmmnKiXMpdgvnSlnurr+Zn5nczp8 p8ayux1geqeCwYcLeSJDDagya/slNYdiQNEfx2aC6EZU7EOiKSKmY0w8GQeG/10ZMMmO gy/HjzVedeqcSHyvuivSg8vMBpEI3vKYfOxlncEAwJekGJM9iN7XXNlL6E/0QaXg9T8E 5NahKCt5c7WVyxiOrAcqR8BwiQ7xs9OqL7K+kggWwqhle8EV0f1rmEnRbW6GuCEsRpnz 8u1pG/uYBcGJUiwzOgfNCzawm2bwOEo5NSkaAS3UJVfhxp3y107r83fzpJcBd1cikwZj L9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M9hmBPk9vD70pfjUCEaxSXrul2SSXBg9NH4BjufKDT0=; b=IaKeWCfjgftSzxuinEeabPoRjLCnuwwGa4ElwslXa/wtoXbIkYkqBLboYFrHSEkrty J/Mt6WpYiMF/GEEy49GDkP42ZRir1RoGQLEalBgLGDKO4/htnLdPiVHJPYlVEHFAddhj C1/wa9yJ2km6WSCenUyo3ZcDsM4C1JUpMyydCc7Y/0KVeFcd09dEitqgocjNIEASkMif Mm4uhdgO7r1np6nDPab4h0JnOnDjJoAq9lE0lu1xARpeQ5QWW5SekkPakDcksa+EOcA5 e92d+/BSQ5e1QppMPNHx7jn9tzFckAUH5yl7kELVvLwt8JyIxZezhcTjzxbHfqczRNBr fggA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N4Q3XbJ3; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l126si2054257iof.101.2021.05.17.07.56.16; Mon, 17 May 2021 07:56:16 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N4Q3XbJ3; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240598AbhEQO5a (ORCPT + 12 others); Mon, 17 May 2021 10:57:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:49488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242261AbhEQOyw (ORCPT ); Mon, 17 May 2021 10:54:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0FF97619B9; Mon, 17 May 2021 14:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261488; bh=Bd27FTLLPS9PaoiW4XggeiQQjUdXygHDGB8ss44Di7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N4Q3XbJ3SJ1R2tCaGd40SazK05mhewSuzhK7fRzFjg/yysqx1zvtwozgRGfFyfpIW qIHL5diioyeCUADOjaWKS88ebIrDz5uBmfFX/VD3fb8umiZnKH383JtFpJvoqs+iqZ tUfIqz0Ed0XpXOIy6RFSNZMzudsYvHU+BjLQwDsY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhen Lei , Wang Nan , Will Deacon , Russell King , Sasha Levin Subject: [PATCH 5.11 121/329] ARM: 9064/1: hw_breakpoint: Do not directly check the events overflow_handler hook Date: Mon, 17 May 2021 16:00:32 +0200 Message-Id: <20210517140306.206625365@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.043055203@linuxfoundation.org> References: <20210517140302.043055203@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit a506bd5756290821a4314f502b4bafc2afcf5260 ] 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. Comments from Zhen Lei: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210207105934.2001-1-thunder.leizhen@huawei.com/ Fixes: 1879445dfa7b ("perf/core: Set event's default ::overflow_handler()") Signed-off-by: Zhen Lei Cc: Wang Nan Acked-by: Will Deacon Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/kernel/hw_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.2 diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 08660ae9dcbc..b1423fb130ea 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; }