]> xenbits.xensource.com Git - qemu-xen.git/commit
hw/smbios: add assertion to ensure handles of tables 19 and 32 do not collide
authorAni Sinha <ani@anisinha.ca>
Wed, 23 Feb 2022 14:33:22 +0000 (20:03 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 4 Mar 2022 13:30:52 +0000 (08:30 -0500)
commit63670bd3fce3d0c033d939d1b2b7a5f6834d0cf3
treece299d54ef39f165e79f9e011334db959d04c25a
parenta379d4550c4a949bb1ca51bc5272d68b4a619b18
hw/smbios: add assertion to ensure handles of tables 19 and 32 do not collide

Since change dcf359832eec02 ("hw/smbios: fix table memory corruption with large memory vms")
we reserve additional space between handle numbers of tables 17 and 19 for
large VMs. This may cause table 19 to collide with table 32 in their handle
numbers for those large VMs. This change adds an assertion to ensure numbers
do not collide. If they do, qemu crashes with useful debug information for
taking additional steps.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220223143322.927136-8-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/smbios/smbios.c