[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/38] linux-user: Add x86_64 vsyscall page to /proc/self/maps
From: |
Laurent Vivier |
Subject: |
[PULL 04/38] linux-user: Add x86_64 vsyscall page to /proc/self/maps |
Date: |
Mon, 16 Mar 2020 17:15:16 +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>
[lv: remove trailing whitespace]
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 8d27d1080752..5479d67a10be 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7079,6 +7079,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.24.1
- [PULL 06/38] linux-user: Add AT_EXECFN auxval, (continued)
- [PULL 06/38] linux-user: Add AT_EXECFN auxval, Laurent Vivier, 2020/03/16
- [PULL 12/38] linux-user: Support futex_time64, Laurent Vivier, 2020/03/16
- [PULL 20/38] linux-user, microblaze: add syscall table generation support, Laurent Vivier, 2020/03/16
- [PULL 14/38] linux-user: introduce parameters to generate syscall_nr.h, Laurent Vivier, 2020/03/16
- [PULL 37/38] linux-user, nios2: sync syscall numbers with kernel v5.5, Laurent Vivier, 2020/03/16
- [PULL 11/38] linux-user/syscall: Add support for clock_gettime64/clock_settime64, Laurent Vivier, 2020/03/16
- [PULL 13/38] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel, Laurent Vivier, 2020/03/16
- [PULL 18/38] linux-user, xtensa: add syscall table generation support, Laurent Vivier, 2020/03/16
- [PULL 30/38] linux-user, mips64: add syscall table generation support, Laurent Vivier, 2020/03/16
- [PULL 33/38] linux-user,mips: move content of mips_syscall_args, Laurent Vivier, 2020/03/16
- [PULL 04/38] linux-user: Add x86_64 vsyscall page to /proc/self/maps,
Laurent Vivier <=
- [PULL 08/38] linux-user: fix socket() strace, Laurent Vivier, 2020/03/16
- [PULL 01/38] target/i386: Renumber EXCP_SYSCALL, Laurent Vivier, 2020/03/16
- [PULL 17/38] linux-user, m68k: add syscall table generation support, Laurent Vivier, 2020/03/16
- [PULL 26/38] linux-user, x86_64, i386: cleanup TARGET_NR_arch_prctl, Laurent Vivier, 2020/03/16
- [PULL 34/38] linux-user,mips: update syscall-args-o32.c.inc, Laurent Vivier, 2020/03/16
- [PULL 28/38] linux-user, x86_64: add syscall table generation support, Laurent Vivier, 2020/03/16
- [PULL 24/38] linux-user, s390x: add syscall table generation support, Laurent Vivier, 2020/03/16
- [PULL 38/38] linux-user, openrisc: sync syscall numbers with kernel v5.5, Laurent Vivier, 2020/03/16
- Re: [PULL 00/38] Linux user for 5.0 patches, Peter Maydell, 2020/03/16