On 11 May 2012 09:40, Alexander Graf <ag...@suse.de> wrote: > If we execute linux-user code that does the following: > > * A = mmap() > * execute code in A > * munmap(A) > * B = mmap(), but mmap returns the same address as A > * execute code in B > > we end up executing a stale cached tb that contains translated code > from A, while we want new code from B. > > This patch adds a TB flush for mmap'ed regions, before we return them, > avoiding the whole issue. It also adds a flush for munmap, so that we > don't execute stale TBs instead of getting a segfault. > > Reported-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Alexander Graf <ag...@suse.de>
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> -- PMM