[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 07/19] linux-user: Load vdso image if available
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
Re: [PATCH v6 07/19] linux-user: Load vdso image if available |
|
Date: |
Tue, 3 Oct 2023 14:47:52 +0200 |
|
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 30/9/23 04:15, Richard Henderson wrote:
The vdso image will be pre-processed into a C data array, with
a simple list of relocations to perform, and identifying the
location of signal trampolines.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/elfload.c | 90 +++++++++++++++++++++++++++++++++++++++-----
1 file changed, 81 insertions(+), 9 deletions(-)
@@ -3691,7 +3759,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct
image_info *info)
* and let elf_load_image do any swapping that may be required.
*/
struct elfhdr ehdr;
- struct image_info interp_info;
+ struct image_info interp_info, vdso_info;
char *elf_interpreter = NULL;
char *scratch;
@@ -3772,10 +3840,13 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
}
/*
- * TODO: load a vdso, which would also contain the signal trampolines.
- * Otherwise, allocate a private page to hold them.
+ * Load a vdso if available, which will amongst other things contain the
+ * signal trampolines. Otherwise, allocate a separate page for them.
*/
- if (TARGET_ARCH_HAS_SIGTRAMP_PAGE) {
+ const VdsoImageInfo *vdso = vdso_image_info();
Declare in prologue? Otherwise,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+ if (vdso) {
+ load_elf_vdso(&vdso_info, vdso);
+ } else if (TARGET_ARCH_HAS_SIGTRAMP_PAGE) {
abi_long tramp_page = target_mmap(0, TARGET_PAGE_SIZE,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v6 07/19] linux-user: Load vdso image if available,
Philippe Mathieu-Daudé <=