From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSab-0005bZ-Qr for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:37:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShSaa-0000DP-3v for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:37:25 -0400 Received: from gate.crashing.org ([63.228.1.57]:41087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSaZ-0000Cx-Rb for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:37:24 -0400 Message-ID: <1340228234.28143.179.camel@pasglop> From: Benjamin Herrenschmidt Date: Thu, 21 Jun 2012 07:37:14 +1000 In-Reply-To: <4FE23ECA.9030204@codemonkey.ws> References: <1340087992-2399-1-git-send-email-benh@kernel.crashing.org> <1340087992-2399-6-git-send-email-benh@kernel.crashing.org> <4FE23ECA.9030204@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 05/13] iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Paolo Bonzini , "Michael S. Tsirkin" , qemu-devel@nongnu.org, David Gibson On Wed, 2012-06-20 at 16:21 -0500, Anthony Liguori wrote: > Again, you return an error but ignore it now. > > In the very least, on error you should scrub the passed in buffer to avoid > leaking data to the guest. > > You can imagine a malicious guest programming the IOMMU with invalid mappings > and then doing DMA operations in order to read memory from the host QEMU process. Cleaning the buffer is easy, I'll add that. Returning an error sounds non-trivial with the current interface. Cheers, Ben.