<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/efi_loader, branch v2021.07-rc3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader?h=v2021.07-rc3</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader?h=v2021.07-rc3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2021-05-18T10:36:13Z</updated>
<entry>
<title>lib: introduce HASH_CALCULATE option</title>
<updated>2021-05-18T10:36:13Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2021-05-13T14:48:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=87316da05f2fd49d3709275e64ef0c5980366ade'/>
<id>urn:sha1:87316da05f2fd49d3709275e64ef0c5980366ade</id>
<content type='text'>
Build error occurs when CONFIG_EFI_SECURE_BOOT or
CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled,
because hash-checksum.c is not compiled.

Since hash_calculate() implemented in hash-checksum.c can be
commonly used aside from FIT image signature verification,
this commit itroduces HASH_CALCULATE option to decide
if hash-checksum.c shall be compiled.

Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: Fix Kconfig for EFI_TCG2 protocol</title>
<updated>2021-05-18T10:36:13Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2021-05-11T11:40:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=48ee084602f90ad37e87ee7e356bf3938b584070'/>
<id>urn:sha1:48ee084602f90ad37e87ee7e356bf3938b584070</id>
<content type='text'>
EFI_TCG2 depends not only on TPMv2 but also on the underlying algorithms.
So select the missing SHA1, SHA256, SHA384 and SHA512 we currently support

Reported-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;

Add 'default y'.
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: Don't stop EFI subsystem init if installing TCG2 fails</title>
<updated>2021-05-18T10:36:13Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2021-05-11T21:03:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2052759a5e331376c037760a84d36280be0ef3e9'/>
<id>urn:sha1:2052759a5e331376c037760a84d36280be0ef3e9</id>
<content type='text'>
Up to now we are stopping the EFI subsystem if a TPMv2 exists but the
protocol fails to install.  Now that we've switched the config to 'default
y' the sandbox TPM fails, since it doesn't support all the required
capabilities of the protocol.

Not installing the protocol is not catastrophic.  If the protocol fails
to install the PCRs will never be extended to the expected values, so
some other entity later in the boot flow will eventually figure it out
and take the necessary actions.

While at it fix a corner case were the user can see an invalid error
message when the protocol failed to install.  We do have a tcg2_uninit()
which we call when the protocol installation fails.  There are cases though
that this might be called before the configuration table is installed (e.g
probing the TPM for capabilities failed).  In that case the user will see
"Failed to delete final events config table".  So stop printing it since it's
not an actual failure , simply because the config table was never installed
in the first place.

In order to stop printing it make efi_init_event_log() and create_final_event()
cleanup themselves and only call tcg2_uninit() when the protocol installation
fails.

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: Uninstall the TCG2 protocol if logging s-crtm fails</title>
<updated>2021-05-18T10:36:13Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2021-05-10T18:19:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=97f446a8ff7ccefc1eb27c48c2e64d36dc8bd8e6'/>
<id>urn:sha1:97f446a8ff7ccefc1eb27c48c2e64d36dc8bd8e6</id>
<content type='text'>
Instead of just failing, clean up the installed config table and
EventLog memory if logging an s-crtm event fails during the protocol
installation

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;

Eliminate label 'out:' by using return.
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: Clean up tcg2 once in case of failure</title>
<updated>2021-05-18T10:36:12Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2021-05-10T18:15:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b76edf6b0753ada33d1ae486c621f5284d034055'/>
<id>urn:sha1:b76edf6b0753ada33d1ae486c621f5284d034055</id>
<content type='text'>
efi_init_event_log() calls tcg2_uninit() in case of failure.
We can skip that since the function is called on efi_tcg2_register()
which also cleans up if an error occurs

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: loosen buffer parameter check in efi_file_read_int</title>
<updated>2021-05-18T10:36:12Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2021-04-28T13:54:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bc3f46518176e541c767b099fb06ad1870d59fa5'/>
<id>urn:sha1:bc3f46518176e541c767b099fb06ad1870d59fa5</id>
<content type='text'>
This is same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1733817,
but that fix was wrongly partial reverted.

