Attention is currently required from: Jonathon Hall, Martin L Roth, Nico Huber, Paul Menzel.
Nigel Tao has posted comments on this change by Jonathon Hall. ( https://review.coreboot.org/c/coreboot/+/83476?usp=email )
Change subject: bootsplash: Increase heap from 1 MB to 4 MB when bootsplash is enabled ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2: Is 4 MB so large to be problematic? I'm familiar with Wuffs but not so familiar with coreboot.
Wuffs is a memory-safe language (but can interface with C code) and part of how it is immune to memory bug classes like use-after-free, double-free or assuming-malloc-cannot-fail is that Wuffs code is incapable of calling malloc and free, or similar. The C code (that calls into Wuffs) is responsible for allocating memory (whether via malloc or otherwise).
Wuffs' JPEG implementation is currently pretty conservative, in that it overestimates how much memory it needs. The API is simpler if Wuffs tells C *once* it needs one big, worst-case allocation instead telling it *many times* it needs many small allocations (of various sizes).
But if overestimating memory requirements (by a few MB) is problematic for coreboot, I can do some thinking about a leaner (but more complicated) API.