]> 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, 28 Jan 2010 23:01:05 +0000 (15:01 -0800)
commit6f8de29a8ef0abd5800589f3f8f4927b9a72739a
tree849eac7d046255f2bc8b310374f1d8de6feac935
parent8f2fefcddff63394e42a6165040945cc9967bd19
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