From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUaUr-00058w-KK for qemu-devel@nongnu.org; Wed, 16 May 2012 05:26:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUaUl-0007et-57 for qemu-devel@nongnu.org; Wed, 16 May 2012 05:26:17 -0400 Received: from afflict.kos.to ([92.243.29.197]:33048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUaUk-0007em-UE for qemu-devel@nongnu.org; Wed, 16 May 2012 05:26:11 -0400 Date: Wed, 16 May 2012 12:26:08 +0300 From: Riku Voipio Message-ID: <20120516092608.GA24514@afflict.kos.to> References: <1336725610-8195-1-git-send-email-agraf@suse.de> <4FB2CB83.3050208@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FB2CB83.3050208@us.ibm.com> Subject: Re: [Qemu-devel] [PATCH 1.1] linux-user: Fix stale tbs after mmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Riku Voipio , Alexander Graf , qemu-devel Developers On Tue, May 15, 2012 at 04:32:51PM -0500, Anthony Liguori wrote: > Riku, > > Can you review/ack this patch? Acked-by: Riku Voipio Are there any other Linux-user patches to consider for 1.1 ? > > Regards, > > Anthony Liguori > > > On 05/15/2012 03:35 PM, Peter Maydell wrote: > >Ping? This is 1.1 material in my opinion... > > > >(patchwork url: http://patchwork.ozlabs.org/patch/158556/) > > > >-- PMM > > > >On 11 May 2012 17:25, Peter Maydell wrote: > >>On 11 May 2012 09:40, Alexander Graf 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 > >>>Signed-off-by: Alexander Graf > >> > >>Reviewed-by: Peter Maydell > >> > >>-- PMM > >