qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/2] hw/elf_ops: clear uninitialized segment space


From: Richard Henderson
Subject: Re: [PATCH v2 2/2] hw/elf_ops: clear uninitialized segment space
Date: Thu, 15 Apr 2021 15:33:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/15/21 3:04 AM, Philippe Mathieu-Daudé wrote:
From: Laurent Vivier<laurent@vivier.eu>

When the mem_size of the segment is bigger than the file_size,
and if this space doesn't overlap another segment, it needs
to be cleared.

This bug is very similar to the one we had for linux-user,
22d113b52f41 ("linux-user: Fix loading of BSS segments"),
where .bss section is encoded as an extension of the the data
one by setting the segment p_memsz > p_filesz.

Signed-off-by: Laurent Vivier<laurent@vivier.eu>
Message-Id:<20210414105838.205019-1-laurent@vivier.eu>
[PMD: Use recently added address_space_set()]
Signed-off-by: Philippe Mathieu-Daudé<philmd@redhat.com>
---
  include/hw/elf_ops.h | 13 +++++++++++++
  1 file changed, 13 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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