From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1U0TB9-0002nL-PL for mharc-grub-devel@gnu.org; Wed, 30 Jan 2013 03:37:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0TB7-0002n5-Jr for grub-devel@gnu.org; Wed, 30 Jan 2013 03:37:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0TB5-0004jS-99 for grub-devel@gnu.org; Wed, 30 Jan 2013 03:37:57 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:35488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0TB4-0004iZ-UV for grub-devel@gnu.org; Wed, 30 Jan 2013 03:37:55 -0500 Received: by mail-ee0-f46.google.com with SMTP id e49so644740eek.5 for ; Wed, 30 Jan 2013 00:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=a7tN2ii2xlB2bt7itqEdABkULPxS8x1IbdRmDuuMXuw=; b=s460VzO/QVGSe1UCebREZ3PMd9oW9GBZw49CC4ef34xUG1cof6jgs9vQPS4S7HW7I+ d1UZbg+qGQa7IMa9g3v8ut1v09ioN7prGdKxUzlKxnZCy7nLaLP9uAX/s5FYhxSEJsCJ U5LcglGb/gstMzVr7hINS/xENdMkyxXDMM6SZDyEqrkAynUs8FufhkpyBziweLfijR2I jpwq1uNnPBlEhULzHtJLcfyxa7sYBjfJo194S1N8dfyodgxR885tDn6CN56oZKdhwod4 DRfG/w0QSDBsJdxOHlm/9YOcHe6A/zQ6PYEl888FHJLeOTO4dpa42BVq3F2nEvMsawiR +iFA== X-Received: by 10.14.201.69 with SMTP id a45mr12082713eeo.43.1359535073663; Wed, 30 Jan 2013 00:37:53 -0800 (PST) Received: from debian.x201.phnet ([217.193.148.98]) by mx.google.com with ESMTPS id o3sm828878eem.15.2013.01.30.00.37.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jan 2013 00:37:52 -0800 (PST) Message-ID: <5108DBDF.1080407@gmail.com> Date: Wed, 30 Jan 2013 09:37:51 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [PATCH] Support Openfirmware disks with non-512B sectors References: <20130122124416.Horde.fXeeqJir309Q-s-wfJhzDAA@imap.linux.ibm.com> <50FF8EA7.1070409@gmail.com> <20130128121821.Horde.BhpKgJir309RBrLdmAQXbVA@imap.linux.ibm.com> In-Reply-To: <20130128121821.Horde.BhpKgJir309RBrLdmAQXbVA@imap.linux.ibm.com> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig581C20343776F744BA1F53D7" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.83.46 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 08:37:58 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig581C20343776F744BA1F53D7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 28.01.2013 18:18, Paulo Flabiano Smorigo/Brazil/IBM wrote: >=20 > Quoting Vladimir '=CF=86-coder/phcoder' Serbinenko := >=20 >> 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. >> >> --=20 >> Regards >> Vladimir '=CF=86-coder/phcoder' Serbinenko >=20 > Hi phcoder, >=20 > 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 >=3D 512 && drp->bytes_per_sector <=3D 16384) >=20 > Thanks in advance >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig581C20343776F744BA1F53D7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlEI298ACgkQNak7dOguQglvmAD/XK0dTAoz9E/CTmqjCJ+2f7LP /R/zF+VPKFOl8kQtLMcBAMIsBxJOobfQo+pBdfQyhwbuok4viThXyhtYskbzZmZQ =56cB -----END PGP SIGNATURE----- --------------enig581C20343776F744BA1F53D7--