From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id C6788385780D for ; Wed, 13 Mar 2024 17:11:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6788385780D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C6788385780D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710349889; cv=none; b=i4a8ssXf1f40T/fzvXvIGzxk2X856rHN4eRwlARwSBjA9xOdv34MnELSzMXhMAlsPG5NWUHlIRVB8WkdsvP2KuDulDjY0ci3R27lizlIebGyP9Bgia6z5xJcmE3It/TM9XD6ZZan1qhHdxz21LLAncZI36/mvxq4YWfLXeu3vkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710349889; c=relaxed/simple; bh=RhVahhie/SS4UCgGITueKOqI1ZB/H70XnXBV4XpgIfs=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=c9ox8dlz1pz9G4vJiyqaTprNbCOcVOqnzG8ZpgQMpxII2vA1p6f4NE6AUcVehfyJHi1NuJEY9YwsMmEeKVvMoxInGn569fbYAC7guiglHF9k0GGKc+zyOAU8mMmuhkCi/BlsovkzenvpOUTd79ovwIfvcmhOTtNMSc1D4TTEwYw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B377921CAA; Wed, 13 Mar 2024 17:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710349885; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JZrqa9qRBeidyV0KegesuYVrLS2o3drgZ1uepIq0Ryc=; b=U7cHaV+m16HCQWycYlJzCNf/Q5NCH7zKs1Jd8w733513l+o9V4Xjs38OAOs+VoujhJ+y6V lVMtPccHft3N5LAZH6NspoDxcndyFX/9ibBgho1/4nISLfAcTzh/4qbieIiz/jk6+DE3AJ s5okiEZT/aWJ4HpNgDpsxLui7P2EgsU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710349885; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JZrqa9qRBeidyV0KegesuYVrLS2o3drgZ1uepIq0Ryc=; b=Vu1qPTDkD2i2J9U4id3IXUHBo3uuNYIZLyVj0u/BzwD23jt2VO2sasdmajhNVRfW1A8Gvo kaX+BTOlrmCbHyCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710349885; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JZrqa9qRBeidyV0KegesuYVrLS2o3drgZ1uepIq0Ryc=; b=U7cHaV+m16HCQWycYlJzCNf/Q5NCH7zKs1Jd8w733513l+o9V4Xjs38OAOs+VoujhJ+y6V lVMtPccHft3N5LAZH6NspoDxcndyFX/9ibBgho1/4nISLfAcTzh/4qbieIiz/jk6+DE3AJ s5okiEZT/aWJ4HpNgDpsxLui7P2EgsU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710349885; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JZrqa9qRBeidyV0KegesuYVrLS2o3drgZ1uepIq0Ryc=; b=Vu1qPTDkD2i2J9U4id3IXUHBo3uuNYIZLyVj0u/BzwD23jt2VO2sasdmajhNVRfW1A8Gvo kaX+BTOlrmCbHyCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9EA0513977; Wed, 13 Mar 2024 17:11:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id tkeEJT3e8WV+GgAAD6G6ig (envelope-from ); Wed, 13 Mar 2024 17:11:25 +0000 Message-ID: <188e8db7-c6c7-4177-aefb-fdb7a0e7edce@suse.de> Date: Wed, 13 Mar 2024 18:12:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] [gdb/tdep] Fix gdb.base/watchpoint-unaligned.exp on aarch64 Content-Language: en-US To: Luis Machado , gdb-patches@sourceware.org References: <20240220205425.13587-1-tdevries@suse.de> From: Tom de Vries In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=U7cHaV+m; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Vu1qPTDk X-Spamd-Result: default: False [-5.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.10)[text/plain]; URIBL_BLOCKED(0.00)[suse.de:dkim]; RCVD_DKIM_ARC_DNSWL_HI(-1.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_HI(-1.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Score: -5.30 X-Rspamd-Queue-Id: B377921CAA X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 3/7/24 11:50, Luis Machado wrote: > Hi Tom, > > Raising the alignment enforcement means we will cover a bigger range of addresses, potentially covering our target watchpoint/trap address, > but I'm afraid it also means we will raise the potential for false positives, if watchpoints are placed within the alignment range. > True. I've submitted a v2 that should address that, by limiting the impact of the patch to regular hw watchpoints. > Furthermore, we are not limited to 16-byte accesses. For SVE and SME we may be looking at even bigger accesses. And, more generally, the memset/memcpy > instructions (not yet widely used) can potentially access arbitrary amounts of memory. So tweaking the alignment is only a focused fix towards the most often > used instructions and access sizes at the moment. > I don't have access atm to an SVE or SME or MOPS machine. We can guess that those larger accesses will cause issues, but we don't know until we try. For instance, in the case of the stp instruction, it didn't cause issues with say a RK3399 SOC, but it did with an M1 SOC, so just the existence of larger accesses doesn't mean there are issues. > The more general problem of not being able to tell which particular watchpoint caused the trap remains. > Yes. I think we need to file a linux kernel bug for this. I looked for one and didn't find it. My current idea for a concrete solution for this is that the kernel should communicate back the state of the 2 debug registers (control and value) for which it thinks the watchpoint triggered. That should resolve any ambiguity on the user space side. > How does the above fix behave on the overall testsuite in terms of watchpoint tests? The v2, as the v1, fixes the test-case and doesn't cause regressions. Thanks, - Tom