Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374AbdFQQwB (ORCPT ); Sat, 17 Jun 2017 12:52:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720AbdFQQv7 (ORCPT ); Sat, 17 Jun 2017 12:51:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 47F9F80C06 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 47F9F80C06 Subject: Re: [Qemu-devel] [RFH] qemu-2.6 memory corruption with OVMF and linux-4.9 To: Philipp Hahn References: <5d090b82-dae7-ac67-a032-92c2e776b70f@univention.de> From: Laszlo Ersek Cc: qemu-devel@nongnu.org, "linux-kernel@vger.kernel.org" , Peter Jones , linux-fbdev@vger.kernel.org Message-ID: <2e7e9fe3-e603-d75f-84c6-d0fb048266da@redhat.com> Date: Sat, 17 Jun 2017 18:51:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <5d090b82-dae7-ac67-a032-92c2e776b70f@univention.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 17 Jun 2017 16:51:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3246 Lines: 61 On 06/16/17 19:03, Philipp Hahn wrote: > Comparing the corrupted (left) with the supposed (right) driver shows > the following pattern: >> /tmp/uefi.bin [+] 15038,1 Alles /tmp/uefi.ko [+] 15038,1 Alles >> 003ac00: e801 0000 0000 0000 3c00 0000 1700 0000 ........<....... | 003ac00: e801 0000 0000 0000 5e8c 0000 1000 f1ff ........^....... >> 003ac10: 785b 3e8a 0000 0000 3c00 0000 0700 0000 x[>.....<....... | 003ac10: 785b 3e8a 0000 0000 0000 0000 0000 0000 x[>............. >> 003ac20: 778c 0000 1200 0200 3c00 0000 0700 0000 w.......<....... | 003ac20: 778c 0000 1200 0200 f018 0000 0000 0000 w............... >> 003ac30: 1e00 0000 0000 0000 3c00 0000 1700 0000 ........<....... | 003ac30: 1e00 0000 0000 0000 8c8c 0000 1200 0200 ................ >> 003ac40: 7007 0000 0000 0000 3c00 0000 0700 0000 p.......<....... | 003ac40: 7007 0000 0000 0000 1400 0000 0000 0000 p............... >> 003ac50: 9c8c 0000 1200 0200 3c00 0000 0700 0000 ........<....... | 003ac50: 9c8c 0000 1200 0200 0022 0000 0000 0000 ........."...... >> 003ac60: 4000 0000 0000 0000 3c00 0000 1700 0000 @.......<....... | 003ac60: 4000 0000 0000 0000 ac8c 0000 1000 f1ff @............... Let me give you a different visual representation. First good, then bad. (I also recommend using the "vbindiff" tool for such problems, it is great for picking out patterns.) ** ** ** ** ** ** ** ** 8 9 ** ** ** 13 14 15 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 00000000 01 e8 00 00 00 00 00 00 8c 5e 00 00 00 10 ff f1 00000010 5b 78 8a 3e 00 00 00 00 00 00 00 00 00 00 00 00 00000020 8c 77 00 00 00 12 00 02 18 f0 00 00 00 00 00 00 00000030 00 1e 00 00 00 00 00 00 8c 8c 00 00 00 12 00 02 00000040 07 70 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00000050 8c 9c 00 00 00 12 00 02 22 00 00 00 00 00 00 00 00000060 00 40 00 00 00 00 00 00 8c ac 00 00 00 10 ff f1 00000000 01 e8 00 00 00 00 00 00 00 3c 00 00 00 17 00 00 00000010 5b 78 8a 3e 00 00 00 00 00 3c 00 00 00 07 00 00 00000020 8c 77 00 00 00 12 00 02 00 3c 00 00 00 07 00 00 00000030 00 1e 00 00 00 00 00 00 00 3c 00 00 00 17 00 00 00000040 07 70 00 00 00 00 00 00 00 3c 00 00 00 07 00 00 00000050 8c 9c 00 00 00 12 00 02 00 3c 00 00 00 07 00 00 00000060 00 40 00 00 00 00 00 00 00 3c 00 00 00 17 00 00 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ** ** ** ** ** ** ** ** 8 9 ** ** ** 13 14 15 The columns that I marked with "**" are identical between "good" and "bad". (These are columns 0-7, 10-12.) Column 8 is overwritten by zeros (every 16th byte). Column 9 is overwritten by 0x3c (every 16th byte). Column 13 is super interesting. The most significant nibble in that column is not disturbed. And, in the least significant nibble, the least significant three bits are turned on. Basically, the corruption could be described, for this column (i.e., every 16th byte), as bad = good | 0x7 Column 14 is overwritten by zeros (every 16th byte). Column 15 is overwritten by zeros (every 16th byte). My take is that your host machine has faulty RAM. Please run memtest86+ or something similar. Thanks Laszlo