]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user: Populate vdso_sigreturn_region_{start,end} from sigtramp page
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 4 Sep 2025 10:11:45 +0000 (12:11 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 23 Sep 2025 23:17:59 +0000 (16:17 -0700)
When a target does not support a vdso, we generate a sigtramp page.
The only thing on this page is a (set of) signal return syscalls.
We do not need to narrowly restrict the vdso_sigreturn_region;
simply record the entire page for all such targets.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c

index 28f0909d1a41cc23e4bebe91c1957279ada0d0af..1370ec59be4dfc65564d685d9cf8f8353a8d8193 100644 (file)
@@ -1974,6 +1974,8 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
 
         setup_sigtramp(tramp_page);
         target_mprotect(tramp_page, TARGET_PAGE_SIZE, PROT_READ | PROT_EXEC);
+        vdso_sigreturn_region_start = tramp_page;
+        vdso_sigreturn_region_end = tramp_page + TARGET_PAGE_SIZE;
     }
 
     bprm->p = create_elf_tables(bprm->p, bprm->argc, bprm->envc, &ehdr, info,