Messages in this thread | | | Date | Sun, 28 Sep 2008 08:12:26 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] Ghost EDD devices in /sys again |
| |
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
| |