From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpYz3-0000Oo-CG for qemu-devel@nongnu.org; Fri, 23 Oct 2015 05:50:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpYyz-0002Go-B5 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 05:50:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpYyz-0002G2-5w for qemu-devel@nongnu.org; Fri, 23 Oct 2015 05:49:57 -0400 Date: Fri, 23 Oct 2015 11:49:49 +0200 From: Marc =?UTF-8?B?TWFyw60=?= Message-ID: <20151023114949.76bdaf6a@markmb_rh> In-Reply-To: <1445583386.13733.134.camel@redhat.com> References: <20151023062700.30810.47746@jljusten-ivb> <1445583386.13733.134.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] fw_cfg DMA security List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Jordan Justen , qemu-devel@nongnu.org On Fri, 23 Oct 2015 08:56:26 +0200 Gerd Hoffmann wrote: > Hi, > > > One complication I thought of was that it might be tricky to deal > > with the implications of allowing this DMA to specify any old > > address to fill with fw_cfg data. > > > > So, for example, since Red Hat is working on SMM. Would a DMA to > > SMRAM be protected? > > > > I haven't watched the fw_cfg DMA discussion too closely, but has > > this been thought about? > > Yes. That problem isn't new and it isn't specific to fw_cfg. You > also don't want grant dma access to smram/tseg to your ide/sata/scsi > controller or NIC. > > > One idea I had was that near the end of the firmware boot, the > > firmware could trigger fw_cfg in QEMU to stop supporting DMA until a > > reset. > > Should not be needed. We have address spaces in qemu, and the > smram/tseg regions are explicitly excluded (when enabled) from > dma-able memory. > > mark: when writing a fw_cfg_dma tests it is a good idea to add a > testcase for this, so make sure this works as intended and to avoid > security-sensitive regressions. Noted, thanks Marc > cheers, > Gerd > >