Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Nov 2009 17:29:03 +0000 (UTC)
From:      Robert Noland <rnoland@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/geom/part g_part_gpt.c
Message-ID:  <200911071729.nA7HTLpG040115@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rnoland     2009-11-07 17:29:03 UTC

  FreeBSD src repository

  Modified files:
    sys/geom/part        g_part_gpt.c 
  Log:
  SVN rev 199017 on 2009-11-07 17:29:03Z by rnoland
  
  Fix handling of GPT headers when size is > 92 bytes.
  
  It is valid for an on-disk GPT header to report a header size which is
  greater than 92 bytes.  Previously, we would read in the sector and copy
  only the 92 bytes that we know how to deal with before calculating the
  checksum for comparison.  This meant that when we did the checksum, we
  overshot the buffer and took in random memory, so the checksum would fail.
  
  We now determine the size of the header and allocate enough space to
  preserve the entire on-disk contents.  This allows us to be correctly
  calculate the checksum and be able to modify and write the header back
  to the disk, while preserving data that we might not understand.
  
  Reported by:    Kris Weston
  Approved by:    marcel@
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.19      +92 -67    src/sys/geom/part/g_part_gpt.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911071729.nA7HTLpG040115>