Re: [PATCH] hw/gpio/aspeed: Add bounds checking for register table access

2024-06-19 Thread Zheyu Ma
Hi Philippe, On Wed, Jun 19, 2024 at 6:29 PM Philippe Mathieu-Daudé wrote: > On 19/6/24 08:49, Zheyu Ma wrote: > > Hi Andrew, > > > > On Wed, Jun 19, 2024 at 1:58 AM Andrew Jeffery > > mailto:and...@codeconstruct.com.au>> > wrote: > > > > Hello Zheyu Ma, > > > > On Tue, 2024-06-18 at 15:

Re: [PATCH] hw/gpio/aspeed: Add bounds checking for register table access

2024-06-19 Thread Philippe Mathieu-Daudé
On 19/6/24 08:49, Zheyu Ma wrote: Hi Andrew, On Wed, Jun 19, 2024 at 1:58 AM Andrew Jeffery mailto:and...@codeconstruct.com.au>> wrote: Hello Zheyu Ma, On Tue, 2024-06-18 at 15:09 +0200, Zheyu Ma wrote: > Added bounds checking in the aspeed_gpio_read() and aspeed_gpio_write(

Re: [PATCH] hw/gpio/aspeed: Add bounds checking for register table access

2024-06-18 Thread Zheyu Ma
Hi Andrew, On Wed, Jun 19, 2024 at 1:58 AM Andrew Jeffery wrote: > Hello Zheyu Ma, > > On Tue, 2024-06-18 at 15:09 +0200, Zheyu Ma wrote: > > Added bounds checking in the aspeed_gpio_read() and aspeed_gpio_write() > > functions to ensure the index idx is within the valid range of the > > reg_tab

Re: [PATCH] hw/gpio/aspeed: Add bounds checking for register table access

2024-06-18 Thread Andrew Jeffery
Hello Zheyu Ma, On Tue, 2024-06-18 at 15:09 +0200, Zheyu Ma wrote: > Added bounds checking in the aspeed_gpio_read() and aspeed_gpio_write() > functions to ensure the index idx is within the valid range of the > reg_table array. > > The correct size of reg_table is determined dynamically based on

[PATCH] hw/gpio/aspeed: Add bounds checking for register table access

2024-06-18 Thread Zheyu Ma
Added bounds checking in the aspeed_gpio_read() and aspeed_gpio_write() functions to ensure the index idx is within the valid range of the reg_table array. The correct size of reg_table is determined dynamically based on whether it is aspeed_3_3v_gpios or aspeed_1_8v_gpios. If idx exceeds the size