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=-17.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 6FFB8C07E96 for ; Thu, 8 Jul 2021 12:42:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DD5561430 for ; Thu, 8 Jul 2021 12:42:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231441AbhGHMpZ (ORCPT ); Thu, 8 Jul 2021 08:45:25 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:14040 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbhGHMpZ (ORCPT ); Thu, 8 Jul 2021 08:45:25 -0400 Received: from dggeme765-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4GLG801Z1tzbbYs; Thu, 8 Jul 2021 20:39:28 +0800 (CST) Received: from DESKTOP-E0KHRBE.china.huawei.com (10.67.103.82) by dggeme765-chm.china.huawei.com (10.3.19.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 8 Jul 2021 20:42:40 +0800 From: Shaobo Huang To: , , , , , CC: , , , , , , , Subject: ping // [PATCH 4.4.y] arm: kprobes: Allow to handle reentered kprobe on single-stepping Date: Thu, 8 Jul 2021 20:42:40 +0800 Message-ID: <20210708124240.20048-1-huangshaobo6@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210302012449.23428-1-huangshaobo6@huawei.com> References: <20210302012449.23428-1-huangshaobo6@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.103.82] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme765-chm.china.huawei.com (10.3.19.111) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping On Sat, Feb 27, 2021 at 05:17:01PM +0800, huangshaobo wrote: > From: Masami Hiramatsu > > commit f3fbd7ec62dec1528fb8044034e2885f2b257941 upstream > > This is arm port of commit 6a5022a56ac3 ("kprobes/x86: Allow to > handle reentered kprobe on single-stepping") > > Since the FIQ handlers can interrupt in the single stepping > (or preparing the single stepping, do_debug etc.), we should > consider a kprobe is hit in the NMI handler. Even in that > case, the kprobe is allowed to be reentered as same as the > kprobes hit in kprobe handlers > (KPROBE_HIT_ACTIVE or KPROBE_HIT_SSDONE). > > The real issue will happen when a kprobe hit while another > reentered kprobe is processing (KPROBE_REENTER), because > we already consumed a saved-area for the previous kprobe. > > Signed-off-by: Masami Hiramatsu > Signed-off-by: Jon Medhurst > Fixes: 24ba613c9d6c ("ARM kprobes: core code") > Cc: stable@vger.kernel.org #v2.6.25~v4.11 > Signed-off-by: huangshaobo > --- > arch/arm/probes/kprobes/core.c | 6 ++++++ > 1 file changed, 6 insertions(+)