From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id C0cZKs4vrGe+5SsAWB0awg (envelope-from ) for ; Wed, 12 Feb 2025 00:21:18 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=Rn4+W/Ek; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8A7721E105; Wed, 12 Feb 2025 00:21:18 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 85A0A1E05C for ; Wed, 12 Feb 2025 00:21:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28331385840F for ; Wed, 12 Feb 2025 05:21:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28331385840F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=Rn4+W/Ek Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id E0A033858C60 for ; Wed, 12 Feb 2025 05:20:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E0A033858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E0A033858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739337644; cv=none; b=Dyf7hkmqBtxWEWdJFsThuMKEF4mEp4oiwtWeoPuX2hbVQykV/rI9GPwFNbN6k7OXa1WqliavaLorX64b6RUO0QRwjWciXhvS95tZorbD5y0m099tw4dRwx1tDFndmj74XX74H176kphc4lYats8ZLFc9TPho3Ie/m1N0WFx9mNQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739337644; c=relaxed/simple; bh=ujSfIGTihcLxoEaN+vs0K6XrCXGpyARR5e2X8bUvhHo=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=sb5ov/Upkiju3En+VoKj4W4Qnt1glHzEfzdiMfvsI0QciXL5Tx07AllDQZ4l8x9L/TStjCkj6ZVdL9eaZ4fXKWccVUpl7RCqmLB7hZ8q7a8GWAkvH7gsHa/SmEmk4qX5VNCC1FwgH4vxJNf4JCmYAjj60cBHos3yWeYpfGsOgwM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0A033858C60 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2f9b9c0088fso737740a91.0 for ; Tue, 11 Feb 2025 21:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1739337643; x=1739942443; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A2PfMGguQOHdDvqozsiqiR1tKA9NaYIFB0/zKnF+frw=; b=Rn4+W/EkwI4TQm4IinZWW3bQwMj/RyKZa9f0DihOJsB/ra787WPMDX2Vy7PjtQLIy+ iWaqqqYO8qhdAiJq6jgLOLbShiO9K0jzvQAPe58zyweb/GJyYkJ+O23VB25aaOaCcigs TlBFshKu+qYnuCnb4Cu6GsU+JS9oDdEn1xPA1JGC3RM34Ne0rvD/kda7QFbnX+7PyiNN gviMvlFMm/gCp87zQBQLGkqBfElcTc3L5shXyPO+xxz5NAW4VO7pM5j8V0JniGK62/A7 JLZmxTrOlO+e4P+CVlH5fqvWr+V5LSLInTdK6kc83haxTOUgq8kz4dl1gVb41K++ylxz Mk3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739337643; x=1739942443; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A2PfMGguQOHdDvqozsiqiR1tKA9NaYIFB0/zKnF+frw=; b=gCNtvYH+sLq9Oe+XmCE0uK+v9UytRVXsE8n/AKMV3LyxYLTfKMHkhV0SXRsesvTNcf AxHhAG+CBHcj5b4og4jfLm/yUDB8FsOODxClp09WYNF/Pt9CTgy11PpQQXZfJnPHdmXa KBxPB7eoBujcCocmQ8SnKzLSW2E2cL6JeO/6RaMN+k+X3r6rbWSBgQkvJLraADdDW6ZY a9PqslWqUH07ei1LH+mjGSsIV4RdKgPoGxj1prFGBOqXmsSQptB5eXeAt/i6ffepI7aH anyU7YJIjoa7A6iDSDhxY5UwakQNR53OFhOV2FKJicqClQDB3vKkzyYKcvNOS/9uZA2R 2n0g== X-Forwarded-Encrypted: i=1; AJvYcCU8vshE3Tjhy+4Cr0V5o54EtdXkuqdq9I/0i0D24lpnJO7xsO2FtlDIwNyf/k4rcD1VUeUvDeSPLEvP4Q==@sourceware.org X-Gm-Message-State: AOJu0YzB83ZNGI4N1tTMuaa0+7u2tZZE16ur1CzHUo75pakv6B8aC103 r4IaiC5zeLkqAxj9pFUszRXjU+U/FbLh5RncLvczr8ze5wb/ZZnn2hR52GHnHoYXG8IDyneAxwg cWW1bl38fTuQ1qFOARKJQ+YfVi3/0pD9s7gEhkQ== X-Gm-Gg: ASbGncv4od+syWebdq9Y1jCIH42kfEW0zrsLffgKP0IQfu0ifaQ4511Lz9veDdvp+wN Ke6r4p/9VLOdCTmlUjWCFmH7R7uD2731reaz73u4satOdzKX4hWk7+RvajQj47MbjxhNVQ2bJcg == X-Google-Smtp-Source: AGHT+IHmsaKwKVo71NiISgkrqE5z1PizmhpL5ULQbFMK9rZRSGa+WOD/A3Th/dSbWBIdU29ryvLzFxZJn4hSz1AYQaQ= X-Received: by 2002:a17:90b:5690:b0:2fa:22a2:26a3 with SMTP id 98e67ed59e1d1-2fbf5c0e7a7mr2992014a91.6.1739337643022; Tue, 11 Feb 2025 21:20:43 -0800 (PST) MIME-Version: 1.0 References: <20250211-fix_gas_abort-v1-0-afd9730f9c51@rivosinc.com> In-Reply-To: <20250211-fix_gas_abort-v1-0-afd9730f9c51@rivosinc.com> From: Nelson Chu Date: Wed, 12 Feb 2025 13:20:32 +0800 X-Gm-Features: AWEUYZkKTSQGcW_mrMRBhRYT0WPVOn69J6uPqn8UTDYtKICm-cWNBKBfV7kpf1s Message-ID: Subject: Re: [PATCH 0/2] RISC-V: Fix abort when displaying data and add test To: Charlie Jenkins , Nick Clifton , Alan Modra Cc: jiawei , Jan Beulich , Andrew Burgess , gdb-patches , Binutils Content-Type: multipart/alternative; boundary="0000000000005b6ed9062deb1af7" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --0000000000005b6ed9062deb1af7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think this resolved the segfault when dumping partial data which size between 4 and 8. Before this series, we used to dump "out of bounds address", so after adding this last piece of the puzzle will be perfect for now. The only thing I can imagine is that we probably need to handle the dump_size between 8 and 16 if supporting rv128, but we can handle that later at that time. Hi Nick, Hi Alan, Hi Jan, I think we should also backport this to 2.44 branch, is that good? Thanks a lot Nelson On Wed, Feb 12, 2025 at 1:08=E2=80=AFPM Charlie Jenkins wrote: > Commit 6a04e8230707 ("RISC-V: Fix display of partial instructions") > changed how objdump displays instructions. This had the unintented > side-effect that it allowed 6 byte instructions to be displayed which > happens when a .dword is attempted to be split into instructions. Add > support for 5, 6, and 7 byte instructions to remedy this > issue. > > Signed-off-by: Charlie Jenkins > --- > Charlie Jenkins (2): > RISC-V: Fix abort when displaying .dword > RISC-V: Add testcase for 6 byte instruction > > gas/testsuite/gas/riscv/dis-partial-insn-dword.d | 12 ++++++++++ > gas/testsuite/gas/riscv/dis-partial-insn-dword.s | 2 ++ > opcodes/riscv-dis.c | 29 > +++++++++++++++++++++++- > 3 files changed, 42 insertions(+), 1 deletion(-) > --- > base-commit: 815d9a14cbbb3b81843f7566222c87fb22e7255d > change-id: 20250211-fix_gas_abort-6d1e28b4ad46 > -- > - Charlie > > --0000000000005b6ed9062deb1af7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think this resolved the segfault when dumping partial da= ta which size between 4 and 8.=C2=A0 Before this series, we used to dump &q= uot;out of bounds address", so after adding this last piece of the puz= zle will be perfect for now.=C2=A0 The only thing I can imagine is that we = probably=C2=A0need to handle the dump_size between 8 and 16 if supporting r= v128, but we can handle that later at that time.

