aboutsummaryrefslogtreecommitdiff
path: root/.readthedocs.yml
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2024-04-25 14:56:02 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2024-07-03 23:48:39 +0300
commitaea89f41799f85ca1ed724d9e5fc2fc6cce25078 (patch)
tree9ecb57009c6cc56406d82e979621764589ed36c6 /.readthedocs.yml
parent46fdbe667d62ba1a6ff86abb7a8277416ce25339 (diff)
downloadqemu-staging-8.2.zip
qemu-staging-8.2.tar.gz
qemu-staging-8.2.tar.bz2
block: Parse filenames only when explicitly requestedstaging-8.2
When handling image filenames from legacy options such as -drive or from tools, these filenames are parsed for protocol prefixes, including for the json:{} pseudo-protocol. This behaviour is intended for filenames that come directly from the command line and for backing files, which may come from the image file itself. Higher level management tools generally take care to verify that untrusted images don't contain a bad (or any) backing file reference; 'qemu-img info' is a suitable tool for this. However, for other files that can be referenced in images, such as qcow2 data files or VMDK extents, the string from the image file is usually not verified by management tools - and 'qemu-img info' wouldn't be suitable because in contrast to backing files, it already opens these other referenced files. So here the string should be interpreted as a literal local filename. More complex configurations need to be specified explicitly on the command line or in QMP. This patch changes bdrv_open_inherit() so that it only parses filenames if a new parameter parse_filename is true. It is set for the top level in bdrv_open(), for the file child and for the backing file child. All other callers pass false and disable filename parsing this way. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Hanna Czenczek <hreitz@redhat.com> (cherry picked from commit 7ead946998610657d38d1a505d5f25300d4ca613) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (Mjt: backport patch to 8.2, without: v8.2.0-132-g6bc30f194985 "graph-lock: remove AioContext locking" v8.2.0-133-gb49f4755c7fa "block: remove AioContext locking")
Diffstat (limited to '.readthedocs.yml')
0 files changed, 0 insertions, 0 deletions