* [PULL 0/1] linux-user late fix
@ 2023-11-21 15:56 Richard Henderson
2023-11-21 15:56 ` [PULL 1/1] linux-user: Fix loaddr computation for some elf files Richard Henderson
2023-11-21 22:16 ` [PULL 0/1] linux-user late fix Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2023-11-21 15:56 UTC (permalink / raw)
To: qemu-devel
The following changes since commit c14ae763d548842c6abd1afaf5dc7ce7322ed901:
Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2023-11-21 06:25:14 -0500)
are available in the Git repository at:
https://gitlab.com/rth7680/qemu.git tags/pull-lu-20231121
for you to fetch changes up to 82d70a84c8ee42ef969a9cfddc0f5b30b16165f5:
linux-user: Fix loaddr computation for some elf files (2023-11-21 09:23:27 -0600)
----------------------------------------------------------------
linux-user: Fix loaddr computation for some elf files
----------------------------------------------------------------
Richard Henderson (1):
linux-user: Fix loaddr computation for some elf files
linux-user/elfload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL 1/1] linux-user: Fix loaddr computation for some elf files
2023-11-21 15:56 [PULL 0/1] linux-user late fix Richard Henderson
@ 2023-11-21 15:56 ` Richard Henderson
2023-11-21 22:16 ` [PULL 0/1] linux-user late fix Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-11-21 15:56 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Michael Tokarev
The file offset of the load segment is not relevant to the
low address, only the beginning of the virtual address page.
Cc: qemu-stable@nongnu.org
Fixes: a93934fecd4 ("elf: take phdr offset into account when calculating the program load address")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1952
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
---
linux-user/elfload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 4cd6891d7b..cf9e74468b 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3308,7 +3308,7 @@ static void load_elf_image(const char *image_name, const ImageSource *src,
for (i = 0; i < ehdr->e_phnum; ++i) {
struct elf_phdr *eppnt = phdr + i;
if (eppnt->p_type == PT_LOAD) {
- abi_ulong a = eppnt->p_vaddr - eppnt->p_offset;
+ abi_ulong a = eppnt->p_vaddr & TARGET_PAGE_MASK;
if (a < loaddr) {
loaddr = a;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PULL 0/1] linux-user late fix
2023-11-21 15:56 [PULL 0/1] linux-user late fix Richard Henderson
2023-11-21 15:56 ` [PULL 1/1] linux-user: Fix loaddr computation for some elf files Richard Henderson
@ 2023-11-21 22:16 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2023-11-21 22:16 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-21 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21 15:56 [PULL 0/1] linux-user late fix Richard Henderson
2023-11-21 15:56 ` [PULL 1/1] linux-user: Fix loaddr computation for some elf files Richard Henderson
2023-11-21 22:16 ` [PULL 0/1] linux-user late fix Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).