aboutsummaryrefslogtreecommitdiff
path: root/hw/display/g364fb.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2024-02-06 14:06:06 -0500
committerKevin Wolf <kwolf@redhat.com>2024-02-07 14:44:05 +0100
commit1f995a4782d140b16d9b24e787053944fb5c4dfb (patch)
treee7564758db5fe87a4c8601826cedc311665d0661 /hw/display/g364fb.c
parent39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440 (diff)
downloadqemu-1f995a4782d140b16d9b24e787053944fb5c4dfb.zip
qemu-1f995a4782d140b16d9b24e787053944fb5c4dfb.tar.gz
qemu-1f995a4782d140b16d9b24e787053944fb5c4dfb.tar.bz2
virtio-blk: enforce iothread-vq-mapping validation
Hanna Czenczek <hreitz@redhat.com> noticed that the safety of `vq_aio_context[vq->value] = ctx;` with user-defined vq->value inputs is not obvious. The code is structured in validate() + apply() steps so input validation is there, but it happens way earlier and there is nothing that guarantees apply() can only be called with validated inputs. This patch moves the validate() call inside the apply() function so validation is guaranteed. I also added the bounds checking assertion that Hanna suggested. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Message-ID: <20240206190610.107963-2-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/display/g364fb.c')
0 files changed, 0 insertions, 0 deletions