Hi Nick= , Hi Alan, Hi Jan,

I think we should also backport= this to 2.44 branch, is that good?

Thanks a lot
Nelson


On Wed, Feb 12, 2= 025 at 1:08=E2=80=AFPM Charlie Jenkins <charlie@rivosinc.com> wrote:
Commit 6a04e8230707 ("RISC-V: Fix display = of partial instructions")
changed how objdump displays instructions. This had the unintented
side-effect that it allowed 6 byte instructions to be displayed which
happens when a .dword is attempted to be split into instructions. Add
support for 5, 6, and 7 byte instructions to remedy this
issue.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
---
Charlie Jenkins (2):
=C2=A0 =C2=A0 =C2=A0 RISC-V: Fix abort when displaying .dword
=C2=A0 =C2=A0 =C2=A0 RISC-V: Add testcase for 6 byte instruction

=C2=A0gas/testsuite/gas/riscv/dis-partial-insn-dword.d | 12 ++++++++++
=C2=A0gas/testsuite/gas/riscv/dis-partial-insn-dword.s |=C2=A0 2 ++
=C2=A0opcodes/riscv-dis.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 29 ++++++++++++++= +++++++++-
=C2=A03 files changed, 42 insertions(+), 1 deletion(-)
---
base-commit: 815d9a14cbbb3b81843f7566222c87fb22e7255d
change-id: 20250211-fix_gas_abort-6d1e28b4ad46
--
- Charlie

--0000000000005b6ed9062deb1af7--