qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 5/8] isa: specify instance_size in isa_superio_type_info


From: Bernhard Beschow
Subject: Re: [PATCH v2 5/8] isa: specify instance_size in isa_superio_type_info
Date: Thu, 08 Feb 2024 16:10:02 +0000


Am 7. Februar 2024 19:03:30 UTC schrieb "Philippe Mathieu-Daudé" 
<philmd@linaro.org>:
>On 7/2/24 12:14, Paolo Bonzini wrote:
>> Right now all subclasses of TYPE_ISA_SUPERIO have to specify an 
>> instance_size,
>> because the ISASuperIODevice struct adds fields to ISADevice but the type 
>> does
>> not include the increased instance size.  Failure to do so results in an 
>> access
>> past the bounds of struct ISADevice as soon as isa_superio_realize is called.
>> Fix this by specifying the instance_size already in the superclass.
>> 
>> Cc: Bernhard Beschow <shentey@gmail.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   hw/isa/isa-superio.c       | 2 +-
>>   hw/isa/smc37c669-superio.c | 1 -
>>   2 files changed, 1 insertion(+), 2 deletions(-)
>
>Oops, thanks!
>
>Fixes: 4c3119a6e3 ("hw/isa/superio: Factor out the parallel code from 
>pc87312.c")
>Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Fixes a latent bug which thankfully isn't materialized at the moment.

Reviewed-by: Bernhard Beschow <shentey@gmail.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]