The patch titled x86: fix ghost entries under /sys/firmware/edd has been removed from the -mm tree. Its filename was x86-fix-ghost-entries-under-sys-firmware-edd.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: x86: fix ghost entries under /sys/firmware/edd From: Andrey Borzenkov <arvidjaar@xxxxxxxxxx> Some BIOSes do not indicate error when trying to read from non- existing device. Zero buffer before reading and check that we actually got some data. This was fixed in different way for edd.S in http://marc.info/?l=linux-kernel&m=114087765422490&w=2, but lost again when edd.S was rewritten in C. hpa: Right, I think that's a much better patch. The really Right Thing[TM] to do is probably to pre-clear the buffer and then look for the 0xaa55 signature at offset 510; it is required for sector 0 to be a valid MBR-format partition table and hence for the MBR *signature* to be valid. I'll write that up tomorrow (I'm travelling today), or you can send me a patch. akpm: A patch in hand is worth... Signed-off-by: Andrey Borzenkov < arvidjaar@xxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Matt Domsch <Matt_Domsch@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/boot/edd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN arch/x86/boot/edd.c~x86-fix-ghost-entries-under-sys-firmware-edd arch/x86/boot/edd.c --- a/arch/x86/boot/edd.c~x86-fix-ghost-entries-under-sys-firmware-edd +++ a/arch/x86/boot/edd.c @@ -60,11 +60,12 @@ static u32 read_mbr_sig(u8 devno, struct 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; *mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET]; - return 0; + return -!*mbrsig; /* treat zero signature as no sig */ } static int get_edd_info(u8 devno, struct edd_info *ei) _ Patches currently in -mm which might be from arvidjaar@xxxxxxxxxx are git-tip.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html