public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Robinson, Herbie" <Herbie.Robinson@stratus.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
Date: Tue, 10 Jul 2018 01:02:37 +0000	[thread overview]
Message-ID: <BN1PR08MB107DFA3DF35009F26D30674E65B0@BN1PR08MB107.namprd08.prod.outlook.com> (raw)

I noticed this code in MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c:



  //

  // Verify that the Protective MBR is valid

  //

  for (Index = 0; Index < MAX_MBR_PARTITIONS; Index++) {

    if (ProtectiveMbr->Partition[Index].BootIndicator == 0x00 &&

        ProtectiveMbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION &&

        UNPACK_UINT32 (ProtectiveMbr->Partition[Index].StartingLBA) == 1

        ) {

      break;

    }



I was wondering why the code is checking for BootIndicator being zero when the UEFI spec states in two places that UEFI should ignore that field?  Is this some kind of security thing?  I couldn't find anything in the git history.






                 reply	other threads:[~2018-07-10  1:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-list 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=BN1PR08MB107DFA3DF35009F26D30674E65B0@BN1PR08MB107.namprd08.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /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