From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cX88e-0007vO-7b for qemu-devel@nongnu.org; Fri, 27 Jan 2017 10:08:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cX88V-00064h-V1 for qemu-devel@nongnu.org; Fri, 27 Jan 2017 10:08:32 -0500 Received: from mail-vk0-x229.google.com ([2607:f8b0:400c:c05::229]:34127) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cX88V-00064O-Qy for qemu-devel@nongnu.org; Fri, 27 Jan 2017 10:08:23 -0500 Received: by mail-vk0-x229.google.com with SMTP id r136so177115795vke.1 for ; Fri, 27 Jan 2017 07:08:23 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20170127120528.30959-1-ppandit@redhat.com> References: <20170127120528.30959-1-ppandit@redhat.com> From: Peter Maydell Date: Fri, 27 Jan 2017 15:08:02 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] dma: omap: check dma channel data_type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: P J P Cc: Qemu Developers , Jiang Xin , Prasad J Pandit On 27 January 2017 at 12:05, P J P wrote: > From: Prasad J Pandit > > When setting dma channel 'data_type', if (value & 3) == 3, > the set 'data_type' is said to be bad. This also leads to an > OOB access in 'omap_dma_transfer_generic', while doing > cpu_physical_memory_r/w operations. Add check to avoid it. > > Reported-by: Jiang Xin > Signed-off-by: Prasad J Pandit The data sheet just says the behaviour with value == 3 is "undefined", so I guess this is as good a way as any other to handle it. Applied to target-arm.next, thanks. -- PMM