Re: [PATCH] util/iov: Avoid dynamic stack allocation

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 10:26:17AM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing qemu-block@ (I suppose this will go via a block tree) Makes sense. I can queue it through my NBD tree if no one else beats me (since the nbd code is a heavy user of iovs). > > On 24/8/23 18:47, Peter Maydell wrote:

Re: [PATCH] util/iov: Avoid dynamic stack allocation

2023-08-31 Thread Philippe Mathieu-Daudé
Cc'ing qemu-block@ (I suppose this will go via a block tree) On 24/8/23 18:47, Peter Maydell wrote: From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the compil

Re: [PATCH] util/iov: Avoid dynamic stack allocation

2023-08-24 Thread Eric Blake
On Thu, Aug 24, 2023 at 05:47:06PM +0100, Peter Maydell wrote: > From: Philippe Mathieu-Daudé > > Use autofree heap allocation instead of variable-length array on the > stack. > > The codebase has very few VLAs, and if we can get rid of them all we > can make the compiler error on new additions.

[PATCH] util/iov: Avoid dynamic stack allocation

2023-08-24 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, 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