When reading a directory, EFI_BUFFER_TOO_SMALL should be returned when
the supplied buffer is too small, so a use-case is to call
EFI_FILE_PROTOCOL.Read() with *buffer_size=0 and buffer=NULL to
obtain the needed size before doing the actual read.

So remove the check only for directory reading, file reading already
do the check by itself.

Fixes: db12f518edb0("efi_loader: implement non-blocking file services")
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefan Sørensen &lt;stefan.sorensen@spectralink.com&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: capsule: Remove the check for capsule_authentication_enabled environment variable</title>
<updated>2021-05-18T10:36:12Z</updated>
<author>
<name>Sughosh Ganu</name>
<email>sughosh.ganu@linaro.org</email>
</author>
<published>2021-04-12T15:05:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6a2e26b95f046a2973a95119910cbe2554c92b46'/>
<id>urn:sha1:6a2e26b95f046a2973a95119910cbe2554c92b46</id>
<content type='text'>
The current capsule authentication code checks if the environment
variable capsule_authentication_enabled is set, for authenticating the
capsule. This is in addition to the check for the config symbol
CONFIG_EFI_CAPSULE_AUTHENTICATE. Remove the check for the environment
variable. The capsule will now be authenticated if the config symbol
is set.

Signed-off-by: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
Reviwed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: build warning in efi_tcg2_hash_log_extend_event</title>
<updated>2021-05-18T10:36:12Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-05-12T15:37:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=700f68c35484c9de1c2e5e30dfc4c7a63b991a92'/>
<id>urn:sha1:700f68c35484c9de1c2e5e30dfc4c7a63b991a92</id>
<content type='text'>
Building 32bit boards with the TCG2 protocol enabled leads to a build
warning due to a missing conversion.

    lib/efi_loader/efi_tcg2.c:774:27:
    error: cast to pointer from integer of different size
    [-Werror=int-to-pointer-cast]
    774 |  ret = tcg2_create_digest((u8 *)data_to_hash, data_to_hash_len,
        |                           ^

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: capsule: return a correct error code at find_boot_device()</title>
<updated>2021-04-24T04:53:40Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2021-04-20T01:03:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c1a6840495eb1ab90c8d5cf7e057f793d84dc16'/>
<id>urn:sha1:2c1a6840495eb1ab90c8d5cf7e057f793d84dc16</id>
<content type='text'>
In case of failure at efi_get_variable_int("BootOrder"), we should
skip examining boot option variables and return an appropriate error
code which is the one the function returned.

Fixes: CID 331153 Code maintainability issues  (UNUSED_VALUE)
Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi: Fix ESRT refresh after Capsule update</title>
<updated>2021-04-24T04:53:40Z</updated>
<author>
<name>Jose Marinho</name>
<email>jose.marinho@arm.com</email>
</author>
<published>2021-04-19T13:54:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3627cf4bff9b29cf9e41ad88b56f469a3675aba2'/>
<id>urn:sha1:3627cf4bff9b29cf9e41ad88b56f469a3675aba2</id>
<content type='text'>
Indicated by Coverity Scan CID 331147

The ESRT was being refreshed in situations where the UpdateCapsule
procedure failed. In that scenario:

1) the ESRT refresh was superfluous.
2) a failed ESRT refresh return code overwrites the UpdateCapsule error
return code.

This commit ensures that the ESRT is only refreshed when the
UpdateCapsule performs successfully.

CC: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
CC: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
CC: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
CC: Tom Rini &lt;trini@konsulko.com&gt;
CC: Andre Przywara &lt;andre.przywara@arm.com&gt;
CC: nd@arm.com

Signed-off-by: Jose Marinho &lt;jose.marinho@arm.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
</feed>
