qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: floss@arusekk.pl
Subject: [PATCH v4 3/4] linux-user: Populate vdso_sigreturn_region_{start, end} from sigtramp page
Date: Thu,  4 Sep 2025 12:23:09 +0200	[thread overview]
Message-ID: <20250904102311.57383-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20250904102311.57383-1-richard.henderson@linaro.org>

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 28f0909d1a..1370ec59be 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -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,
-- 
2.43.0



  parent reply	other threads:[~2025-09-04 10:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 10:23 [PATCH v4 0/4] linux-user: Add syscall dispatch support Richard Henderson
2025-09-04 10:23 ` [PATCH v4 1/4] linux-user: Create vdso_sigreturn_region_{start,end} Richard Henderson
2025-09-04 10:23 ` [PATCH v4 2/4] linux-user: Populate sigreturn_region_{start, end} in all vdso.S Richard Henderson
2025-09-04 10:23 ` Richard Henderson [this message]
2025-09-04 10:23 ` [PATCH v4 4/4] linux-user: Add syscall dispatch support Richard Henderson
2025-09-19  7:54 ` [PATCH v4 0/4] " Arusekk
2025-09-19 12:58   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250904102311.57383-4-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=floss@arusekk.pl \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).