[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support Openfirmware disks with non-512B sectors
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] Support Openfirmware disks with non-512B sectors |
Date: |
Wed, 30 Jan 2013 09:37:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11 |
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
signature.asc
Description: OpenPGP digital signature