[v3,0/2] RISC-V: Fix buffer overflow after 176-bit instruction support

Message ID cover.1664882725.git.research_trasio@irq.a4lg.com
Headers
Series RISC-V: Fix buffer overflow after 176-bit instruction support |

Message

Tsukasa OI Oct. 4, 2022, 11:25 a.m. UTC
  Hello,

This is the PATCH v3 for quick stack buffer overflow fix.

[Changes: v2 -> v3]
-   PATCH 1/2: Define RISCV_MAX_INSN_LEN in riscv_insn_length function
    (idea by Jan Beulich)
-   PATCH 2/2: Fix comment and commit message

[Changes: v1 -> v2]
-   Fix assertion failure on riscv_insn::decode
-   Use new constant RISCV_MAX_INSN_LEN for buffer size

PATCH 1: Binutils
PATCH 2: GDB (v2/3: depends on PATCH 1)

Thanks,
Tsukasa




Tsukasa OI (2):
  RISC-V: Fix buffer overflow on print_insn_riscv
  gdb/riscv: Partial support for instructions up to 176-bit

 gdb/riscv-tdep.c       | 9 +++++----
 include/opcode/riscv.h | 2 ++
 opcodes/riscv-dis.c    | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)


base-commit: d71eca64e70c31e0d32396a0b6c60e3ea9eb420b
  

Comments

Jan Beulich Oct. 4, 2022, 12:23 p.m. UTC | #1
On 04.10.2022 13:25, Tsukasa OI wrote:
> This is the PATCH v3 for quick stack buffer overflow fix.
> 
> [Changes: v2 -> v3]
> -   PATCH 1/2: Define RISCV_MAX_INSN_LEN in riscv_insn_length function
>     (idea by Jan Beulich)
> -   PATCH 2/2: Fix comment and commit message

Lgtm now, fwiw. Like elsewhere I'd prefer the arch maintainers to actually
approve the change to go in.

Jan
  
Nelson Chu Oct. 4, 2022, 1:20 p.m. UTC | #2
OK, thanks.  If the problem is resolved and test cases are passed,
please commit.

Thanks
Nelson

On Tue, Oct 4, 2022 at 8:23 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 04.10.2022 13:25, Tsukasa OI wrote:
> > This is the PATCH v3 for quick stack buffer overflow fix.
> >
> > [Changes: v2 -> v3]
> > -   PATCH 1/2: Define RISCV_MAX_INSN_LEN in riscv_insn_length function
> >     (idea by Jan Beulich)
> > -   PATCH 2/2: Fix comment and commit message
>
> Lgtm now, fwiw. Like elsewhere I'd prefer the arch maintainers to actually
> approve the change to go in.
>
> Jan