Re: Cache coherency bug: stale reads on /dev/sda1
From: Al Viro
Date: Sun Aug 27 2023 - 12:31:00 EST
On Sun, Aug 27, 2023 at 07:39:03AM -0700, Joshua Hudson wrote:
> (Good news: finally found the invisible button to edit reply quote)
>
> Offset 0x1C into the FAT filesystem is defined as "Count of hidden
> sectors preceding
> the partition that contains this FAT volume." It's been there since
> DOS 3.0. The Linux
> Kernel does not care what's in this field, but I have tools that have
> a hard time of it
> not being there. One example of a tool is BootDuet.
>
> The rationale is to reduce the number of tools that have to walk the
> partition table, the
> most obvious one being the boot sector itself which doesn't have room.
???
That makes no sense whatsoever; "boot sector" here is the first sector
of _partition_, not that of the entire disk (that would be MBR).
To quote the same wikipedia,
----
A volume boot record (VBR) (also known as a volume boot sector,
a partition boot record or a partition boot sector) is a type of boot
sector introduced by the IBM Personal Computer. It may be found on a
partitioned data storage device, such as a hard disk, or an unpartitioned
device, such as a floppy disk, and contains machine code for bootstrapping
programs (usually, but not necessarily, operating systems) stored in other
parts of the device. On non-partitioned storage devices, it is the first
sector of the device. On partitioned devices, it is the first sector of
an individual partition on the device, with the first sector of the entire
device being a Master Boot Record (MBR) containing the partition table.
----
So your rationale doesn't work - you need to know where the partition is
just to read the sector that contains that field. Or have access to
something that can be asked to read from partition, as opposed to the
entire disk (kernel, for example), but that something can usually be
asked where the hell does partition start.
On anything with UEFI the first sector of the entire disk is likely to be
the "protective MBR" in the beginning of GPT. No BPB in that on in real
MBR, and in any case - which of the FAT filesystems would it refer to?
Not familiar with BootDuet and currently there's a lot on my platter,
so I'm not about to go and RTFS through it. Your description really
doesn't seem to make any sense, though...