[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] elf_ops: correct loading of 32 bit PVH kernel
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/2] elf_ops: correct loading of 32 bit PVH kernel |
Date: |
Tue, 2 Mar 2021 11:31:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 3/2/21 10:03 AM, David Edmondson wrote:
> Because sizeof(struct elf64_note) == sizeof(struct elf32_note),
> attempting to use the size of the currently defined struct elf_note as
> a discriminator for whether the object being loaded is 64 bit in
> load_elf() fails.
>
> Instead, take advantage of the existing glue parameter SZ, which is
> defined as 32 or 64 in the respective variants of load_elf().
>
> Fixes: 696aa04c84c6 ("elf-ops.h: Add get_elf_note_type()")
> Signed-off-by: David Edmondson <david.edmondson@oracle.com>
> ---
> include/hw/elf_ops.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>