qemu-patch-raspberry4/hw/block
Vladimir Sementsov-Ogievskiy 64631f3681 block: drop BLK_PERM_GRAPH_MOD
First, this permission never protected a node from being changed, as
generic child-replacing functions don't check it.

Second, it's a strange thing: it presents a permission of parent node
to change its child. But generally, children are replaced by different
mechanisms, like jobs or qmp commands, not by nodes.

Graph-mod permission is hard to understand. All other permissions
describe operations which done by parent node on its child: read,
write, resize. Graph modification operations are something completely
different.

The only place where BLK_PERM_GRAPH_MOD is used as "perm" (not shared
perm) is mirror_start_job, for s->target. Still modern code should use
bdrv_freeze_backing_chain() to protect from graph modification, if we
don't do it somewhere it may be considered as a bug. So, it's a bit
risky to drop GRAPH_MOD, and analyzing of possible loss of protection
is hard. But one day we should do it, let's do it now.

One more bit of information is that locking the corresponding byte in
file-posix doesn't make sense at all.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210902093754.2352-1-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-01-14 12:03:16 +01:00
..
dataplane virtio-blk: Fix clean up of host notifiers for single MR transaction. 2021-12-06 14:21:14 +00:00
block.c block: drop BLK_PERM_GRAPH_MOD 2022-01-14 12:03:16 +01:00
cdrom.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ecc.c vmstate: Constify some VMStateDescriptions 2021-05-02 17:24:50 +02:00
fdc-internal.h hw/block/fdc: Declare shared prototypes in fdc-internal.h 2021-06-25 08:53:28 -04:00
fdc-isa.c hw/block/fdc: Add description to floppy controllers 2021-06-25 08:53:28 -04:00
fdc-sysbus.c hw/block/fdc: Add description to floppy controllers 2021-06-25 08:53:28 -04:00
fdc.c hw/block/fdc: Kludge missing floppy drive to fix CVE-2021-20196 2021-12-02 01:09:38 -05:00
hd-geometry.c block: Remove blk_pread_unthrottled() 2019-08-16 10:25:16 +02:00
Kconfig hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
m25p80.c hw/block: m25p80: Add support for mt25ql02g and mt25qu02g 2021-05-01 10:03:52 +02:00
meson.build hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
nand.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
onenand.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
pflash_cfi01.c hw/block/pflash_cfi: Replace DPRINTF with trace events 2021-03-18 11:16:31 +01:00
pflash_cfi02.c hw/block/pflash_cfi02: Do not create aliases when not necessary 2021-05-11 18:11:02 +02:00
swim.c qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
tc58128.c hw/sh4: Add missing license 2021-03-06 16:18:42 +01:00
trace-events hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-user-blk.c hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device 2022-01-07 05:19:55 -05:00
virtio-blk.c virtio-blk: Constify VirtIOFeature feature_sizes[] 2021-05-14 08:12:09 -04:00
xen-block.c xen-block: Use specific blockdev driver 2021-05-10 13:43:58 +01:00
xen_blkif.h xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00