public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: BUG: fdisk, gpt broken on 32bit big endian systems
Date: Fri, 30 May 2014 05:31:00 +0200	[thread overview]
Message-ID: <201405300531.00403.sweet_f_a@gmx.de> (raw)

Hi,

This ...

$ rm -f xxx; truncate -s 10M xxx
$ echo -ne "g\nx\ni\n26841E90-46E0-4205-B012-4B8AEC35C088\nr\nw\nq\n" | fdisk xxx

... creates a broken gpt image on 32bit big endian systems.

"hexdiff" xxx-broken xxx-good:
 00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 009ffe00  45 46 49 20 50 41 52 54  00 00 01 00 00 02 00 00  |EFI PART........|
-009ffe10  68 a5 49 d1 00 00 00 00  ff ff ff ff ff ff ff ff  |h.I.............|
+009ffe10  15 b9 f3 7e 00 00 00 00  ff 4f 00 00 00 00 00 00  |...~.....O......|
 009ffe20  01 00 00 00 00 00 00 00  00 08 00 00 00 00 00 00  |................|
 009ffe30  de 4f 00 00 00 00 00 00  90 1e 84 26 e0 46 05 42  |.O.........&.F.B|
 009ffe40  b0 12 4b 8a ec 35 c0 88  df 4f 00 00 00 00 00 00  |..K..5...O......|


Looks like the backup header is broken.

Notes:
  - I only used fixed uuid to have better diff.
  - 64bit big endian systems are not broken

cu,
Rudi

             reply	other threads:[~2014-05-30  3:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30  3:31 Ruediger Meier [this message]
2014-05-30  8:26 ` BUG: fdisk, gpt broken on 32bit big endian systems Karel Zak
2014-05-30  8:54 ` Karel Zak
2014-05-30 11:52   ` Ruediger Meier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201405300531.00403.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox