[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps
From: |
Laurent Vivier |
Subject: |
[PULL 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps |
Date: |
Tue, 24 Mar 2020 11:03:10 +0100 |
From: Richard Henderson <address@hidden>
The page isn't (necessarily) present in the host /proc/self/maps,
and even if it might be it isn't present in page_flags, and even
if it was it might not have the same set of page permissions.
The easiest thing to do, particularly when it comes to the
"[vsyscall]" note at the end of line, is to special case it.
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
linux-user/syscall.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 35f414666243..5675eca962d7 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7144,6 +7144,16 @@ static int open_self_maps(void *cpu_env, int fd)
}
}
+#ifdef TARGET_VSYSCALL_PAGE
+ /*
+ * We only support execution from the vsyscall page.
+ * This is as if CONFIG_LEGACY_VSYSCALL_XONLY=y from v5.3.
+ */
+ dprintf(fd, TARGET_FMT_lx "-" TARGET_FMT_lx
+ " --xp 00000000 00:00 0 [vsyscall]\n",
+ TARGET_VSYSCALL_PAGE, TARGET_VSYSCALL_PAGE + TARGET_PAGE_SIZE);
+#endif
+
free(line);
fclose(fp);
--
2.25.1
- [PULL 0/5] Linux user for 5.0 patches, Laurent Vivier, 2020/03/24
- [PULL 1/5] target/i386: Renumber EXCP_SYSCALL, Laurent Vivier, 2020/03/24
- [PULL 2/5] linux-user/i386: Split out gen_signal, Laurent Vivier, 2020/03/24
- [PULL 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps,
Laurent Vivier <=
- [PULL 5/5] linux-user: Flush out implementation of gettimeofday, Laurent Vivier, 2020/03/24
- [PULL 3/5] linux-user/i386: Emulate x86_64 vsyscalls, Laurent Vivier, 2020/03/24
- Re: [PULL 0/5] Linux user for 5.0 patches, no-reply, 2020/03/24
- Re: [PULL 0/5] Linux user for 5.0 patches, no-reply, 2020/03/24