<feed xmlns='http://www.w3.org/2005/Atom'>
<title>efi-boot-shim.git/shim.c, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/efi-boot-shim.git)
</subtitle>
<id>https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/'/>
<updated>2025-02-26T14:39:46+00:00</updated>
<entry>
<title>Disable log saving for now.</title>
<updated>2025-02-26T14:39:46+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-26T00:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=81d40e3ee3fb45ee73a28a912be503b588c4e14a'/>
<id>urn:sha1:81d40e3ee3fb45ee73a28a912be503b588c4e14a</id>
<content type='text'>
Depending on ~something~ to do with the firmware that's currently really
unclear (to me anyway), on some firmwares making the mok variable config
table over a certain size - somewhere around 0x70000 or so bytes -
causes kernel to fail to map it correctly:

  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 0 at mm/early_ioremap.c:139 __early_ioremap+0xef/0x220
  Modules linked in:
  CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.12.15-200.fc41.x86_64 #1
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20250221-6.copr8698600 02/21/2025
  RIP: 0010:__early_ioremap+0xef/0x220
  Code: e5 00 f0 ff ff 48 81 e5 00 f0 ff ff 4c 89 6c 24 08 41 81 e4 ff 0f 00 00 4c 29 ed 48 89 e8 48 c1 e8 0c 41 89 c7 83 f8 40 76 04 &lt;0f&gt; 0b eb 82 45 6b ee c0 41 81 c5 ff 05 00 00 45 85 ff 74 36 83 3d
  RSP: 0000:ffffffff96803dd8 EFLAGS: 00010002 ORIG_RAX: 0000000000000000
  RAX: 0000000000000041 RBX: 0000000000000001 RCX: ffffffff97768250
  RDX: 8000000000000163 RSI: 0000000000000001 RDI: 000000007c4c3000
  RBP: 0000000000041000 R08: ffffffffff201630 R09: 0000000000000030
  R10: 000000007c4c3000 R11: ffffffff96803e20 R12: 0000000000000000
  R13: 000000007c4c3000 R14: 0000000000000001 R15: 0000000000000041
  FS:  0000000000000000(0000) GS:ffffffff97291000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: ffff9f1d8000040e CR3: 00000000653a4000 CR4: 00000000000000f0
  Call Trace:
   &lt;TASK&gt;
   ? __early_ioremap+0xef/0x220
   ? __warn.cold+0x93/0xfa
   ? __early_ioremap+0xef/0x220
   ? report_bug+0xff/0x140
   ? early_fixup_exception+0x5d/0xb0
   ? early_idt_handler_common+0x2f/0x3a
   ? __early_ioremap+0xef/0x220
   ? efi_mokvar_table_init+0xce/0x1d0
   ? setup_arch+0x864/0xc10
   ? start_kernel+0x6b/0xa10
   ? x86_64_start_reservations+0x24/0x30
   ? x86_64_start_kernel+0xed/0xf0
   ? common_startup_64+0x13e/0x141
   &lt;/TASK&gt;
  ---[ end trace 0000000000000000 ]---
  mokvar: Failed to map EFI MOKvar config table pa=0x7c4c3000, size=265187.

Unfortunately this makes the *entire* mok variable store unmappable, and
we get nothing in /sys/firmware/efi/mok-variables/ at all.

For now, I've disabled saving the logs even though it's really
convenient to have, until we can collaborate on a better approach that
avoids this pitfall.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Add shim's current NX_COMPAT status to HSIStatus</title>
<updated>2025-02-26T00:40:54+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-21T00:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=89e615081af5fbafefeae5b09def3a003e467838'/>
<id>urn:sha1:89e615081af5fbafefeae5b09def3a003e467838</id>
<content type='text'>
hughsie asked me to also make it observable at runtime whether the shim
binary that was used to boot was set as NX_COMPAT or not.

This adds that into the HSIStatus data as "shim-has-nx-compat-set".

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>pe: read_header(): allow skipping SecDir content validation</title>
<updated>2025-02-26T00:40:54+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-25T16:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=3bce11831343ba6e67740f23ab3a6c6f09bc0bca'/>
<id>urn:sha1:3bce11831343ba6e67740f23ab3a6c6f09bc0bca</id>
<content type='text'>
When we're parsing the PE header of shim itself from the Loaded Image
object, the signatures aren't present, but the Certificate Table entry
in the Data Directory has not been cleared, so it'll fail verification.

