<feed xmlns='http://www.w3.org/2005/Atom'>
<title>efi-boot-shim.git/loader-proto.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-03-14T15:05:05+00:00</updated>
<entry>
<title>shim_load_image(): initialize the buffer fully</title>
<updated>2025-03-14T15:05:05+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-03-12T20:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=db0432183680121df2fcaba2b697025fef9db6ac'/>
<id>urn:sha1:db0432183680121df2fcaba2b697025fef9db6ac</id>
<content type='text'>
scan-build notes that we assign bprop.hnd, an EFI_HANDLE for the device
path protocol, to our loaded_image-&gt;li.DeviceHandle, and it thinks since
bprop is uninitialized that means it can be NULL or garbage.

I don't think that's actually true, because every path to that requires
either returning an error or doing some variety of:

  status = BS-&gt;LocateDevicePath(&amp;gEfiDevicePathProtocolGuid, &amp;bp, &amp;hnd)

and checking its error, but only one of those paths explicitly sets a
value, and static checkers can't tell what BS-&gt;LocateDevicePath does
with the pointer.

This patch avoids the issue by initializing the whole bprop structure to
begin with.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>loader-proto: Respect optional DevicePath parameter to load_image()</title>
<updated>2025-02-11T15:43:37+00:00</updated>
<author>
<name>Mate Kukri</name>
<email>mate.kukri@canonical.com</email>
</author>
<published>2024-05-24T10:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=c57af36e673b34a9b24309f76f105371316c45be'/>
<id>urn:sha1:c57af36e673b34a9b24309f76f105371316c45be</id>
<content type='text'>
load_image() takes an optional parameter, DevicePath, in addition to the
SourceBuffer.  Currently in shim_load_image() we don't check to see if
it's provided in the case where there's no SourceBuffer, even though it
can't work without it.

This adds that test and errors in that case, as well as avoiding
duplicating it when it's not present.

Signed-off-by: Mate Kukri &lt;mate.kukri@canonical.com&gt;
</content>
</entry>
<entry>
<title>loader-proto: Mark load_image()'s handle_image() call as "in_protocol"</title>
<updated>2025-02-11T15:43:37+00:00</updated>
<author>
<name>Mate Kukri</name>
<email>mate.kukri@canonical.com</email>
</author>
<published>2024-05-24T09:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=5d172787d5fa7faafcaf5fe62ad36819bb51ba54'/>
<id>urn:sha1:5d172787d5fa7faafcaf5fe62ad36819bb51ba54</id>
<content type='text'>
When verifying an image, if we're "in" a shim protocol call, we require
the binary have an SBAT section.  If it's not present we raise an
EFI_SECURITY_VIOLATION error code.  Currently loader protocol's
load_image() is not marked as in protocol, so it instead will return
EFI_SUCCESS when verifying the SBAT section.

This patch changes that to be in protocol, so that SBAT will be required
on any images loaded with shim's loader protocol.  This will bring SBAT
enforcement in-line with the shim_lock protocol.

Signed-off-by: Mate Kukri &lt;mate.kukri@canonical.com&gt;
</content>
</entry>
<entry>
<title>loader-proto: Add support for loading files from disk to LoadImage()</title>
<updated>2025-02-11T15:43:37+00:00</updated>
<author>
<name>Mate Kukri</name>
<email>mate.kukri@canonical.com</email>
</author>
<published>2024-04-18T09:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=2bff46034aeefe4b266b6d6dd7d6cd771c1bf4de'/>
<id>urn:sha1:2bff46034aeefe4b266b6d6dd7d6cd771c1bf4de</id>
<content type='text'>
Currently the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and EFI_LOAD_FILE2_PROTOCOL
are supported.

Signed-off-by: Mate Kukri &lt;mate.kukri@canonical.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>
<entry>
<title>Move some stuff around</title>
<updated>2025-02-11T15:43:37+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2023-06-30T17:24:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=e7b3598311c4b002417ac6364093cfab218ced88'/>
<id>urn:sha1:e7b3598311c4b002417ac6364093cfab218ced88</id>
<content type='text'>
This moves some things around to help with loader protocol changes:

- Move replacements.c to loader-proto.c
- likewise with replacements.h
- move the SHIM_IMAGE_LOADER decl to loader-proto.h
- move the LoadImage / StartImage interface setup to an init function
- move shim_load_image() / shim_start_image() to loader-proto.c

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