<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/efi_loader, branch v2021.07-rc4</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-rc4</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader?h=v2021.07-rc4'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2021-05-28T14:17:01Z</updated>
<entry>
<title>efi_loader: add PE/COFF image measurement</title>
<updated>2021-05-28T14:17:01Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2021-05-26T03:09:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=163a0d7e2cbdbdf26d90ac8d30c0495b814f3245'/>
<id>urn:sha1:163a0d7e2cbdbdf26d90ac8d30c0495b814f3245</id>
<content type='text'>
"TCG PC Client Platform Firmware Profile Specification"
requires to measure every attempt to load and execute
a OS Loader(a UEFI application) into PCR[4].
This commit adds the PE/COFF image measurement, extends PCR,
and appends measurement into Event Log.

Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Tested-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Replace CONFIG_HASH_CALCULATE by CONFIG_HASH
Fix conversions between pointers and u64.
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: Work-around build issue due to missing hash_calculate()</title>
<updated>2021-05-28T14:17:01Z</updated>
<author>
<name>Alexandru Gagniuc</name>
<email>mr.nuke.me@gmail.com</email>
</author>
<published>2021-05-24T19:28:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=464010b0be09505aaf50ec208f996a6cf478a2dc'/>
<id>urn:sha1:464010b0be09505aaf50ec208f996a6cf478a2dc</id>
<content type='text'>
The hash_calculate() symbol is provided by hash-checksum.c. It depends
on hash_progressive_lookup_algo(), provided when CONFIG_HASH=y.

The issue is that hash_calculate() is used by the efi_loader,
irregardless of CONFIG_FIT_SIGNATURE. As pointed out in
commit 87316da05f2f ("lib: introduce HASH_CALCULATE option"),
enabling hash_calculate() based on CONFIG_FIT_SIGNATURE is incorrect.

To resolve this, use CONFIG_HASH as the compile switch for
hash-checksum.c. This ensures that all dependencies are compiled, and
is the most natural Kconfig to use.

There is the issue of having to 'select HASH' in a couple of places
that already 'select SHA256'. This is a deeper problem with how hashes
are organized, and fixing it is beyonf the scope of this change.

Signed-off-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
Acked-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "lib: introduce HASH_CALCULATE option"</title>
<updated>2021-05-28T14:17:01Z</updated>
<author>
<name>Alexandru Gagniuc</name>
<email>mr.nuke.me@gmail.com</email>
</author>
<published>2021-05-24T19:28:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ec0512b173bfe45bc6dc03dfcff40fec419239bb'/>
<id>urn:sha1:ec0512b173bfe45bc6dc03dfcff40fec419239bb</id>
<content type='text'>
When we think of Kconfig, we usually think of features that we like
to enable or not. Ideally, we wouldn't use Kconfig to fix a build
issue, although sometimes it might make sense. With Kconfig it's hard
to guarantee that the fix is universal. We can only say that it works
for the set of tested configurations. In the majority of cases, it's
preferable to let the linker figure things out for us.

The reverted commit attempted to fix a build issue by adding an
invisible Kconfig option. This is wrong in several ways:

It invents a new Kconfig variable when CONFIG_HASH already
exists for the same purpose.
Second, hash-checksum.c makes use of the hash_progressive_lookup_algo()
symbol, which is only provided with CONFIG_HASH, but this dependency
was not expressed in the reverted patch.

It feels like Kconfig is turning into a listing of all available
source files, and a buffet to 'select' which ones to compile. The
purpose of this revert is to enable the next change to make use of
CONFIG_HASH instead of adding to Kconfig.

This reverts commit 87316da05f2fd49d3709275e64ef0c5980366ade.

Signed-off-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
Acked-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: Fix coverity warnings for efi tcg2 protocol</title>
<updated>2021-05-28T14:17:01Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2021-05-26T18:01:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=38de680e582b36d4605b05d3b2c67a3c0c458bfb'/>
<id>urn:sha1:38de680e582b36d4605b05d3b2c67a3c0c458bfb</id>
<content type='text'>
Coverity reported 3 warnings on the current code.
CID 331856, 331855, 331854 on the latest scan.

Fix the rest of the warnings by initializing the variables before
passing them to tpm2_get_pcr_info().
In order to avoid future warnings and errors initialize them to 0 within
the function as well, since the values are always OR'ed after querying the
hardware.

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: Fix -Wextra warning for EFI TCG2</title>
<updated>2021-05-25T12:33:22Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2021-05-25T11:35:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1f6871df40d6ad94a00a2dcd46f3cc91b232c4d6'/>
<id>urn:sha1:1f6871df40d6ad94a00a2dcd46f3cc91b232c4d6</id>
<content type='text'>
Compiling with -Wextra produces a number of (harmless) warnings for the EFI
TCG2 protocol.  Let's fix those in case we ever enable the flag on the EFI
subsystem

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: path length in efi_dp_from_name()</title>
<updated>2021-05-25T11:06:57Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-05-25T10:07:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a6b33bef246460215ce1d45e77f98c5aa57f6d0'/>
<id>urn:sha1:9a6b33bef246460215ce1d45e77f98c5aa57f6d0</id>
<content type='text'>
Before this patch efi_dp_from_name() only accommodated a maximum file path
length of 31 characters. This leads to boot failures due to file name
truncation.

Allow arbitrary path lengths.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled</title>
<updated>2021-05-25T11:06:57Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2021-05-14T00:53:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f6081a8a1e45e4864e36d83ccc236eef62478b1f'/>
<id>urn:sha1:f6081a8a1e45e4864e36d83ccc236eef62478b1f</id>
<content type='text'>
This is preparation for PE/COFF measurement support.
PE/COFF image hash calculation is same in both
UEFI Secure Boot image verification and measurement in
measured boot. PE/COFF image parsing functions are
gathered into efi_image_loader.c, and exposed even if
UEFI Secure Boot is not enabled.

This commit also adds the EFI_SIGNATURE_SUPPORT option
to decide if efi_signature.c shall be compiled.

Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: remove weak efi_get_public_key_data()</title>
<updated>2021-05-25T11:06:57Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-05-20T02:08:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6754e24b54da3229c37ae50526df0e79ba6e67fa'/>
<id>urn:sha1:6754e24b54da3229c37ae50526df0e79ba6e67fa</id>
<content type='text'>
Configuring a system with CONFIG_EFI_CAPSULE_AUTHENTICATE=y but without a
method to retrieve the public key data is a misconfiguration. We should get
a build failure for it. Therefore remove the weak efi_get_public_key_data()
implementation.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<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>
</feed>
