From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQmuk-0005eM-6U for mharc-grub-devel@gnu.org; Wed, 06 Aug 2008 13:35:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQmuh-0005Z0-IH for grub-devel@gnu.org; Wed, 06 Aug 2008 13:35:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQmue-0005Ss-Tj for grub-devel@gnu.org; Wed, 06 Aug 2008 13:35:06 -0400 Received: from [199.232.76.173] (port=41657 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQmue-0005ST-OD for grub-devel@gnu.org; Wed, 06 Aug 2008 13:35:04 -0400 Received: from ik-out-1112.google.com ([66.249.90.179]:62958) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQmue-0002za-Hm for grub-devel@gnu.org; Wed, 06 Aug 2008 13:35:04 -0400 Received: by ik-out-1112.google.com with SMTP id c21so21664ika.2 for ; Wed, 06 Aug 2008 10:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=gdhDDxzrnuhsBx8ByOqSkCTZ2i+EwS229lpUU3uqD4o=; b=gGz/YZKxVyk3dK72B01Yp5lzNrbs6MYwUzPiaP+81T6axUAHSAvDRETfpAEjvXy1Fh Kx9kZsGGscv+h0YPJ/2hWhTN6YappgpXp+kZxsfzsVthBf/luJIQ9jXzkZIdpP8yZgen aksW0KziTI1DXCsSE5fpq8AwtTVxYanLs38i8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=ApB0DS51zChifRxg+DE7Nks+NkrELCqg5dUGhOabX+xKRfoNhaaxH9kCK+VK7u3BEE /KPRP3k4hQ0l7Rr6IoEaruInE6NDkZEZTHMz5bZJ5gjwt+Y3enK8r3S9/9Sbta58luYq odoqXsu9p/5Nq9G6J4gG9034gs4viifXR49gM= Received: by 10.210.17.14 with SMTP id 14mr2875892ebq.39.1218044102958; Wed, 06 Aug 2008 10:35:02 -0700 (PDT) Received: from ?192.168.1.100? ( [213.37.137.93]) by mx.google.com with ESMTPS id y34sm21608638iky.10.2008.08.06.10.34.28 (version=SSLv3 cipher=RC4-MD5); Wed, 06 Aug 2008 10:34:31 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <20080806101135.762ec5dd@gibibit.com> References: <20080806101135.762ec5dd@gibibit.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-q6OQmlYZInpUqnm+j8H3" Date: Wed, 06 Aug 2008 19:37:06 +0200 Message-Id: <1218044226.6890.38.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: Encryption Support for GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2008 17:35:08 -0000 --=-q6OQmlYZInpUqnm+j8H3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El mi=C3=A9, 06-08-2008 a las 10:11 -0700, Colin D Bennett escribi=C3=B3: > On Wed, 6 Aug 2008 11:04:16 -0500 (CDT) > "W. Michael Petullo" wrote: >=20 > > 1. How do I know exactly what subset of libc is available to me as a > > GRUB developer? Obviously, system calls would not be expected to work > > because the operating system has not yet been loaded, but I would > > expect libmath routines to be usable by GRUB. What about other > > libraries? >=20 > No libc is available. Only functions implemented by GRUB itself are > available. See ``kern/misc.c`` and ``include/grub/misc.h`` in the GRUB > 2 source tree for implementations of the most important things that are > normally provided by libc, such as strcpy (grub_strcpy), memcmp > (grub_memcmp), etc. Maybe we should separate those headers in ANSI-like files, following a structure like: include/grub/gstdlib.h - grub_malloc et al include/grub/gstdio.h - grub_printf and friends etc Of course, most of them would not be complete (i.e. gstdlib.h would not have process control functions) but at least we'd separate "support" functions from "pure GRUB" and questions like the OP's would be fast to answer: "look at gstd*.h". Furthermore, such a separation would "force" us to "commit" to a semi-permanent specification of which subset of libc is available to module writers, which is good if people wants to write and maintain modules outside the GRUB tree. -Habbit >=20 > link to online svn for misc.c: > http://svn.savannah.gnu.org/viewvc/trunk/grub2/kern/misc.c?revision=3D177= 4&root=3Dgrub&view=3Dmarkup >=20 > GRUB implements dynamic memory allocation through grub_malloc, > grub_free, grub_realloc. See ``kern/mm.c``. >=20 > No math library is available, but I think you could create a 'math' > module in GRUB and implement the required math functions there. The > main thing is to keep the GRUB core small. It needs to fit in 32 KB, I > think. >=20 > GRUB has its own file I/O api (no stdio -- instead use grub_file_open, > grub_file_read, etc.). >=20 > If you want to see how to use the GRUB library stuff, look at some of > the built in commands such as ``commands/ls.c``, etc. >=20 > Regards, > Colin >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --=-q6OQmlYZInpUqnm+j8H3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASJnhQqSl+Fbdeo72AQI2pRAAics5N2ggySLLvYkSLFcylXVDv73DqLB2 h0aPTPXaanVYiCbj+6w7Y/XZ7MNgQ+K287xa3AYqrzaQybiXvCm1rgPGpemFpxmY rj2DF3ZNOyBNBOnE+xgqxftuBZTVOExIw74n/UrcO4WvkD2N8mSomjievqmExb7Z mcX7BD7vmDWBiRg8QZusCETJ5OCEWILJQkQ+KQRB5JpL1NN1qXA2pQPDoHHFKQIE oOstZZh0yLu/X/IZVd0G3gDRLZqs8dAMMAku6ieBPnNKRFUnDHHyueTyDGjf/UEk nTXXGpRY2Bp4ay9C9PmyQaRMEgWXNCOtiKrYugMjKYlMtqR3Z0O6RIrSfudTzn++ LzGRlmcGPHYBJz0rz0M/4Nj4tVt79/89OKdqnRMS7SyYqlMKCl8nyze6vHg4EPaS 5Y5AdhAW4DhuWmgOZiqiuzavjuFyexD+EG/IpDtG62CTrcLiKoWDuIlXgZtyV7ER hDxQ9p3bDZr8+HSWdScagIyYyiJIu8lIIfBHJHjJatA+kGRH/nPS8K/RIAsC/wGE tzVxZMVVGbJly5GyRukaLmh55CZIwSg/QRe/fBEBsberxpt2rRfqae30R88oIC6I X/yCk7WFlFnr9IBkGXMDjup2GUjOPC0m5m9Q5WUtoj2eFhKi5wq9BadAt4Q2JEwa hP/mv8aoDmM= =S1mJ -----END PGP SIGNATURE----- --=-q6OQmlYZInpUqnm+j8H3--