From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUPMq-00077K-Ab for qemu-devel@nongnu.org; Tue, 15 May 2012 17:33:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUPMo-0000v6-9s for qemu-devel@nongnu.org; Tue, 15 May 2012 17:33:15 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:60934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUPMo-0000ua-6B for qemu-devel@nongnu.org; Tue, 15 May 2012 17:33:14 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 May 2012 17:33:06 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 1897438C8076 for ; Tue, 15 May 2012 17:33:03 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q4FLWtkm16580694 for ; Tue, 15 May 2012 17:32:56 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q4FLWtAY004957 for ; Tue, 15 May 2012 17:32:55 -0400 Message-ID: <4FB2CB83.3050208@us.ibm.com> Date: Tue, 15 May 2012 16:32:51 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1336725610-8195-1-git-send-email-agraf@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Peter Maydell Cc: Riku Voipio , Alexander Graf , qemu-devel Developers Riku, Can you review/ack this patch? 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 >