From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753817AbYIFWJx (ORCPT ); Sat, 6 Sep 2008 18:09:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752600AbYIFWJo (ORCPT ); Sat, 6 Sep 2008 18:09:44 -0400 Received: from terminus.zytor.com ([198.137.202.10]:53407 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbYIFWJn convert rfc822-to-8bit (ORCPT ); Sat, 6 Sep 2008 18:09:43 -0400 Message-Id: <200809062208.m86M8hJM016685@terminus.zytor.com> MIME-Version: 1.0 content-class: From: "H. Peter Anvin" Subject: RE: [PATCH] Ghost EDD devices in /sys again Date: Sat, 6 Sep 2008 15:08:59 -0700 Importance: normal X-Priority: 3 To: Andrey Borzenkov CC: Andrew Morton , "Rafael J. Wysocki" , Linux Kernel Mailing List , Ingo Molnar Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I think this is closer to what we really want; after all, memory being written is the "first principles" test that applies here. -- Sent from my mobile phone (pardon any lack of formatting) -----Original Message----- From: Andrey Borzenkov Sent: Saturday, September 06, 2008 10:46 To: H. Peter Anvin Cc: Andrew Morton ; Rafael J. Wysocki ; Linux Kernel Mailing List ; Ingo Molnar Subject: Re: [PATCH] Ghost EDD devices in /sys again On Saturday 06 September 2008, H. Peter Anvin wrote: > > Andrey Borzenkov wrote: > > > > Was it really that simple? > > > > Subject: [PATCH] Fix ghost devices under /sys/firmware/edd > > From: Andrey Borzenkov > > > > Some BIOSes do not always set CF on error before return from int13. > > The patch adds additional check for status being zero (AH == 0). > > > > Do you have any evidence that there aren't any BIOSes which leave AH != > 0 on legitimate success? If so, you have turned a nuisance bug into > something that could cause install failures. > Hmm ... if install depends on having valid MBR, it will break right now as well, because it will have duplicated signatures. So at least something like following is needed. diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c index d93cbc6..4c20d31 100644 --- a/arch/x86/boot/edd.c +++ b/arch/x86/boot/edd.c @@ -58,6 +58,7 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig) if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) return -1; + memset(mbrbuf_ptr, 0, sector_size); if (read_mbr(devno, mbrbuf_ptr)) return -1;