Skip to content

nvme: avoid dynamic stack allocations

Peter Maydell qemu-devel 1 version Applied

Status from this message: Applied to nvme-next!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2hw/nvme: Use #define to avoid variable length arrayhw/nvme/ctrl.c+1 -10 replies
2/2hw/nvme: Avoid dynamic stack allocationhw/nvme/ctrl.c+1 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPhilippe Mathieu-Daudé
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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 this a few years ago, when Philippe wrote patches for this:
https://patchew.org/QEMU/[email protected]/
Some of the fixes made it into the tree, but some didn't (either because of lack of review or because review found some changes that needed to be made). I'm going through the remainder as a non-urgent Friday afternoon task...

This patchset deals with two VLAs in the NVME code.

thanks
-- PMM

Peter Maydell (1):
hw/nvme: Avoid dynamic stack allocation

Philippe Mathieu-Daudé (1):
hw/nvme: Use #define to avoid variable length array

 hw/nvme/ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1