Skip to content

A few bug fixes - #74

Merged
d-tatianin merged 11 commits into
masterfrom
fix-ebs-retry-and-tcr
Nov 16, 2026
Merged

d-tatianin merged 11 commits into
masterfrom
fix-ebs-retry-and-tcr

Conversation

@d-tatianin

Copy link
Copy Markdown
Member

No description provided.

The UEFI firmware allows drivers to register an event listener for
ExitBootServices() events via EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES.

For example, EDK2 after 12c5ded ("FatPkg: Clean any volume caches during
exit boot services") registers such a handler and flushes dirty FAT
blocks back to disk, which causes a few allocations and frees to take
place, thus invalidating the memory map key we're holding.

This means we must retry ExitBootServices() in a loop, 2 should be
enough for EDK2 specifically, but let's give some leeway for other
implementations as well.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
When an overlap resolves into a single range (e.g. a protocol allocation
exactly covering an EfiLoaderData range), mm_overlap_fixup() returned
count - 1 and mm_do_fixup() skipped the stale RHS slot. However, nothing
is ever removed from the buffer there, the RHS slot stays in place and
compaction happens separately as the loop goes. Shrinking the read bound
on top of that meant the last entry of the map was never looked at, so
every such collapse silently dropped one range from the end of the map.

Track the collapsed RHS explicitly and only grow the count when an extra
range is actually inserted. While at it, always initialize the fixup
result, lhs_type_changed was previously left uninitialized unless the
type actually changed.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Some PXE firmware gets confused by an extensionless boot file name, so
produce the PXE image as hyper.pxe instead of hyper_pxe, publish it
under that name in releases and serve it as such in the PXE tests.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
qemu-system-aarch64 is only a virtual package on Debian and Ubuntu, and
newer Ubuntu releases have two packages providing it (qemu-system-arm
and qemu-system-arm-hwe), so apt refuses to pick one and fails with "no
installation candidate". Install qemu-system-arm directly instead, it
has shipped qemu-system-aarch64 all along.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Every push to a branch with an open pull request triggered the workflow
twice, once for the push event and once for the pull_request event,
with identical results. All that is needed is to verify that master
builds and that every pull request builds, so restrict the push trigger
to master and let branches be checked through their pull request alone.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Update build_utils, which brings dnf support along with retrying source
downloads across mirrors, rebuilding a toolchain whose version changed,
GCC 16.2.0 and binutils 2.47. Add the dnf package lists for the base
and test dependencies.

While at it, update image_utils so that the tests find the UEFI
firmware through Fedora's edk2 firmware descriptors too.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Build the toolchain for the selected arch and platform and exit without
touching the Hyper build directory. CI wants to cache the toolchain as
its own step, separate from the loader build that follows it.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
actions/cache saves in a post step that only runs when the whole job
succeeds, so a rebuilt toolchain was thrown away whenever a change
broke the build or the tests, and the next run built GCC from scratch
again. On top of that, the cache key hardcoded GCC 13.2.0 while
build_utils has long been building a different version, so bumping it
never invalidated the cache.

Derive the key from the versions build_utils actually builds and split
the step into an explicit restore, a toolchain-only build, a save that
runs as soon as the toolchain step succeeds (skipped on a cache hit),
and only then the loader build and the tests.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
The fixed /usr/bin/python3 path selects Apple's Python on macOS rather
than the interpreter first on PATH, which is the one the rest of the
tooling (e.g. python3 -m pytest in CI) uses. Honor PATH consistently,
like the installer scripts already do.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
brew install gdisk resolves to the gdisk cask, which Homebrew disabled
on 2026-09-01 for failing the macOS Gatekeeper check, so installing the
test dependencies now fails. The gptfdisk formula, which is already in
the list, provides both gdisk and sgdisk, so just drop the cask.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
@d-tatianin
d-tatianin merged commit fb9bbeb into master Nov 16, 2026
9 checks passed
@d-tatianin
d-tatianin deleted the fix-ebs-retry-and-tcr branch November 16, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant