Skip to content

block: Use QemuOpts for runtime options

Max Reitz qemu-devel 3 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyApplied
  2. v25 patches 1 replySuperseded
  3. v15 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Patch 1: Fix fix of leak [Kevin]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5block/ssh: Use QemuOpts for runtime optionsblock/ssh.c+55 -240 replies
2/5block/nbd: Use QemuOpts for runtime optionsblock/nbd.c+54 -200 replies
3/5block/blkdebug: Store config filenameblock/blkdebug.c+12 -50 replies
4/5block/nbd: Store runtime option valuesblock/nbd.c+61 -440 replies
5/5iotests: Test case for wrong runtime option typestests/qemu-iotests/162 tests/qemu-iotests/162.out tests/qemu-iotests/group+114 -00 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchKevin WolfJeff Cody
1/5
2/5R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b R-b

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

Read the v3 thread

Cover letter [Qemu-devel] [PATCH for-2.7? v3 0/5] block: Use QemuOpts for runtime options

The SSH and NBD block drivers currently directly extract their runtime options from the options QDict they receive. This is bad practice and can lead to segmentation faults (which, however, will always be a NULL pointer dereference, so it should not be exploitable beyond a DoS).

This series fixes that by using QemuOpts instead (like all the other block drivers do).

With this series applied, there are only two instances of "qdict_get" left in block/, both of which appear to be safe.

v3:
- Patch 1: Fix fix of leak [Kevin]

v2:
- Patch 1: Fix leak of opts [Kevin]
- Patches 1 and 2: Use the block driver name as a prefix for runtime_opts [Kevin]

git-backport-diff against v2:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/5:[0001] [FC] 'block/ssh: Use QemuOpts for runtime options' 002/5:[----] [--] 'block/nbd: Use QemuOpts for runtime options' 003/5:[----] [--] 'block/blkdebug: Store config filename' 004/5:[----] [--] 'block/nbd: Store runtime option values' 005/5:[----] [--] 'iotests: Test case for wrong runtime option types'

Max Reitz (5):
block/ssh: Use QemuOpts for runtime options block/nbd: Use QemuOpts for runtime options block/blkdebug: Store config filename block/nbd: Store runtime option values
iotests: Test case for wrong runtime option types

 block/blkdebug.c           |  17 +++--
 block/nbd.c                | 159 ++++++++++++++++++++++++++++++---------------
 block/ssh.c                |  79 +++++++++++++++-------
 tests/qemu-iotests/162     |  96 +++++++++++++++++++++++++++
 tests/qemu-iotests/162.out |  17 +++++
 tests/qemu-iotests/group   |   1 +
 6 files changed, 286 insertions(+), 83 deletions(-)
 create mode 100755 tests/qemu-iotests/162
 create mode 100644 tests/qemu-iotests/162.out
Signature · 1 line
2.9.2