Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4260180pxb; Tue, 2 Mar 2021 10:26:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxxzVTnxhZwpoKLw7RgenRK0PYPp9LIp1PcDnfyecs7PEYA+7lIqSpetF0IW0jrmu4F8at X-Received: by 2002:a17:907:2054:: with SMTP id pg20mr14730670ejb.213.1614709562183; Tue, 02 Mar 2021 10:26:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614709562; cv=none; d=google.com; s=arc-20160816; b=YEI84JFe9QnahgXuv/fNBfb7Fsk60kCTwVVKXD2/X2C8NJt6ey4C+FFRkT2gROkJSn kOyQvlW2lSkU8zhPHYqLSjuuO3W1cGblxshgxEOuaS6fTRfbItlJLG2H+/XN+H/Ko4EV YTvGBwdGFY3/Kr7O4Ikz3KQnShnL5Umzo3eE2sX0iqVvUO55L2mIQLj/N8ojyO9CZc8b atQy8ooWO2BTor4wAMFTpYTZ1nePExz9UVTLezkuLgcZF8oDrXLrifjOqAkpLBZg9Tez 2qz5MJ/OJvEBY1k6X++ouyX9UjGuR205Q+PDpft1XpYpdj227u+scSESJMhtjnsE4+JQ MMZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=e5QcuvQvAELmPEj37JyS+niM1BfUaOGe9T9ipu2rh+I=; b=HTxjAh48IuhubD39jZqWkcjK3CdVBepKmnsDxLBti88bxDk/Cvpn3d6LfDtNpUz4up kUnTqKYjsWFj+6vyiXV+ymloX/Fk8BFoSBMrV95fCO5ysa3kpUPsGlScL3/cS4OfUR2z pYptS0VbZKQsl41//0jEljhPRz1GrQEF4P9EU+XmrXXfNLIy5jCZRAdrfot50wzkPlTZ 5SHZ4WgU4RcKpSgHOk7/yLO0knNsceEH9XSQB9P7kVDez/Wjb/T6f4oGvmvqHa2kTPfj kKFK+f6uLotwFbA3JA1hOcQfZV3L+62t8+I1vQk4rY/Z9fyyJZx1qH3NMHb0LumtOQf/ 23lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si13094609edu.304.2021.03.02.10.25.36; Tue, 02 Mar 2021 10:26:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1576381AbhCBE2e (ORCPT + 99 others); Mon, 1 Mar 2021 23:28:34 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:13017 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348821AbhCBBZs (ORCPT ); Mon, 1 Mar 2021 20:25:48 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DqKBv1gxMzjV6J; Tue, 2 Mar 2021 09:23:19 +0800 (CST) Received: from DESKTOP-E0KHRBE.china.huawei.com (10.67.103.82) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Tue, 2 Mar 2021 09:24:49 +0800 From: Shaobo Huang To: CC: , , , , , , , , , , , , Subject: Re: [PATCH 4.4.y] arm: kprobes: Allow to handle reentered kprobe on single-stepping Date: Tue, 2 Mar 2021 09:24:49 +0800 Message-ID: <20210302012449.23428-1-huangshaobo6@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.103.82] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On March 1, 2021 at 11:30 AM, Greg KH wrote: > On Mon, 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(+) > > What about the 4.9.y tree as well? > > thanks, > > greg k-h Yes, I tested on the 4.4.y tree. From the code analysis, the same problem exists in the 2.6.25 to 4.11 trees, and of course the 4.9.y tree is also included. thanks, ShaoBo Huang