linuxboot / heads

A minimal Linux that runs as a coreboot or LinuxBoot ROM payload to provide a secure, flexible boot environment for laptops, workstations and servers.
https://osresearch.net/
GNU General Public License v2.0
1.41k stars 185 forks source link

coreboot patches: replaced lib/jpeg patches for heap increase and alloc failure with upstreamed merged ones #1795

Open tlaurion opened 2 weeks ago

tlaurion commented 2 weeks ago

Upstream merged lib/jpeg chosen fixes, more elegant then increasing the HEAP_SIZE:

This replaces pending patches (Dasharo fork not needing HEAP_SIZE changes in configs in master since based on coreboot prior of https://review.coreboot.org/c/coreboot/+/78271 which introduced wuff for jpeg parser)


Repro:

rm patches/coreboot-24.02.01/0001* patches/coreboot-24.02.01/0002*
git fetch https://review.coreboot.org/coreboot refs/changes/94/83894/2 && git format-patch -1 --stdout FETCH_HEAD > patches/coreboot-24.02.01/0001-vc_wuffs-upgrade-to-Wuffs_0.4.0-alpha.8.patch
git fetch https://review.coreboot.org/coreboot refs/changes/95/83895/3 && git format-patch -1 --stdout FETCH_HEAD > patches/coreboot-24.02.01/0002-lib_jpeg-avoidcalling-malloc-and-free.patch
sed -i 's/CONFIG_HEAP_SIZE=0x400000/CONFIG_HEAP_SIZE=0x100000/g' config/coreboot-*

@JonathonHall-Purism (Purism fork needs the change too)

Tested working under qemu.