Re: [PATCH 0/2] nvme: avoid dynamic stack allocations

2023-09-12 Thread Klaus Jensen
On Sep 12 15:15, Peter Maydell wrote: > On Mon, 14 Aug 2023 at 08:09, Klaus Jensen wrote: > > > > On Aug 11 18:47, Peter Maydell wrote: > > > The QEMU codebase has very few C variable length arrays, and if we can > > > get rid of them all we can make the compiler error on new additions. > > > This

Re: [PATCH 0/2] nvme: avoid dynamic stack allocations

2023-09-12 Thread Peter Maydell
On Mon, 14 Aug 2023 at 08:09, Klaus Jensen wrote: > > On Aug 11 18:47, Peter Maydell wrote: > > The QEMU codebase has very few C variable length arrays, and if we can > > get rid of them all we can make the compiler error on new additions. > > This is a defensive measure against security bugs wher

Re: [PATCH 0/2] nvme: avoid dynamic stack allocations

2023-08-16 Thread Philippe Mathieu-Daudé
On 11/8/23 19:47, Peter Maydell wrote: The QEMU codebase has very few C variable length arrays, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e

Re: [PATCH 0/2] nvme: avoid dynamic stack allocations

2023-08-14 Thread Klaus Jensen
On Aug 11 18:47, Peter Maydell wrote: > The QEMU codebase has very few C variable length arrays, and if we can > get rid of them all we can make the compiler error on new additions. > This is a defensive measure against security bugs where an on-stack > dynamic allocation isn't correctly size-check

[PATCH 0/2] nvme: avoid dynamic stack allocations

2023-08-11 Thread Peter Maydell
The QEMU codebase has very few C variable length arrays, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). We last had a go at