rhboot / rhboot/shim

Shim always uses 512 byte block size to fetch grub EFI binary

Open
#618 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.1k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

Shim uses a hard-coded 512 byte block size for the TFTP (netboot) request to download the grub EFI file:

https://github.com/rhboot/shim/blob/main/netboot.c#L325

This results in very poor performance transferring the file, especially over high-latency network connections (and compared to iPXE). It would be better to use the block size that was negotiated and used to transfer the shim EFI binary itself, which is often bigger (e.g. 1482 on a typical Ethernet segment).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in netboot.c around line 325 and inspect how the block size is negotiated and retained while downloading the shim EFI binary. Trace the subsequent GRUB EFI TFTP request, then make it use the negotiated block size rather than a hard-coded 512 bytes. Done means the GRUB request uses that negotiated value, especially for high-latency transfers.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.