[PATCH v2 00/11] misc: Remove variable-length arrays on the stack

Peter Maydell posted 11 patches 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220819153931.3147384-1-peter.maydell@linaro.org
Maintainers: Samuel Thibault <samuel.thibault@ens-lyon.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, Jason Wang <jasowang@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>
chardev/baum.c             | 22 +++++++++++++---------
hw/i386/multiboot.c        |  5 ++---
hw/intc/xics.c             |  2 +-
hw/net/e1000e_core.c       |  7 ++++---
hw/ppc/pnv.c               |  4 ++--
hw/ppc/spapr.c             |  8 ++++----
hw/ppc/spapr_pci_nvlink2.c |  2 +-
hw/usb/hcd-ohci.c          |  7 ++++---
io/channel-websock.c       |  2 +-
tests/unit/test-vmstate.c  |  7 +++----
ui/curses.c                |  2 +-
11 files changed, 36 insertions(+), 32 deletions(-)
[PATCH v2 00/11] misc: Remove variable-length arrays on the stack
Posted by Peter Maydell 1 year, 8 months ago
This is a resend of a subset of patches from a series that
Philippe sent out last year:
https://patchew.org/QEMU/20210505211047.1496765-1-philmd@redhat.com/

Basically I just pulled out the patches which:
 (1) trivially applied on a rebase
 (2) had got a Reviewed-by: or at least an Acked-by:

since these should be good to just apply immediately
(well, as soon as we reopen for 7.2 development).

Given they're a mixed bag, I propose to take these via
the target-arm.next tree, unless anybody specifically
wishes to grab specific patches via some other route.

I might come back and have another look at the other
left-behind patches later, but this gets rid of more
than half of the complaints that a -Wvla build reports.

thanks
-- PMM

Philippe Mathieu-Daudé (11):
  chardev/baum: Replace magic values by X_MAX / Y_MAX definitions
  chardev/baum: Use definitions to avoid dynamic stack allocation
  chardev/baum: Avoid dynamic stack allocation
  io/channel-websock: Replace strlen(const_str) by sizeof(const_str) - 1
  hw/net/e1000e_core: Use definition to avoid dynamic stack allocation
  hw/ppc/pnv: Avoid dynamic stack allocation
  hw/intc/xics: Avoid dynamic stack allocation
  hw/i386/multiboot: Avoid dynamic stack allocation
  hw/usb/hcd-ohci: Use definition to avoid dynamic stack allocation
  ui/curses: Avoid dynamic stack allocation
  tests/unit/test-vmstate: Avoid dynamic stack allocation

 chardev/baum.c             | 22 +++++++++++++---------
 hw/i386/multiboot.c        |  5 ++---
 hw/intc/xics.c             |  2 +-
 hw/net/e1000e_core.c       |  7 ++++---
 hw/ppc/pnv.c               |  4 ++--
 hw/ppc/spapr.c             |  8 ++++----
 hw/ppc/spapr_pci_nvlink2.c |  2 +-
 hw/usb/hcd-ohci.c          |  7 ++++---
 io/channel-websock.c       |  2 +-
 tests/unit/test-vmstate.c  |  7 +++----
 ui/curses.c                |  2 +-
 11 files changed, 36 insertions(+), 32 deletions(-)

-- 
2.25.1


Re: [PATCH v2 00/11] misc: Remove variable-length arrays on the stack
Posted by Philippe Mathieu-Daudé via 1 year, 7 months ago
On 19/8/22 17:39, Peter Maydell wrote:
> This is a resend of a subset of patches from a series that
> Philippe sent out last year:
> https://patchew.org/QEMU/20210505211047.1496765-1-philmd@redhat.com/
> 
> Basically I just pulled out the patches which:
>   (1) trivially applied on a rebase
>   (2) had got a Reviewed-by: or at least an Acked-by:
> 
> since these should be good to just apply immediately
> (well, as soon as we reopen for 7.2 development).
> 
> Given they're a mixed bag, I propose to take these via
> the target-arm.next tree, unless anybody specifically
> wishes to grab specific patches via some other route.
> 
> I might come back and have another look at the other
> left-behind patches later, but this gets rid of more
> than half of the complaints that a -Wvla build reports.
> 
> thanks
> -- PMM

Thank you Peter!