From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbcAEFHl (ORCPT ); Tue, 5 Jan 2016 00:07:41 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:16207 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbcAEFHi (ORCPT ); Tue, 5 Jan 2016 00:07:38 -0500 Message-ID: <568B4F47.5080307@huawei.com> Date: Tue, 5 Jan 2016 13:06:15 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Will Deacon CC: , , , , , Fengguang Wu , Jiri Olsa Subject: Re: [PATCH v2] arm64: Store breakpoint single step state into pstate References: <1450860731-194418-1-git-send-email-wangnan0@huawei.com> <1450921362-198371-1-git-send-email-wangnan0@huawei.com> <20160104165535.GI1616@arm.com> In-Reply-To: <20160104165535.GI1616@arm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.568B4F56.003F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c3145d60c010eff17c1b746552af5c47 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On 2016/1/5 0:55, Will Deacon wrote: > Hello, > > On Thu, Dec 24, 2015 at 01:42:42AM +0000, Wang Nan wrote: [SNIP] > The problem seems to be that we take the debug exception before the > breakpointed instruction has been executed and call perf_bp_event at > that moment, so when we single-step the faulting instruction we actually > step into the SIGIO handler and end up getting stuck. > > Your fix doesn't really address this afaict, in that you don't (can't?) > handle: > > * A longjmp out of a signal handler > * A watchpoint and a breakpoint that fire on the same instruction > * User-controlled single-step from a signal handler that enables a > breakpoint explicitly > * Nested signals Please have a look at [1], which I improve test__bp_signal() to check bullet 2 and 4 you mentioned above. Seems my fix is correct. [1] http://lkml.kernel.org/g/1451969880-14877-1-git-send-email-wangnan0@huawei.com Thank you.