All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Support Openfirmware disks with non-512B sectors
Date: Wed, 30 Jan 2013 09:37:51 +0100	[thread overview]
Message-ID: <5108DBDF.1080407@gmail.com> (raw)
In-Reply-To: <20130128121821.Horde.BhpKgJir309RBrLdmAQXbVA@imap.linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

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

> 
> Quoting Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
> 
>> 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2013-01-30  8:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 17:44 [PATCH] Support Openfirmware disks with non-512B sectors Paulo Flabiano Smorigo/Brazil/IBM
2013-01-22 19:04 ` Seth Goldberg
2013-01-22 19:34   ` Paulo Flabiano Smorigo/Brazil/IBM
2013-01-22 19:35   ` Andrey Borzenkov
2013-01-22 19:39     ` Seth Goldberg
2013-01-23  6:53       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-23  7:17 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-28 17:18   ` Paulo Flabiano Smorigo/Brazil/IBM
2013-01-30  8:37     ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-01-30 19:21       ` Paulo Flabiano Smorigo/Brazil/IBM
2013-02-19  9:03         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-02-19  2:04 ` Seth Goldberg

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=5108DBDF.1080407@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.