Re: [PATCH] Ghost EDD devices in /sys again

From: H. Peter Anvin
Date: Sun Sep 28 2008 - 11:14:02 EST


Andrey Borzenkov wrote:
On Sunday 07 September 2008, H. Peter Anvin wrote:
I think this is closer to what we really want; after all, memory being written is the "first principles" test that applies here.


OK I have been using this for some time. I do not actually insist on
returning "failure" for zero signature; my main concern was duplicated
signature resulted from not clearing read buffer. Still I assume that
zero signature is the same as no signature; i.e. even if disk is physically
present but zeroed out there is no point in presenting mbr_signature in
sysfs either.


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.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/