We know when we're doing that, so this patch makes that test optional.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>shim: add HSIStatus feature</title>
<updated>2025-02-24T20:24:24+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2024-05-15T20:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=848667d0f3a99401d93c93b3af16b55e3fb28cea'/>
<id>urn:sha1:848667d0f3a99401d93c93b3af16b55e3fb28cea</id>
<content type='text'>
hughsie asked me if I can make shim tell userland what kinds of accesses
are allowed to the heap, stack, and allocations on the running platform,
so that these could be reported up through fwupd's Host Security ID
program (see https://fwupd.github.io/libfwupdplugin/hsi.html ).

This adds a new config-only (i.e. not a UEFI variable) variable
generated during boot, "/sys/firmware/efi/mok-variables/HSIStatus",
which tells us those properties as well as if the EFI Memory Attribute
Protocol is present.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Save the debug and error logs in mok-variables</title>
<updated>2025-02-24T20:22:28+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-19T16:04:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=d972515e608e4898c4a34a5895648135d4ac5aec'/>
<id>urn:sha1:d972515e608e4898c4a34a5895648135d4ac5aec</id>
<content type='text'>
This changes our debug and error logging to save the entire logs into
mok-variables as "shim-dbg.txt" and "shim-log.txt".

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>netboot can try to load shim_certificate_[0..9].efi</title>
<updated>2025-02-18T15:21:19+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2024-08-16T23:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=6b8e40cf65c479ed8a2a2a4793b8201440f8a44f'/>
<id>urn:sha1:6b8e40cf65c479ed8a2a2a4793b8201440f8a44f</id>
<content type='text'>
Since we can't read the directory, we can try to load
shim_certificate_[0..9].efi explicitly and give up after
the first one that fails to load.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>Allow indepdent SkuSi and SBAT revocation updates</title>
<updated>2025-02-18T15:21:19+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2024-08-16T22:06:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=c66ce2a7e4f9c76057ceff8a3168582ebc1d4c4e'/>
<id>urn:sha1:c66ce2a7e4f9c76057ceff8a3168582ebc1d4c4e</id>
<content type='text'>
While a revocations.efi binary can contain either SBAT revocations,
SkuSi revocations, or both, it is desirable to package them separately
so that higher level tools such as fwupd can decide which ones to put
in place at a given moment. This changes revocations.efi to
revocations_sbat.efi and revocations_sku.efi

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>netboot: process revocations.efi as revocations not shim_certificate</title>
<updated>2025-02-18T15:21:19+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2024-08-16T22:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=3c3295dd581d000c4f1382811b318bda50218fcc'/>
<id>urn:sha1:3c3295dd581d000c4f1382811b318bda50218fcc</id>
<content type='text'>
Bugfix: In the netboot case revocations.efi files were read, but
processed as shim_certificate.efi files which is simply wrong.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>Suppress file open failures for some netboot cases</title>
<updated>2025-02-18T15:21:19+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2024-07-13T00:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=2b49dc13aed3723c7c841c2788217ff7b0e821df'/>
<id>urn:sha1:2b49dc13aed3723c7c841c2788217ff7b0e821df</id>
<content type='text'>
Reading files during a netboot comes with the caveat that
fetching files from a network does not support anything
like listing a directory. In the past this has meant that
we do not try to open optional files during a netboot.
However at least the revocation.efi file is now tested
during a netboot, which will print an error when it is not
found. Since that error is spurious we should allow for
those errors to be suppressed.

This is also desirable since we will likely go looking for
additional files in the near future.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>Implement the rest of the loader protocol functions</title>
<updated>2025-02-11T15:43:37+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2023-06-30T18:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=0322e10ecc0eb6a4acbea3f83f71b19a559aaec6'/>
<id>urn:sha1:0322e10ecc0eb6a4acbea3f83f71b19a559aaec6</id>
<content type='text'>
This adds an implementation of Exit() and UnloadImage(), removes the
whole "loader_is_participating" mechanism and its supporting code, and
removes DISABLE_EBS_PROTECTION.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
</feed>
