* [Qemu-devel] [PATCH] linux-user: guard mmap_next_start from specific maps
@ 2012-03-03 23:22 Alexander Graf
2012-03-04 0:43 ` Paul Brook
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Graf @ 2012-03-03 23:22 UTC (permalink / raw)
To: qemu-devel qemu-devel
Cc: Bernhard M. Wiedemann, Riku Voipio, Paul Brook, Peter Maydell
If the guest process tells us to map at a specific address, we shouldn't
increase the "last automatic mapping ended here" variable.
This patch brings the reserved_va code in line with the default case.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
linux-user/mmap.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 2245f40..a0c1347 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -253,7 +253,11 @@ static abi_ulong mmap_find_vma_reserved(abi_ulong start, abi_ulong size)
}
}
}
- mmap_next_start = addr;
+
+ if (start == mmap_next_start && addr >= TASK_UNMAPPED_BASE) {
+ mmap_next_start = addr;
+ }
+
return last_addr;
}
#endif
--
1.6.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: guard mmap_next_start from specific maps
2012-03-03 23:22 [Qemu-devel] [PATCH] linux-user: guard mmap_next_start from specific maps Alexander Graf
@ 2012-03-04 0:43 ` Paul Brook
0 siblings, 0 replies; 2+ messages in thread
From: Paul Brook @ 2012-03-04 0:43 UTC (permalink / raw)
To: Alexander Graf
Cc: Bernhard M. Wiedemann, Riku Voipio, qemu-devel qemu-devel,
Peter Maydell
> If the guest process tells us to map at a specific address, we shouldn't
> increase the "last automatic mapping ended here" variable.
That sounds reasonable, in fact I'd go further. Tests on an x86-linux machine
(both 32-bit and 64-bit userspace) show that if the requested address is not
available then it is completely ignored.
> + if (start == mmap_next_start && addr >= TASK_UNMAPPED_BASE) {
> + mmap_next_start = addr;
Code does not match description.
Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-04 0:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 23:22 [Qemu-devel] [PATCH] linux-user: guard mmap_next_start from specific maps Alexander Graf
2012-03-04 0:43 ` Paul Brook
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).