Re: [Qemu-devel] [PATCH v2] target/arm: Stop using variable length array in dc_zva

2019-05-03 Thread Philippe Mathieu-Daudé
On 5/3/19 2:04 PM, Peter Maydell wrote: > Currently the dc_zva helper function uses a variable length > array. In fact we know (as the comment above remarks) that > the length of this array is bounded because the architecture > limits the block size and QEMU limits the target page size. > Use a fix

Re: [Qemu-devel] [PATCH v2] target/arm: Stop using variable length array in dc_zva

2019-05-03 Thread Richard Henderson
On 5/3/19 5:04 AM, Peter Maydell wrote: > Currently the dc_zva helper function uses a variable length > array. In fact we know (as the comment above remarks) that > the length of this array is bounded because the architecture > limits the block size and QEMU limits the target page size. > Use a fix

[Qemu-devel] [PATCH v2] target/arm: Stop using variable length array in dc_zva

2019-05-03 Thread Peter Maydell
Currently the dc_zva helper function uses a variable length array. In fact we know (as the comment above remarks) that the length of this array is bounded because the architecture limits the block size and QEMU limits the target page size. Use a fixed array size and assert that we don't run off it.