-
由 Alexander Graf 提交于
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: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAlexander Graf <agraf@suse.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NRiku Voipio <riku.voipio@linaro.org> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
77a8f1a5