From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1m4F0k-00005K-BD for mharc-grub-devel@gnu.org; Thu, 15 Jul 2021 23:59:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4F0j-000059-3r for grub-devel@gnu.org; Thu, 15 Jul 2021 23:59:37 -0400 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:33207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4F0h-0002Yd-1c for grub-devel@gnu.org; Thu, 15 Jul 2021 23:59:36 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.west.internal (Postfix) with ESMTP id 8C80F2B0153E; Thu, 15 Jul 2021 23:59:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 15 Jul 2021 23:59:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=GS2MBM20tnRNDxV1AE3tZCqxhue J4ejCFWOS1Lrpiis=; b=Uxn8dJ9tiGT+3CWWLN6uQcw7t5wAuoP+NBwNKRnrPkB xWw5Hmh+S+t7Fvd5YaXAtCOcyZMUEMYg8pdFIVan+BvZBMpfNUbL/QjgdmO/88v0 uTMH5HHHZUCamSBzn9M9RZMXsk7sZDqv3eGHau26Hvuf4B7YNSgOOuks6WZ/gE29 DLCKKGoK7vsU34+/3wnXaLhp8m1PnFeM3M2UiWKQlu2NJNRfpzF2yhZL9pk2sZRH FaZDzPNkv+8z9ijd9FkVXnHjuoM8vxvDk2nsX9FeZeYxqJa4S6cr78Fom0+7AZvi hG5RH3q8WXMg3co6fJ8S24HvLa+htsyLsYgPBQhON8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=GS2MBM 20tnRNDxV1AE3tZCqxhueJ4ejCFWOS1Lrpiis=; b=CnaDnGCFxcDFsn0+0OT4PW fVpQEDznioB2/f1bvCDTesVMh1q96LDlHeRaZjb4QCgp5wkZ8LNvKd6Tavltt8r2 SYu5wzLg38QN/LBnu+dvTYIZpUQnZxjvRpDMfRlzAwu6gjVEQ3PS3LQjkFoL+e2B 7CN8wMyhn+P+ZGtRmQ2uUnbs0M/8uVCWpk8BNFuVlUa22AQN3l+oBf/h6xqilkWY Hg6HYewOlcKKtmTQK99pvttHDMP5U0IfwPnj++Ux60PvxQ4GgaszFt5DK850JrJd eKNMOggd/DRB5t6hZfL8bXk6DN8M/4nS415N1H7mkqdRvlZrls9pMgUTOkier2KQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhrihgt khcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnh epudegieeuffefgfegudeiueduhfdvffelvdfhkedvleetfeffudegveekieejieeinecu ffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jul 2021 23:59:25 -0400 (EDT) Received: from localhost (ncase [10.192.0.11]) by vm-mail.pks.im (OpenSMTPD) with ESMTPSA id b2425e38 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 16 Jul 2021 03:59:23 +0000 (UTC) Date: Fri, 16 Jul 2021 05:59:20 +0200 From: Patrick Steinhardt To: Daniel Kiper Cc: Daniel Axtens , grub-devel@gnu.org, rashmica.g@gmail.com, alastair@d-silva.org, nayna@linux.ibm.com, chris.coulson@canonical.com, hanson.char@gmail.com, hchar@amazon.com, javierm@redhat.com, leif@nuviainc.com, phcoder@gmail.com, pjones@redhat.com, pmenzel@molgen.mpg.de, stefanb@linux.ibm.com, xnox@ubuntu.com Subject: Re: [PATCH v2 02/22] ieee1275: claim more memory Message-ID: References: <20210630084031.2663622-1-dja@axtens.net> <20210630084031.2663622-3-dja@axtens.net> <20210715215104.dgcfefezytxq6exe@tomti.i.net-space.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="slnPJVnzEYw1+a8Q" Content-Disposition: inline In-Reply-To: <20210715215104.dgcfefezytxq6exe@tomti.i.net-space.pl> Received-SPF: pass client-ip=64.147.123.27; envelope-from=ps@pks.im; helo=wnew2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2021 03:59:37 -0000 --slnPJVnzEYw1+a8Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 15, 2021 at 11:51:04PM +0200, Daniel Kiper wrote: > CC-in a few people who can be interested in this... >=20 > On Wed, Jun 30, 2021 at 06:40:11PM +1000, Daniel Axtens wrote: > > On powerpc-ieee1275, we are running out of memory trying to verify > > anything. This is because: > > > > - we have to load an entire file into memory to verify it. This is > > extremely difficult to change with appended signatures. > > - We only have 32MB of heap. > > - Distro kernels are now often around 30MB. > > > > So we want to claim more memory from OpenFirmware for our heap. >=20 > AFAICT it is common problem in the GRUB right now. Please take a look at > [1], [2]. It would be nice to find general solution for all. Of course > if possible. So, if somebody could take a look at memory management in > the GRUB and propose a solution for the problem that would be perfect. > Any volunteers? >=20 > Daniel >=20 > [1] https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00009.html > [2] https://lists.gnu.org/archive/html/grub-devel/2021-01/msg00031.html I think that my [1] should solve the issue generically. Instead of bumping any of the static limits we have in place, we just drop them altogether in favor of dynamically requesting additional EFI regions whenever we realize that the currently mapped regions cannot satisfy our needs. Like this, we can lower the initially requested regions, but scale them to the specific needs if need be. I had planned to revisit this patch series much earlier, but somehow I didn't yet find the time. Any comments on my approach would be welcome though, and if we agree that this may be a viable route to go down then I'd be happy to further pursue it. Patrick --slnPJVnzEYw1+a8Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF9hrgiFbCdvenl/rVbJhu7ckPpQFAmDxBBcACgkQVbJhu7ck PpR0LhAAq3oFKA3/T0iUI1AN4zQiJmDWtETrfiA010HBkb04bUewx0R/iT70LfA4 9Gjjcktd6BZ/QHV8wxw4nRbzNil/CLo21XE2djH62BBUHaaT6VWBpw2DbAlI7QRT QfcC1uMjDx+FV7jtNzOgmjX4ejlF4rOZXCQYRP6qj0eRrG6eXPJLoM4XqiZ77fmu hN7ty7PcpDTCraUgKJ64WpEY5iKWu0R7Eos5//qz2nrrd/kLfx3sCtoOQJ3s6Wmt al5wu+q+1L4qkV3Zud3RS0KyLPYoB3r1J7gpIfNhOttxaICI7kTI6gVlAB2cqRNc I3XpIGcBYHGFpfEFTOI573wtfoN7qRL+A+zIX7bmW3OCaUREF/LhZ/7l411S+fNy 3VhEGtHrtZvqP8HX+i6J+r8zsa3Dirl1oyUy5oeoe+CIGZ7wC5ARTWGG8btcy5JM vCal2Frm/6TAuio9d7rwYbqW17kRz8Z2ZrhstqyG96Qg6VpPxqZuOWfNXz25pjkH VOyTS1zu1GRb8R7aPO5GyWGzYxpClGeBlH7YbiAawuz4Y5Zf6QqjYdxPX4PNlhmz oPsJbaGhhkouKkxtvtnB6kuIFZQPcCdDV/8bclSpNCAmk9B7NtJndEa/ZbmXKivz PnDWmQ4Ue7lPewQ/GFticSJ4OA5T4u/prfC6NDLfzOBEOj0aj/c= =OS/9 -----END PGP SIGNATURE----- --slnPJVnzEYw1+a8Q--