grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Support Openfirmware disks with non-512B sectors


From: Paulo Flabiano Smorigo/Brazil/IBM
Subject: Re: [PATCH] Support Openfirmware disks with non-512B sectors
Date: Wed, 30 Jan 2013 14:21:55 -0500
User-agent: Internet Messaging Program (IMP) H4 (5.0.22)


Quoting Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden>:

On 28.01.2013 18:18, Paulo Flabiano Smorigo/Brazil/IBM wrote:


Quoting Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden>:

On 22.01.2013 18:44, Paulo Flabiano Smorigo/Brazil/IBM wrote:

+  grub_ieee1275_open (device, &dev_ihandle);

Please don't open another handle. This can cause lockdown on some
platforms. Use the already available framework.

--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Hi phcoder,

Here is a new version of my patch using last_ihandle. Is it ok now?

This patch lacks sanity checks. You need to check that sector size is
sane (never trust openfirmware or BIOS). Like this (taken from biosdisk.c):
              if (drp->bytes_per_sector
                  && !(drp->bytes_per_sector & (drp->bytes_per_sector - 1))
                  && drp->bytes_per_sector >= 512
                  && drp->bytes_per_sector <= 16384)


Thanks in advance


_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel



--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Hi,

Sanity check added.

Best regards,
--
Paulo Flabiano Smorigo
Software Engineer
Linux Technology Center - IBM Systems & Technology Group

Attachment: grub_ieee1275_get_block_size_v3.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]