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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AC22C54E94 for ; Wed, 25 Jan 2023 09:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:From:References:Cc:To: Subject:Date:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FV27DXL4m7QmkcTo0VKiyARpoZU50lplXtflJhjfrmc=; b=sZvunxR1HizzwZwmYT+EP7QbUz JftaRXJze6YiOF585doVjoAp3pRnyUxgYS3oA0/45Nt0LcUkPbCzhltVRtUtSJmUhNwSC0zxjbu0J sKFQcixpUxLqOY96FXOjftz9oGAv3FT1A+SDEmVB5zjQ9Cxa7KHiwe2XfTZ+ELf8LAZAR0eNndRx7 Od1nDnpzFhjI5zSeKIt5szdC6oK4K3SqgWwgjdxHDQH2+h/LFk6+/zeVySfOki9G0sT3nWZsp2Rm4 NQdsxMZRZLoq5nojx9ncPOsunVo6LFZJcGXWGXna19b/W2KEIEMcKUInB2tPb3YCzzJKeyjZBabZb 8KFme/bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKbw5-006aQK-JF; Wed, 25 Jan 2023 09:19:17 +0000 Received: from mail-vi1eur05on2040.outbound.protection.outlook.com ([40.107.21.40] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKbw0-006aNJ-W0 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 09:19:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HuQFL862AD18NK+puuh2ddFzV9l48gbK4j0QZ0b/ICI=; b=rC4BL0noQe8nVUbtTO+4DGwC9TKCwYTmHDTQ0bufzWqfwqtWongA5zAUNpgPeeRsnhoh1QqM/jjTdCmEw28IQIkialbKpHD1/Skln4+s+HOyYkbpRoDo7u2r34pLRBKEYz0NFyI8BA/g5vxmvfHTEmRDnVZrWCmFNwxwgj/IG1U= Received: from DU2PR04CA0351.eurprd04.prod.outlook.com (2603:10a6:10:2b4::10) by DU0PR08MB8712.eurprd08.prod.outlook.com (2603:10a6:10:400::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21; Wed, 25 Jan 2023 09:18:46 +0000 Received: from DBAEUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b4:cafe::8c) by DU2PR04CA0351.outlook.office365.com (2603:10a6:10:2b4::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Wed, 25 Jan 2023 09:18:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT019.mail.protection.outlook.com (100.127.142.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.17 via Frontend Transport; Wed, 25 Jan 2023 09:18:46 +0000 Received: ("Tessian outbound 3ad958cd7492:v132"); Wed, 25 Jan 2023 09:18:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5be824bac85b6354 X-CR-MTA-TID: 64aa7808 Received: from 8ac90293c535.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DBD1A084-0F55-4E27-AE16-0D5B7344ECDC.1; Wed, 25 Jan 2023 09:18:35 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8ac90293c535.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Jan 2023 09:18:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JcAIjh9FbEFbgeeC/edNcC5GtFqYeYxa7z0GIviEqi+YknUnM3CJiOp+3HrHTm1xgWhM1eesFehTfwOrAnMdsAj3krvmxj2UW0zG2KOpeG4kUqtCSloVbeyd30nbDj37H8hLX5Hp+O5i7IuFa85boovqHOatCtjfTFd1tDHK/muO3OqaNFqpO5k5xU3ufgqSlHRrSEvLO4oXK1BqdBTODirRKhT0QxqM/x+LFxMkvlocx66a9QaWn1APJlimU5/e4XRlV/VpR3fuA27PNSRlj+QepTll7clrlzki+1k68ro33NK37AF0MK04biAiQCHQzSdkx9PWudQIuv9YckiPgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HuQFL862AD18NK+puuh2ddFzV9l48gbK4j0QZ0b/ICI=; b=bEO5NX+qx9GxQwwaCADERje/9t6sP9KROyECxhxdnlIUKbucCEbnbHE3ypsFcGvsiZc4heOmmM4FsI6tCE8DlAmdQMplIWtnlADwVvdmploP3tBPJm7bLQub6IEGneDQmvLWPPEo+NGixXMAqJic9llQfrSQb1tS0W6u6wIoMbn02n0srCz3Kz5h+l+4hUiJT7tu6RWpOzlhCPRKYt1nQ8sVIscFGYEc2kuOnV3TyW2EsX+uRdqbMAgFP4wxScZk6GKfBEELoT7JAHJImvC2u1FPRmz4yOtxzqy20Z/ENYwIE/6pjlR+A69YzNgsu9nGUP/kyabXs+/AZceiNHC7JQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HuQFL862AD18NK+puuh2ddFzV9l48gbK4j0QZ0b/ICI=; b=rC4BL0noQe8nVUbtTO+4DGwC9TKCwYTmHDTQ0bufzWqfwqtWongA5zAUNpgPeeRsnhoh1QqM/jjTdCmEw28IQIkialbKpHD1/Skln4+s+HOyYkbpRoDo7u2r34pLRBKEYz0NFyI8BA/g5vxmvfHTEmRDnVZrWCmFNwxwgj/IG1U= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by VE1PR08MB5615.eurprd08.prod.outlook.com (2603:10a6:800:1b3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 09:18:34 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6%6]) with mapi id 15.20.6002.033; Wed, 25 Jan 2023 09:18:33 +0000 Message-ID: Date: Wed, 25 Jan 2023 09:18:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v5 0/2] arm64: Fix pending single-step debugging issues To: Daniel Thompson , Sumit Garg Cc: will@kernel.org, catalin.marinas@arm.com, liwei391@huawei.com, mhiramat@kernel.org, maz@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, dianders@chromium.org References: <20221219102452.2860088-1-sumit.garg@linaro.org> Content-Language: en-US From: Luis Machado In-Reply-To: X-ClientProxiedBy: LO4P302CA0044.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:317::10) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|VE1PR08MB5615:EE_|DBAEUR03FT019:EE_|DU0PR08MB8712:EE_ X-MS-Office365-Filtering-Correlation-Id: d749bd69-dead-4dfb-958d-08dafeb529bb x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: BgqlCSeeLBrOQXlkA+4HuPIvuE2hdGX8pFx8tYeRCZS7Ox8dVs5paGMT00Bbfre45hFEc8klDiEjQDVoRX0jTbRRhjzCmMFDnKl/R/oeWpd/eZlWRUiQz+lM82zTJAveXGsm2af6LXcMr63b9DvdwG2Hx2FGAAZKzbVOxXu5UNCjyWLoQqP1M2gFhExJSDcEbVmtXvpLiSNwEVkaAXwa3UHugcFG94aeu9dTy5Tgpg0R3igRREp1cl6Biodavea8NZmRS54d0LfuJQFOv04KKf6nF9NayOSA8/jvFtxWBVUc/25yhhmTb9Cn4Mz5tcMvQ/VwKDlPh3ROUuJqd80wWa1C1wiR8Koj+U5AOisHTBHF24d36ZGvtZM5clx7mCppr9w0nvPNVOuq55HUw4RbUIvp6q0kicHXAMNe6aM+SNyk47L0pc3yrUGCu9+tjvTLCjvzy/se4Q1DJMkIqAFklWw2ph8PhFnY3RKy5+kSj25HIYFY6o80RyplJLQLF9Sm62X+MSvPYdsrE0AMB7SwSIGBH77ToHAggEScTKTlZJzEqowhYRQku7iFLBXNb1qBnFgoYLjO6BjPhLKFpSTyQVsi6Qg0o3TEcpHY4yf/3euEEigJ54sAs3fBtglhDwCcw6gR3DHsbKq/sSvKzzAl1ax/OQAeOCTIaAL5RlTSgzD2qUr/AymfEQPpSSTIU+LTElpJDNy/gVE1f6EXlqBbJk7v7wpvuwTS3HFqjHoxU0zavpM6ZTwxj8Sb4C9Q7ylf+AuXQ4H8BRObCZ8HiwHI4oLqqWWi1NoMGrTdv5jcFnTnzjV45B57dXHAiTJT5el+ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(346002)(39860400002)(366004)(136003)(376002)(451199018)(38100700002)(44832011)(8936002)(5660300002)(86362001)(36756003)(2906002)(2616005)(6506007)(110136005)(6512007)(53546011)(26005)(478600001)(8676002)(186003)(66946007)(66556008)(66476007)(316002)(41300700001)(4326008)(6486002)(31686004)(966005)(83380400001)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5615 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6c94c23d-66bd-418b-3d33-08dafeb52172 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A5dTc54cMmFU7s6CmIWQ2oKjCWVTrLtvsQo5fT9zh1IaahRKUu5CJSoFfJ/PdpAEaJ6hZLHDwvPldvF53Pu4xsAMGFQPlNmKDzT2W42Jvi1zNiuO0Ub1Y/WumuL38GabEFHMAagjgqo+ytYmTZj8OJfrDd0sMtWs0UfGqXcANNiyd7QhZ/QLlicY+jQhtrddMsXQVGosOnFDCrLXPdTHiLVnHegDhp5t1PPILA+GgReg4IUlLyYJUQYOGi4Z8PIkwlddScLTNug/Cpn/L7Q4RpIEagumbZbzTyYvHlLPBbcEd7zZfdAjyJutT/EjgkLn4Q8bFd/Xs1dZS41v67Yx7jRz2SOXGYqp7iCflloSU5QI1zEFrwVaJRGkb20MH+sQ5O9rmkXu0d6gtCXMT1bR/0lYwY8HLeYMEjKakpE+rMLOQsM23PMP0QevX05GNXca+wRZY5emctULRUYPqpQlhJ6pNGSl94EXmBPMH+tUbl9wcVJnxaqMxNcq93CtiSs4KtOt1TLEh5p53sNNN6axjrzgVwKjm4UOgr5bsQZnT5AQC6EzOLEyhAtb6svltDDPq1iTL9Mkf6wBvqr5V6ONAgh5eyhvQPyObm+NCsEwO34eR8SfpIYzqdABXHtsDPybojbz08zumcnfCm6FUiSsJwEla/jesAzBqByW93auLWygrrZKnqa1cF3vJ1rR+BFqkRwYGWHsw4PsHhSlGeOjmAMn8j0tZMfhb2T7yQHLnjlxrcoEXNz6dd1L3f/hn1ICSYsfagYM2smVgswwt0QPWx77LUwyHlBpTVgCqp4Azeeg+R9rDa5Ah0FzhIgLs6Ix X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(396003)(136003)(346002)(376002)(451199018)(40470700004)(36840700001)(46966006)(47076005)(82310400005)(31696002)(86362001)(40460700003)(36756003)(40480700001)(81166007)(356005)(36860700001)(82740400003)(110136005)(44832011)(316002)(2906002)(31686004)(41300700001)(4326008)(8936002)(70206006)(70586007)(8676002)(5660300002)(186003)(6512007)(26005)(53546011)(6506007)(2616005)(83380400001)(6486002)(107886003)(966005)(478600001)(336012)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 09:18:46.9041 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d749bd69-dead-4dfb-958d-08dafeb529bb X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8712 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_011913_066324_4CF98D29 X-CRM114-Status: GOOD ( 28.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Is this expected to change single-stepping operation in usespace for debuggers (gdb/lldb)? If so, it would be nice to at least test it a little to make sure it works. On 1/24/23 18:04, Daniel Thompson wrote: > On Thu, Jan 12, 2023 at 02:52:49PM +0530, Sumit Garg wrote: >> Hi Will, Catalin, >> >> On Mon, 19 Dec 2022 at 15:55, Sumit Garg wrote: >>> >>> This patch-set reworks pending fixes from Wei's series [1] to make >>> single-step debugging via kgdb/kdb on arm64 work as expected. There was >>> a prior discussion on ML [2] regarding if we should keep the interrupts >>> enabled during single-stepping. So patch #1 follows suggestion from Will >>> [3] to not disable interrupts during single stepping but rather skip >>> single stepping within interrupt handler. >>> >>> [1] https://lore.kernel.org/all/20200509214159.19680-1-liwei391@huawei.com/ >>> [2] https://lore.kernel.org/all/CAD=FV=Voyfq3Qz0T3RY+aYWYJ0utdH=P_AweB=13rcV8GDBeyQ@mail.gmail.com/ >>> [3] https://lore.kernel.org/all/20200626095551.GA9312@willie-the-truck/ >>> >>> Changes in v5: >>> - Incorporated misc. comments from Mark. >>> >> >> Since patch #1 has already been reviewed/acked by Mark and the >> complete patchset has been tested by Doug, would it be fine for you to >> pick up this patchset? It fixes a real single stepping problem for >> kgdb on arm64. > > Sorry to be quiet for so long. > > Testing this patch set has proven to be a little difficult. > > It certainly fixes the single step tests in the kgdbtest suite. > That's a good start. > > Unfortunately when testing using qemu/KVM (hosted on NXP > 2k/Solidrun Honeycomb) the patch set is resulting in instability > running the built-in self tests (specifically this one: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/misc/kgdbts.c#n74 ). Running this test using the kgdbtest harness > results in the test failing roughly a third of the time. > > The error reported is that the trap handler tried to unlock a spinlock > that isn't currently locked. To be honest I suspect this is a generic > problem that the new feature happens to tickle (this test has > historically been unreliable on x86 too... and x86 is noteworthy for > being the only other platform I test using KVM rather than pure qemu). > Of course the only way to prove that would be to find and fix the > problem in the trap handler (which probably involves rewriting it) and I > haven't managed to do that yet. > > In short, I think the debugger is more useful with this patchset than > without so, although it is caveated by the above, I'd call this: > > Acked-by: Daniel Thompson > Tested-by: Daniel Thompson > > > Daniel. > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel