[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/11] linux-user: fix multi-threaded /proc/self/map
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 02/11] linux-user: fix multi-threaded /proc/self/maps |
Date: |
Fri, 12 Oct 2012 15:36:07 +0300 |
From: Alexander Graf <address@hidden>
When reading our faked /proc/self/maps from a secondary thread,
we get an invalid stack entry. This is because ts->stack_base is not
initialized in non-primary threads.
However, ts->info is, and the stack layout information we're looking
for is there too. So let's use that one instead!
Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1a38169..cf0b385 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4962,8 +4962,8 @@ static int open_self_maps(void *cpu_env, int fd)
#if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32)
dprintf(fd, "%08llx-%08llx rw-p %08llx 00:00 0 [stack]\n",
(unsigned long long)ts->info->stack_limit,
- (unsigned long long)(ts->stack_base + (TARGET_PAGE_SIZE - 1))
- & TARGET_PAGE_MASK,
+ (unsigned long long)(ts->info->start_stack +
+ (TARGET_PAGE_SIZE - 1)) &
TARGET_PAGE_MASK,
(unsigned long long)0);
#endif
--
1.7.9.5
- [Qemu-devel] [PATCH 00/11] Pending Linux-user patches, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 03/11] linux-user: Perform more checks on iovec lists, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 10/11] linux-user: ppc: mark as long long aligned, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 05/11] alpha-linux-user: Fix sigaltstack structure definition, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 01/11] linux-user: fix statfs, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 08/11] configure: Remove unnecessary host_guest_base code, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 09/11] tcg: Remove TCG_TARGET_HAS_GUEST_BASE define, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 02/11] linux-user: fix multi-threaded /proc/self/maps,
riku . voipio <=
- [Qemu-devel] [PATCH 06/11] linux-user: Fix siginfo handling, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 04/11] linux-user: Implement gethostname, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 07/11] linux-user: If loading fails, print error as string, not number, riku . voipio, 2012/10/12
- [Qemu-devel] [PATCH 11/11] linux-user: register align p{read, write}64, riku . voipio, 2012/10/12
- Re: [Qemu-devel] [PATCH 00/11] Pending Linux-user patches, Aurelien Jarno, 2012/10/17