]> git.karo-electronics.de Git - karo-tx-linux.git/commit
partitions: read whole sector with EFI GPT header
authorKarel Zak <kzak@redhat.com>
Mon, 23 Nov 2009 08:29:58 +0000 (09:29 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:40 +0000 (15:55 -0700)
commit5f8978c54b5b7968a99ff3b113589f57acab009a
tree160ae7e21f2dc40a938b0fa4366ca1604f61b67a
parent3454b339ede358e99d1b96d4295d6e5952d65bb2
partitions: read whole sector with EFI GPT header

commit 87038c2d5bda2418fda8b1456a0ae81cc3ff5bd8 upstream.

The size of EFI GPT header is not static, but whole sector is
allocated for the header. The HeaderSize field must be greater
than 92 (= sizeof(struct gpt_header) and must be less than or
equal to the logical block size.

It means we have to read whole sector with the header, because the
header crc32 checksum is calculated according to HeaderSize.

For more details see UEFI standard (version 2.3, May 2009):
  - 5.3.1 GUID Format overview, page 93
  - Table 13. GUID Partition Table Header, page 96

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/partitions/efi.c
fs/partitions/efi.h