From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2042.outbound.protection.outlook.com [40.107.7.42]) by sourceware.org (Postfix) with ESMTPS id AE16C385843A for ; Wed, 6 Mar 2024 13:37:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE16C385843A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AE16C385843A Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.7.42 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709732224; cv=pass; b=iFwyCE5ioMkIDeptbRZ/hOOnbt5fA/LFvkvT0b4/B42Qdnkq7N0CLrpY156+LvSaFEYGHpaktziALx1AvTHBeBTMfuF3sOVQNT6NtxHb0AONgZRishpcR4X/KA5VmrCZuDskkWVer+pJsyi58+E6aJiqt6If/DvkwmNZGF8qamM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709732224; c=relaxed/simple; bh=J546KFrDLWr3d13XgE8TeBAmHpH7TosyPZDRQ0lXy7s=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=mkov6Z7ircrG0aP83sOgeHqKEVHa7JkwuOL4sJceGIt5b7iJMO+l51x+i5qk2M2A6r8KtJMLK4jwBaKuO1lxKHXBm15e4fkrFx/VKlVBwKYb3qXbRx7R0PRqLN4KpDPJpBPvVpS/zislDQMe3ZTHQCncjA16lI/QMMujMK2nC+A= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=oGvOK3/t4VMZaPq59T6actWXLecqc/fOyVuTUDQBfEJ76JCx2ENcSK2oFSjRwiI1/VQIAT27jzhKHxvTraNJMIIa/jyyzv3AvkuzuWQ4qNh12T6HR+RxkVJJO2K9FGUdSQOTbRbYcwsieMmisxbekNzpQkrV1wycjdFrxvExifCtjD1EKyaOVY5IJd9/W44aQfA1+bX9ly0imGX4xLuwRGR31ENbbwlEBqKsndUZmxRK6a4voNAcmNi3EBQ4m7Y+DL1VSQPW4s52gtPL56niMRhuHX7EGNrw1vYvc9PnqwMz0aQGillUV2OEiDmo/UR621Al0sNbkS9ZUoJQPbcrSA== ARC-Message-Signature: i=2; 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=X/PdteqNB7+brDDaCXx/Jgb4yc+dTY2nWU0NQOWGYVo=; b=c9qe2W6cIx9joRx6IJnlYsxcil9/UjNVtDcAyUCFvmD9T+LG51i4g4PRrOBpFjO1lMGtbU1tmBsY+uchJ73HE7s3H7jSW+VeV4ddSG12LZGKU84kKBzJJbrZQjR3AoIST0GlJHbzlXd6uRBQUmow8m5XfZ/SrGzIE1nIPdBsCIB9T7pvKpDiS53YPGA5YXfxWC7/nAcTK0YL/Ciql2zeWuxyhzGP2oS5/G/7b5QN6S5gbgzC6c5uSkP293OLbBbqYw2UnyY4zIoojzq5MjiCnVQ7HteICQDlFp72Ixmke5w/mfIWyWCaXSFw3yCU3rwnY7uWmcdmewyy9JiFZQ3QSw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) 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=X/PdteqNB7+brDDaCXx/Jgb4yc+dTY2nWU0NQOWGYVo=; b=ILOcOyj4SomwOeiJvYGeDYxf99FSz2dzgB3VmoObWnRyAztyfuKXdAq2FyVhHZraP++AC6IwY0w7OhHZ9wp76YJK7xZIQsnCCEnuZdi5MioMAV0ZY3suLlCl8spfM/Pe/Eg7lhSiPX5gi07rogQwV1svZP8n7fakQm4UVGFW0MA= Received: from DUZP191CA0015.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::14) by PAWPR08MB10018.eurprd08.prod.outlook.com (2603:10a6:102:363::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Wed, 6 Mar 2024 13:36:59 +0000 Received: from DU2PEPF00028D08.eurprd03.prod.outlook.com (2603:10a6:10:4f9:cafe::45) by DUZP191CA0015.outlook.office365.com (2603:10a6:10:4f9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24 via Frontend Transport; Wed, 6 Mar 2024 13:36:59 +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 DU2PEPF00028D08.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Wed, 6 Mar 2024 13:36:59 +0000 Received: ("Tessian outbound 6a48a1f51a3c:v276"); Wed, 06 Mar 2024 13:36:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a199de2cbf2d57b9 X-CR-MTA-TID: 64aa7808 Received: from 97c401f7b7d9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6D8E8CDA-388F-484E-9D1B-BCCA0B3CA3B6.1; Wed, 06 Mar 2024 13:36:52 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 97c401f7b7d9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Mar 2024 13:36:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bMDmarqlzjLxtOJbWghXjHBechAVwUZtZwJwxUtPhmCKjQXlpxhaHg9yNs9sBk+OBE6I9ZdZlh2Gs9Qj0gzdMJWGQYxJWgflyFa3HmTNI+62145pIgMK4uTVB9ELTZRa+98rZ60eXR8ob6ply/F4wPnectuZ9RSjEYHBN2dTNzE4TwSt+GfBYxP8liAkfl5/DhNFhfMREd/nOZhGpNCd6kQDuXvVZS0brKDbEswUJ1xSxR16u5j/gpxuo/QYDDAG8TThV4t13ssXAhHjgC5GOOV4vOdsjb/g2YWCa3I7zuAw+9MLyvK2V4INQtKrwi9P9/bKaLygLIpB1YvFiO8knQ== 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=X/PdteqNB7+brDDaCXx/Jgb4yc+dTY2nWU0NQOWGYVo=; b=jnc1BK6dHsAHEyrEjQRmLzGverMpelqQVDf6Qo/V61uJYySNkRJY6pmXWju+5LNwtPxueZrrd4/Sh71YEcIOeUUwxzx/bXwPiG8FudPXm96F4aLKeyY4YUJYdaYT8iRKSaxMW/cFBER3EVy0gJAxYzlKA5uZlqnXiVeHIBT6jMGS6oV/15yuudB1pMa6/vMXoCE/nwk0C8yZHEbABrwg4wf1fEteAImu66YEnPw776D0DZfGAlXEOmgKiZPqiZxOhR6VqD38mvFEz5kKPHMjkVCa/FYCGYCDtNyBS5ux50H/V6+Ef0UpgPj8ls3WcDRZrEZyFOhSD4GRReEjTP8Oag== 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=X/PdteqNB7+brDDaCXx/Jgb4yc+dTY2nWU0NQOWGYVo=; b=ILOcOyj4SomwOeiJvYGeDYxf99FSz2dzgB3VmoObWnRyAztyfuKXdAq2FyVhHZraP++AC6IwY0w7OhHZ9wp76YJK7xZIQsnCCEnuZdi5MioMAV0ZY3suLlCl8spfM/Pe/Eg7lhSiPX5gi07rogQwV1svZP8n7fakQm4UVGFW0MA= 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 DU0PR08MB9903.eurprd08.prod.outlook.com (2603:10a6:10:470::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Wed, 6 Mar 2024 13:36:49 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::363f:3fc8:fc36:58ed]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::363f:3fc8:fc36:58ed%5]) with mapi id 15.20.7316.037; Wed, 6 Mar 2024 13:36:49 +0000 Message-ID: <66bf96af-76ad-4aa5-a26e-c8010b5a52db@arm.com> Date: Wed, 6 Mar 2024 13:36:47 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] Fix missing watchpoint hits/endless loop Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org References: <20240105150734.5287-1-tdevries@suse.de> <36f17aa1-72a5-4b57-a15d-efce90cf8b2d@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0509.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::13) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DU0PR08MB9903:EE_|DU2PEPF00028D08:EE_|PAWPR08MB10018:EE_ X-MS-Office365-Filtering-Correlation-Id: e28bd58c-8937-448f-e590-08dc3de27faa 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: 2oPLhEx8RDW4dj15aQ778W+6/oql98+ssWC8YZqcik7je9BK1FgpWPniAIc6gJShaW9/Yop2ivr2uwWhkX8+HCyg+mAxR8OPYBLBj1WmPVEhtRwk79DjPuWgnA9pWO5162VzPVwj9QP4PHSnRCbI1eY6yWluKDa/0vNgILGv8FbgshM3urmAN2I9RSwvg4jWXkTbt8VoneE6SLpxdySkrQpznSkAyMbclEXLhCd+C/qCRrQuzFSU6NY4oGaSVzS55xBES5g3YXYTqXwHOoPyLD1fYFV5UDyx4ZUjen6YJUJgggD1eiYG92zFyLTsO0JWmxO3iwxHyhKPzFrvH5ONOCf9duivrQVaOgod6FagUEsSSJV3CrWGCPx5S5A7l79nz2SZrdZY0rTg38hRCphEACjKR36wWLVBLGNP499pMTsDMWnP/KiRFWFUx+0y+twIkwyNDVWLfKBQ5ZthmRcAtsP4NNniKGwtSk+vF94jZy+gYkB/IlwZjoZprzhufCrSTsWV76CsRAizF42waq9YifvdMrrtWQPcPcWICTzigmO7W/jVT5q7CwTL2FQn6Gg2lSJeLEw28f8sdMnkNzcnr7ZXSPopLOGLmfkzngxXz8A= 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:(13230031)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9903 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: DU2PEPF00028D08.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3f9167f1-a5da-48f2-cb1a-08dc3de27994 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dV8wkhugUx1vSFydYRXTm/Rvm17a7SQnye/XWk4n0q4r2bsb56qIBmmQjqY7prCr0kmIzFHTy+KeS7HBhi6i6GuAkkkZmULexjfgZ/43bXSvI3GG+dWWwmP9FrUNP5zIycTZpHxrHZLr3907wQbOt89lbc1yKU/UaNr2SIgBcN0Yv9dGuHrWA5Cp+M5ANXPFom5YWGUNBeJ+OdHPjiYJyS8pYyJnDhljH0El8ysPhK7UOl/b6du4YSNWYYkmkeQz1q5Pm+VPjUi2BGrk889HKzji993t9ya2xUsYomfEm5SagA0xJcZPwP7l5Rd6W0IlRPCpPa4bsmOCqbYdZa2WuP341CmfVBzAds4u4H4lXO7hAq5D6sEiimgvmmAS1mSz1/4cx/74oYw67CdpoxPwIlik28KRwBr4XaivicHGzbl3MiXIvYAF9YxA5o/ydg7aVsktXMK4lnwvH1F1X+q6Ksica+yxAQO0hn8lHYT3oVIjEfZElZSMMZzsyrkNEQQhHttfw9iLbef9b3tnxSOp/oy1cEPRqFlaaKQSzPXdwUU21jl7u/bPaHaNTUoNeflqFiIXGvAEHZkLfzYgxqj0y1nbv7/DLBhTdoELH1Z/7z4fWHdtHvLU/DWJQA6HmzNKMzu2IEDa7ecK4GlQiZ1QBNK1M5hvNVYYm8NiWU4eFY2FOtoDsMN2CuR+UPL8bi5+N37tLKvRgDUYCSZAlJ5VxQ== 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:(13230031)(376005)(82310400014)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 13:36:59.3577 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e28bd58c-8937-448f-e590-08dc3de27faa 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: DU2PEPF00028D08.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB10018 X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Tom, On 2/20/24 21:07, Tom de Vries wrote: > On 1/8/24 13:27, Luis Machado wrote: >> Hi Tom, >> >> Thanks for refreshing this patch. >> >> As I hinted on IRC, back then I ended up deciding not to pursue this approach further. Though it does >> address some of the potential failures, it is a bit convoluted and poses a fairly significant >> maintenance burden (we need to explicitly identify instructions, so we will always be behind), including >> the risk of producing false positives. >> >> For SVE/SME, there are also predicated accesses, which means an intruction may read/write a discontiguous range >> of bytes depending on the predicate mask. That is trickier to handle. >> >> The nature of hardware watchpoint detection on aarch64 means the triggering behavior is dependent on a particular >> CPU spec, in a way that is hard for userspace to predict reliably. Hopefully in the future this situation will >> improve for userspace. The kernel folks are aware of it. >> > > Hi Luis, > > ack, that makes sense. > >> Meanwhile, given the above restrictions (and potentially restrictions of other architectures), we could teach gdb >> about imprecise hardware watchpoint triggers. Something that would allow gdb to tell userspace that we know >> a hardware watchpoint has triggered, but we don't know exactly for what range and what happened. >> >> At least this would prevent certain situations where gdb is simply stuck trying to skip over unskippable >> hardware watchpoints, because it can't tell what happened and ended up with a generic SIGTRAP. >> >> Thoughts? >> > > I've submitted a two-patch series here ( https://sourceware.org/pipermail/gdb-patches/2024-February/206706.html ), where the second patch does something a bit like this: the aarch64 tdep tells gdb that we know that a hardware watchpoint has triggered, but doesn't know exactly for what range, and since it's a regular write watchpoint, gdb handles this fine. > > With this patch series, I'm getting rid of the last consistent FAILs I see on m1 (not counting libcc1 stuff). Sorry it took me a bit to get to this. Let me take a look at those two patches.