Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3504304pxb; Mon, 24 Jan 2022 10:57:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXxs3U18VA1Vix58mNcmRmoeVbDptlhSuXPpuUuWuli0fe5BHf3GbkVUhxNmUg9jf97IT6 X-Received: by 2002:a17:90b:38ca:: with SMTP id nn10mr3217270pjb.205.1643050637097; Mon, 24 Jan 2022 10:57:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643050637; cv=none; d=google.com; s=arc-20160816; b=HGIxijJ/W2j+OUoYS+2P/U/BCpCQxaynjY8jyx/hmQskvVkHnjY2Am2fnPS83CY16Q pMQ3igFKYox3XL16bm1x07Lr9f8a1vQw5xPjSKyx01PGhRVlVLZqDmzNDJsWLj3uA+pC RhUoMPV+gmCoqqVpGvTQhitDBmtOmLdJSVLLmmrgrU8vJeJMXaFeA9bsf8yeEG0SbWDE T761Gw8+dUOFryykDimD6mFmNDGu7eLNyhhAxJMGuvLwvGCeXk9qVleJlMCfYm6cAyqW YNDEGhJqxtEyUgX/OUPYU0a4zuUrX6ZOIilDsjdGEfFHS7vj4De83U3EGuWKV7B7y0eN 588w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=iXSCP4ZObe4nTUzD2oMyOCtsd7fqn/2VzXgVWE4IOP0=; b=ndVbvhMjlTliCdZ9ZomNHE+b8eKSnagjBB4+i0rnYCvHrpakzZrR2w1/PmpWeUj0Ox 5Dqqafn63jll/AMfbd+PbCXDJ2VeXSx5G5x9dRJNSQZf6DNpm5ckbOI3oucj1o18XJ60 nHpQxWUTTcK4kjg9xURVlkOF5uiP0Gh6w8U537YVE2EgMMJMtWgrJ/NTIBnXqNfuhg6o /k2ZxeJtoL2zOIeHQevM0db3f4G8UovzJDM+GBUxM6EjHoYMj1UPSClu5atFE7szb3/T CrSNFGHcJ7ZblyXfYpb1YnKqaP0jUFEkHguzkE5qHGsW8E0w63QsVgQ+lrxYYxkDsYom ZROQ== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u42si15297265pfg.207.2022.01.24.10.57.04; Mon, 24 Jan 2022 10:57:17 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231423AbiAXJTp (ORCPT + 99 others); Mon, 24 Jan 2022 04:19:45 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4444 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232155AbiAXJTc (ORCPT ); Mon, 24 Jan 2022 04:19:32 -0500 Received: from fraeml743-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Jj4854kSmz686qc; Mon, 24 Jan 2022 17:15:17 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml743-chm.china.huawei.com (10.206.15.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 24 Jan 2022 10:19:30 +0100 Received: from [10.47.89.21] (10.47.89.21) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.21; Mon, 24 Jan 2022 09:19:29 +0000 Subject: Test 73 Sig_trap fails on arm64 (was Re: [PATCH] perf test: Test 73 Sig_trap fails on s390) To: Leo Yan , Marco Elver , Will Deacon CC: Thomas Richter , , , , , , , , "Mark Rutland" , "linux-arm-kernel@lists.infradead.org" References: <20211216151454.752066-1-tmricht@linux.ibm.com> <90efb5a9-612a-919e-cf2f-c528692d61e2@huawei.com> <20220118091827.GA98966@leoy-ThinkPad-X240s> <20220118124343.GC98966@leoy-ThinkPad-X240s> From: John Garry Message-ID: Date: Mon, 24 Jan 2022 09:19:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20220118124343.GC98966@leoy-ThinkPad-X240s> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.89.21] X-ClientProxiedBy: lhreml709-chm.china.huawei.com (10.201.108.58) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/01/2022 12:43, Leo Yan wrote: Hi Will, Can you kindly check below the question from Leo on this issue? You were cc'ed earlier in this thread so should be able to find more context, if needed. Cheers, John > On Tue, Jan 18, 2022 at 12:40:04PM +0100, Marco Elver wrote: > > [...] > >>> Both Arm and Arm64 platforms cannot support signal handler with >>> breakpoint, please see the details in [1]. So I think we need >>> something like below: >>> >>> static int test__sigtrap(struct test_suite *test __maybe_unused, int subtest __maybe_unused) >>> { >>> ... >>> >>> if (!BP_SIGNAL_IS_SUPPORTED) { >>> pr_debug("Test not supported on this architecture"); >>> return TEST_SKIP; >>> } >>> >>> ... >>> } >>> >>> Since we have defined BP_SIGNAL_IS_SUPPORTED, I think we can reuse it at >>> here. >>> >>> [1]https://lore.kernel.org/lkml/157169993406.29376.12473771029179755767.tip-bot2@tip-bot2/ >> Does this limitation also exist for address watchpoints? The sigtrap >> test does not make use of instruction breakpoints, but instead just >> sets up a watchpoint on access to a data address. > Yes, after reading the code, the flow for either instrution breakpoint > or watchpoint both use the single step [1], thus the signal handler will > take the single step execution and lead to the infinite loop. > > I am not the best person to answer this question; @Will, could you > confirm for this? Thanks! > > Leo > > [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kernel/hw_breakpoint.c