Re: [PATCH] efi_loader: fix possible buffer overflow

2021-04-13 Thread Ilias Apalodimas
8 *input, > u32 length, > sha1_context ctx; > sha256_context ctx_256; > sha512_context ctx_512; > - u8 final[TPM2_ALG_SHA512]; > + u8 final[TPM2_SHA512_DIGEST_SIZE]; > efi_status_t ret; > u32 active; > int i; > -- > 2.17.1 > Thanks! Reviewed-by: Ilias Apalodimas

Re: [PATCH 2/2] efi_loader: add PE/COFF image measurement

2021-04-16 Thread Ilias Apalodimas
Hi Heinrich, On Thu, Apr 15, 2021 at 04:08:55PM +0200, Heinrich Schuchardt wrote: > On 15.04.21 15:30, Masahisa Kojima wrote: > > "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]. > >

Re: [PATCH v4 05/11] tpm: Switch TPMv1 over to use the new API

2021-02-07 Thread Ilias Apalodimas
gt; { > const u8 command[18] = { > 0x00, 0xc1, /* TPM_TAG */ > @@ -663,16 +656,16 @@ u32 tpm_terminate_auth_session(struct udevice *dev, u32 > auth_handle) > return tpm_sendrecv_command(dev, request, NULL

Re: [PATCH v4 08/11] tpm: Add an implementation of define_space

2021-02-07 Thread Ilias Apalodimas
offset, nv_policy, nv_policy_size); > + if (ret) > + return TPM_LIB_ERROR; > + > + return tpm_sendrecv_command(dev, command_v2, NULL, NULL); > +} > + > u32 tpm2_pcr_extend(struct udevice *dev, u32 index, u32 algorithm, > const u8 *digest, u32 digest_len) > { > -- > 2.30.0.478.g8a0d178c01-goog > Acked-by: Ilias Apalodimas

Re: [PATCH 1/2] efi: Add ESRT to the EFI system table

2021-02-20 Thread Ilias Apalodimas
ery resize adds 50 > additional entries. > The ESRT is populated from information provided by FMP instances only. > > Signed-off-by: Jose Marinho > > CC: Heinrich Schuchardt > CC: Sughosh Ganu > CC: AKASHI Takahiro > CC: Ilias Apalodimas > CC: Andre Przyw

Re: [PATCH 2/2] efi_selftest: multi part device path to text

2021-02-19 Thread Ilias Apalodimas
r("Incorrect text from ConvertDevicePathToText\n"); > + return EFI_ST_FAILURE; > + } > + ret = boottime->free_pool(string); > + if (ret != EFI_SUCCESS) { > + efi_st_error("FreePool failed\n"); > + return EFI_ST_FAILURE; > + } > + > /* Test ConvertDeviceNodeToText */ > string = device_path_to_text->convert_device_node_to_text( > (struct efi_device_path *)_node, true, false); > -- > 2.30.0 > Acked-by: Ilias Apalodimas

Re: [PATCH 1/2] efi_loader: multi part device paths to text

2021-02-19 Thread Ilias Apalodimas
Hi Heinrich On Thu, Feb 18, 2021 at 06:30:43PM +0100, Heinrich Schuchardt wrote: > Our current implementation of > EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText() truncates multi > part device paths after the first part. We should convert all parts. > > Render device path instance

Re: [PATCH 1/2] efi_loader: multi part device paths to text

2021-02-19 Thread Ilias Apalodimas
On Fri, Feb 19, 2021 at 12:45:38PM +0100, Heinrich Schuchardt wrote: > On 19.02.21 11:13, Ilias Apalodimas wrote: > > Hi Heinrich > > > > On Thu, Feb 18, 2021 at 06:30:43PM +0100, Heinrich Schuchardt wrote: > >&

Re: [RFC] efi_loader: improve firmware capsule authentication

2021-04-23 Thread Ilias Apalodimas
Akashi-san [...] > 7) Pytest is broken >Due to your and Ilias' recent patches, existing pytests for >secure boot as well as capsule update are now broken. >I'm not sure why you have not yet noticed. >Presumably, Travis CI now skips those tests? I can have a look on that. Any idea

Re: [RFC] efi_loader: improve firmware capsule authentication

2021-04-23 Thread Ilias Apalodimas
On Fri, Apr 23, 2021 at 04:50:21PM +0900, AKASHI Takahiro wrote: > On Fri, Apr 23, 2021 at 10:21:52AM +0300, Ilias Apalodimas wrote: > > Akashi-san > > > > [...] > > > 7) Pytest is broken > > >Due to your and Ilias' recent patches, existing pytests for

Re: [PATCH 00/28] Initial implementation of bootmethod/bootflow

2021-08-23 Thread Ilias Apalodimas
On Thu, Aug 19, 2021 at 01:27:50PM -0400, Tom Rini wrote: > On Thu, Aug 19, 2021 at 08:25:33AM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Thu, 19 Aug 2021 at 07:59, Tom Rini wrote: > > > > > > On Wed, Aug 18, 2021 at 09:45:33PM -0600, Simon Glass wrote: > > > > > > > Bootmethod and

Re: [PATCH 00/28] Initial implementation of bootmethod/bootflow

2021-08-24 Thread Ilias Apalodimas
Hi Tom, > > > > > > > [...] > > > > > > > The series is available at u-boot-dm/bmea-working > > > > > > > > > > > > My question / concern is this. Would the next step here be to > > > > > > implement the generic UEFI boot path? Today, I can write Fedora 34 > > > > > > for > > > > > > AArch64

Re: [PATCH v2 5/6] efi_loader: writing AuditMode, DeployedMode

2021-08-27 Thread Ilias Apalodimas
On Fri, Aug 27, 2021 at 06:09:25AM +0200, Heinrich Schuchardt wrote: > On 8/27/21 5:05 AM, AKASHI Takahiro wrote: > > Heinrich, > > > > On Thu, Aug 26, 2021 at 03:48:04PM +0200, Heinrich Schuchardt wrote: > > > Writing variables AuditMode or Deployed Mode must update the secure boot > > > state.

Re: Pull request for efi-2021-10-rc2-2

2021-08-25 Thread Ilias Apalodimas
[...] > > > > > > > > > > > > > > > > > > > Look I'm sorry if this all seems a bit much. My initial request was > > > > > rebuffed, other emails have been ignored and a large number of > > > > > objections have been raised. It's just too hard. As far as I can > > > > > remember, I've not come

Re: [PATCH 00/28] Initial implementation of bootmethod/bootflow

2021-08-26 Thread Ilias Apalodimas
Hi Mark, > > > > > > > > > > > [...] > > > > > > > > > > > Well, there's "find the next stage", which is > > > > > > > > > > > boot_targets environment > > > > > > > > > > > variable, and then "where that next stage looks for > > > > > > > > > > > stuff" which is > > > > > > > > > > >

Re: sandbox TPM

2021-08-30 Thread Ilias Apalodimas
On Sun, 29 Aug 2021 at 13:53, Peter Robinson wrote: > > On Sat, Aug 28, 2021 at 10:19 PM Simon Glass wrote: > > > > Hi Heinrich, > > > > On Sat, 28 Aug 2021 at 06:18, Heinrich Schuchardt > > wrote: > > > > > > The current TPM emulation in drivers/tpm/tpm(2)_tis_sandbox.c is not > > > spec

Re: [PATCH v2 3/3] RFC: doc: Add documentation about devicetree usage

2021-08-30 Thread Ilias Apalodimas
Hi Simon, +cc a few Linaro folks who have been looking at similar problems. On Sat, 28 Aug 2021 at 19:46, Simon Glass wrote: > > At present some of the ideas and techniques behind devicetree in U-Boot > are assumed, implied or unsaid. Add some documentation to cover how > devicetree is build,

[PATCH] efi_loader: Remove incorrect calls of EFI_CALL in TCG2

2021-09-08 Thread Ilias Apalodimas
at it switch the malloc call to a calloc, remove the unnecessary cast and get rid of an unneeded if statement before copying the device path Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib

Re: [PATCH] efi_loader: boot_service_capability_min should be capitalized

2021-09-06 Thread Ilias Apalodimas
Acked-by: Ilias Apalodimas On Mon, 6 Sept 2021 at 06:02, Masahisa Kojima wrote: > > boot_service_capability_min is constant, it should be capitalized. > > Signed-off-by: Masahisa Kojima > --- > include/efi_tcg2.h| 2 +- > lib/efi_loader/efi_tcg2.c | 4 ++--

Re: [PATCH 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-09-12 Thread Ilias Apalodimas
Hi Heinrich [...] > >> -if (!u16_strcmp(name, L"PK") || !u16_strcmp(name, L"KEK")) { > >> -vendor = _global_variable_guid; > >> -} else if (!u16_strcmp(name, L"db") || !u16_strcmp(name, L"dbx")) { > >> -vendor = _guid_image_security_database; > >> -} else { >

Re: [PATCH] efi_loader: Fix spec ID event creation

2021-09-14 Thread Ilias Apalodimas
this is defined as a fixed length array > which has been fixed. > > Signed-off-by: Ruchika Gupta > CC: Masahisa Kojima > CC: Ilias Apalodimas > CC: Heinrich Schuchardt > --- > include/efi_tcg2.h| 7 +-- > lib/efi_loader/efi_tcg2.c | 40 +++

Re: Pull request for efi-2021-10-rc2-2

2021-09-06 Thread Ilias Apalodimas
Hi Simon, > > > > > > Well of course if the DT holds the key and you want to add the key > > > after the build, you have to modify the DT. You make it sounds like a > > > huge deal... > > > > Having to edit the DT and concat it is not a huge deal. Limiting the > > ability to provide

Re: Pull request for efi-2021-10-rc4

2021-09-04 Thread Ilias Apalodimas
Hi Tom, On Sat, 4 Sept 2021 at 21:08, Tom Rini wrote: > > On Sat, Sep 04, 2021 at 08:02:49PM +0200, Heinrich Schuchardt wrote: > > > > > > Am 4. September 2021 19:39:49 MESZ schrieb Tom Rini : > > >On Sat, Sep 04, 2021 at 07:03:48PM +0200, Heinrich Schuchardt wrote: > > >> > > >> > > >> Am 4.

Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env variable

2021-09-18 Thread Ilias Apalodimas
Hi Tom, On Fri, 17 Sept 2021 at 15:08, Tom Rini wrote: > > On Fri, Sep 17, 2021 at 11:49:51AM +, T Karthik Reddy wrote: > > Hi Tom, > > > > > -Original Message- > > > From: Tom Rini > > > Sent: Thursday, August 5, 2021 6:53 PM > > > To: T Karthik Reddy > > > Cc: Ashok Reddy Soma ;

Re: Please pull u-boot-dm

2021-09-18 Thread Ilias Apalodimas
the final binary nothing changes Regards Ilias On Sat, 18 Sep 2021, 15:14 Tom Rini, wrote: > On Sat, Sep 18, 2021 at 02:59:42PM +0300, Ilias Apalodimas wrote: > > > +cc a few people that had some input on that discussion. > > Apologies from top posting, but I am sending this from a

Re: Please pull u-boot-dm

2021-09-18 Thread Ilias Apalodimas
: > Hi Ilias, > > On Sat, 18 Sept 2021 at 05:59, Ilias Apalodimas > wrote: > > > > +cc a few people that had some input on that discussion. > > Apologies from top posting, but I am sending this from a mobile. > > > > I think I've spent enough time try

Re: Please pull u-boot-dm

2021-09-18 Thread Ilias Apalodimas
+cc a few people that had some input on that discussion. Apologies from top posting, but I am sending this from a mobile. I think I've spent enough time trying to explain why I think we don't need to revert this and why moving the signature to the dtb once we fix it has minimal effect on the

Re: [PATCH 1/3] efi_loader: add SMBIOS table measurement

2021-09-15 Thread Ilias Apalodimas
Hi Kojima-san, On Wed, Sep 15, 2021 at 02:15:44PM +0900, Masahisa Kojima wrote: > TCG PC Client spec requires to measure the SMBIOS > table that contain static configuration information > (e.g. Platform Manufacturer Enterprise Number assigned by IANA, > platform model number, Vendor and Device

Re: [PATCH 2/4] efi_loader: function to get GUID for variable name

2021-09-11 Thread Ilias Apalodimas
return name_type[i].guid; > + } > + return _global_variable_guid; > +} > + > /** > * efi_get_var() - read value of an EFI variable > * > -- > 2.30.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-09-11 Thread Ilias Apalodimas
On Sat, Sep 11, 2021 at 09:28:31AM +0200, Heinrich Schuchardt wrote: > Simplify efi_sigstore_parse_sigdb() by using existing functions. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_signature.c | 35 ++ > 1 file changed, 6 insertions(+), 29

Re: [PATCH 1/4] efi_loader: treat UEFI variable name as const

2021-09-11 Thread Ilias Apalodimas
Hi Heinrich, On Sat, Sep 11, 2021 at 09:28:29AM +0200, Heinrich Schuchardt wrote: > Adjust several internal functions to treat UEFI variable names as const. It's obvious what the patch does, but is there a reason ? I think that's a better fit for the commit log. Cheers /Ilias > >

Re: [PATCH 2/4] efi_loader: function to get GUID for variable name

2021-09-11 Thread Ilias Apalodimas
On Sat, 11 Sept 2021 at 17:13, Ilias Apalodimas wrote: > > On Sat, Sep 11, 2021 at 09:28:30AM +0200, Heinrich Schuchardt wrote: > > In multiple places we need the default GUID used for variables like > > 'PK', 'KEK', 'db'. Provide a function for it. > > > > Sign

Re: [PATCH 3/3] efi_loader: fix efi_tcg2_hash_log_extend_event() parameter check

2021-09-03 Thread Ilias Apalodimas
Reviewed-by: Ilias Apalodimas On Fri, 3 Sept 2021 at 04:54, Masahisa Kojima wrote: > > TCG EFI Protocol Specification defines that PCRIndex parameter > passed from caller must be 0 to 23. > TPM2_MAX_PCRS is currently used to check the range of PCRIndex, > but TPM2_MAX_PCRS

Re: [PATCH 1/3] efi_loader: add missing parameter check for EFI_TCG2_PROTOCOL api

2021-09-03 Thread Ilias Apalodimas
Reviewed-by: Ilias Apalodimas On Fri, 3 Sept 2021 at 04:54, Masahisa Kojima wrote: > > TCG EFI Protocol Specification defines the required parameter > checking and return value for each API. > This commit adds the missing parameter check and > fixes the wrong return

Re: [PATCH 3/3] efi_loader: fix efi_tcg2_hash_log_extend_event() parameter check

2021-09-03 Thread Ilias Apalodimas
Hi Heinrich, On Fri, Sep 03, 2021 at 08:22:30AM +0200, Heinrich Schuchardt wrote: > On 9/3/21 3:55 AM, Masahisa Kojima wrote: > > TCG EFI Protocol Specification defines that PCRIndex parameter > > passed from caller must be 0 to 23. > > TPM2_MAX_PCRS is currently used to check the range of

Re: [PATCH 2/3] efi_loader: fix boot_service_capability_min calculation

2021-09-03 Thread Ilias Apalodimas
Reviewed-by: Ilias Apalodimas On Fri, 3 Sept 2021 at 04:54, Masahisa Kojima wrote: > > TCG EFI Protocol Specification requires to the input > ProtocolCapability.Size < size of the EFI_TCG2_BOOT_SERVICE_CAPABILITY > up to and including the vendor ID field. > Current implementat

Re: [PATCH 1/2 v2] tpm2: Introduce TIS tpm core

2021-07-12 Thread Ilias Apalodimas
Hi Simon, > > > [...] > > > Yes, but I hope you see my point, that you have added a new interface. > > > It is definitely better than adding a new driver and duplicating all > > > the code, but it is still one more copy and in fact, the code is > > > duplicated. > > > > > > > I get the point but

Re: [PATCH 0/9] tpm: Enhance sandbox tpm2 emulation

2021-07-14 Thread Ilias Apalodimas
Hi Simon, Unfortunately i had no time to look into this. I'll have a look tomorrow Cheers /Ilias On Wed, 14 Jul 2021 at 22:51, Simon Glass wrote: > > Hi Ilias, > > On Mon, 5 Jul 2021 at 09:48, Simon Glass wrote: > > > > At present the TPM2 emulator lacks the ability to load and save the > >

Re: [PATCH 2/2] tpm2: Add a TPMv2 MMIO TIS driver

2021-07-13 Thread Ilias Apalodimas
[...] > > > Should be a uclass interface. > > > > > > > Why? A uclass is supposed to describe and abstract hardware. This is just > > a specific implementation of a TPM, not all TPMs are TIS compliant. We > > already > > have a uclass for those. > > Who told you that a uclass is supposed to

Re: [PATCH 1/5] efi_loader: increase eventlog buffer size

2021-07-15 Thread Ilias Apalodimas
On Thu, Jul 15, 2021 at 02:09:57PM +0900, Masahisa Kojima wrote: > Hi Simon, Ilias, > > On Wed, 14 Jul 2021 at 23:50, Simon Glass wrote: > > > > Hi Masahisa, > > > > On Mon, 12 Jul 2021 at 02:40, Masahisa Kojima > > wrote: > > > > > > Hi Simon, > > > > > > On Sun, 11 Jul 2021 at 09:01, Simon

Re: [PATCH 1/5] efi_loader: increase eventlog buffer size

2021-07-15 Thread Ilias Apalodimas
On Wed, Jul 14, 2021 at 08:52:07AM -0600, Simon Glass wrote: > Hi Ilias, > > On Mon, 12 Jul 2021 at 03:28, Ilias Apalodimas > wrote: > > > > On Mon, 12 Jul 2021 at 11:40, Masahisa Kojima > > wrote: > > > > > > Hi Simon, > > &g

Re: [PATCH 2/2] tpm2: Add a TPMv2 MMIO TIS driver

2021-07-13 Thread Ilias Apalodimas
On Tue, Jul 13, 2021 at 08:49:21PM -0600, Simon Glass wrote: > Hi Ilias, > > On Tue, 13 Jul 2021 at 14:11, Ilias Apalodimas > wrote: > > > > > > [...] > > > > > Should be a uclass interface. > > > > > > > >

Re: [PATCH v2 0/3] efi: Minimal revert to rodata change

2021-08-02 Thread Ilias Apalodimas
Hi Simon, On Mon, Aug 02, 2021 at 08:44:28AM -0600, Simon Glass wrote: > The changes to move from devicetree to rodata take things in the wrong > direction for various reasons: > As I said on the previous thread, I think this should remain as is for a number of reasons (and mainly because it

Re: [PATCH v2 0/3] efi: Minimal revert to rodata change\

2021-08-02 Thread Ilias Apalodimas
On Mon, Aug 02, 2021 at 01:22:18PM -0600, Simon Glass wrote: > Hi Heinrich, > > On Mon, 2 Aug 2021 at 11:35, Heinrich Schuchardt wrote: > > > > > > > > On 8/2/21 4:44 PM, Simon Glass wrote: > > > The changes to move from devicetree to rodata take things in the wrong > > > direction for various

Re: [PATCH v2 0/3] efi: Minimal revert to rodata change

2021-08-02 Thread Ilias Apalodimas
On Mon, Aug 02, 2021 at 02:02:56PM -0600, Simon Glass wrote: > Hi Ilias, > > On Mon, 2 Aug 2021 at 09:37, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Mon, Aug 02, 2021 at 08:44:28AM -0600, Simon Glass wrote: > > > The changes to move from

Re: [PATCH 03/11] efi_loader: Use directly version_string variable

2021-08-03 Thread Ilias Apalodimas
TRING into > > temporary variable. > > Looks ok Acked-by: Ilias Apalodimas > > Signed-off-by: Pali Rohár > > --- > > lib/efi_loader/efi_tcg2.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/lib/efi_loader/efi

Re: [PATCH] Revert "efi_capsule: Move signature from DTB to .rodata"

2021-08-01 Thread Ilias Apalodimas
t_public_key_data(_pkey, _len); > if (ret < 0) > goto out; > > @@ -330,7 +318,7 @@ efi_status_t efi_capsule_authenticate(const void > *capsule, efi_uintn_t capsule_s > if (!pkey) > goto out; > > - memcpy(p

Re: [PATCH 1/1] efi_loader: typo cerificate

2021-08-02 Thread Ilias Apalodimas
Hi Heinrich, Acked-by: Ilias Apalodimas On Mon, 2 Aug 2021 at 09:22, Heinrich Schuchardt wrote: > > %s/cerificate/certificate/ > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: EFI from usb HDD

2021-08-04 Thread Ilias Apalodimas
Hi Michal Apologies for my late reply, I was on vacation! [...] > >> > >> When Abort happened I connected Xilinx debugger via jtag and look at cpu > >> backtrace. > > > > OK, but we are already in grub here and such a trace (in U-Boot) > > doesn't make sense. Right? > > Correct grub already

Re: [PATCH v2 1/3] efi_loader: add SMBIOS table measurement

2021-09-23 Thread Ilias Apalodimas
Hi Simon, On Wed, 22 Sept 2021 at 19:19, Simon Glass wrote: > > Hi Masahisa, > > On Tue, 21 Sept 2021 at 01:17, Masahisa Kojima > wrote: > > > > TCG PC Client spec requires to measure the SMBIOS > > table that contain static configuration information > > (e.g. Platform Manufacturer Enterprise

Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env variable

2021-09-20 Thread Ilias Apalodimas
command just returns a CMD Success/Failure, so it's not easy to figure out if a TPM is indeed present or not without refactoring the cmdline interface. So I think this is reasonable for now Acked-by: Ilias Apalodimas > > It would be much better it the test itself was designed from the >

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-09-24 Thread Ilias Apalodimas
On Fri, Sep 24, 2021 at 04:46:58PM +0200, Heinrich Schuchardt wrote: > > > On 9/24/21 3:10 PM, Ilias Apalodimas wrote: > > At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got > > introduced, in order to support a DTB handed over by an earlier

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-09-25 Thread Ilias Apalodimas
Hi Mark, On Sat, Sep 25, 2021 at 07:01:07PM +0200, Mark Kettenis wrote: > > From: Ilias Apalodimas > > Date: Fri, 24 Sep 2021 16:12:51 +0300 > > > > Forgot to include Mark, which showed some interest for MBPs > > Well, I am currently using OF_BOARD, so this does

Re: [resent RFC 06/22] sata: call device_probe() after scanning

2021-10-07 Thread Ilias Apalodimas
[...] > > > + ret = device_probe(bdev); > > > + if (ret < 0) { > > > + debug("Can't probe\n"); > > > + /* TODO: undo create */ > > > + > > > + device_unbind(bdev); > > > + > > > + return ret; > > > + } > > > + > > > > Patches 2-6 seem to do the same

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Ilias Apalodimas
Hi Thomas, On Wed, 13 Oct 2021 at 19:26, Thomas Fitzsimmons wrote: > > Simon Glass writes: > > [...] > > >> > I think one option is better than two. I have a slight preference for > >> > OF_PRIOR_STAGE because it is board-agnostic, but I'm not sure it > >> > matters, since some of these boards

Re: [PATCH] efi_loader: Fix loaded image alignment

2021-10-11 Thread Ilias Apalodimas
Hi Heinrich, On Mon, 11 Oct 2021 at 16:45, Heinrich Schuchardt wrote: > > > > On 10/11/21 14:10, Ilias Apalodimas wrote: > > We are ignoring the alignment communicated via the PE/COFF header. > > Starting 5.10 the Linux kernel will loudly complain about it. For mor

Re: [PATCH] efi_loader: Fix loaded image alignment

2021-10-11 Thread Ilias Apalodimas
On Mon, 11 Oct 2021 at 17:07, Ard Biesheuvel wrote: > > On Mon, 11 Oct 2021 at 15:51, Ilias Apalodimas > wrote: > > > > Hi Heinrich, > > > > On Mon, 11 Oct 2021 at 16:45, Heinrich Schuchardt > > wrote: > > > > > > > > > > &

[PATCH v2] sandbox: Remove OF_HOSTFILE

2021-10-11 Thread Ilias Apalodimas
. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas --- Note that this must be applied on top of https://lore.kernel.org/u-boot/20210930071800.443059-1

Re: [RFC 07/22] block: ide: call device_probe() after scanning

2021-10-11 Thread Ilias Apalodimas
On Mon, Oct 11, 2021 at 08:54:13AM -0600, Simon Glass wrote: > Hi Takahiro, > > On Sun, 10 Oct 2021 at 19:43, AKASHI Takahiro > wrote: > > > > On Sun, Oct 10, 2021 at 08:14:13AM -0600, Simon Glass wrote: > > > On Thu, 30 Sept 2021 at 23:03, AKASHI Takahiro > > > wrote: > > > > > > > > Every

Re: [resent RFC 17/22] efi_loader: add efi_remove_handle()

2021-10-12 Thread Ilias Apalodimas
On Mon, Oct 04, 2021 at 12:44:25PM +0900, AKASHI Takahiro wrote: > This function is a counterpart of efi_add_handle() and will be used > in order to remove an efi_disk object in a later patch. > > Signed-off-by: AKASHI Takahiro > --- > include/efi_loader.h | 2 ++ >

Re: [PATCH 3/3] treewide: Remove OF_PRIOR_STAGE

2021-10-11 Thread Ilias Apalodimas
Hi Simon, On Tue, 12 Oct 2021 at 00:31, Simon Glass wrote: > > Hi Ilias, > > On Mon, 11 Oct 2021 at 15:00, Ilias Apalodimas > wrote: > > > > The previous patches removed OF_PRIOR_STAGE from the last consumers of the > > Kconfig option. Cleanup any referen

[PATCH 1/3 v4] riscv: Remove OF_PRIOR_STAGE from RISC-V boards

2021-10-11 Thread Ilias Apalodimas
a1 and copy it in their private gd_t. Apart from that they copy it to prior_stage_fdt_address, if the Kconfig option is selected, which is unnecessary. So let's switch the config option for those boards to OF_BOARD and define the required board_fdt_blob_setup() for them. Signed-off-by: Ilias

[PATCH 3/3] treewide: Remove OF_PRIOR_STAGE

2021-10-11 Thread Ilias Apalodimas
The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- dts/Kconfig | 11 ++- include/fdtdec.h

[PATCH 2/3] board: arm: Remove OF_PRIOR_STAGE from the remaining Arm boards

2021-10-11 Thread Ilias Apalodimas
U-Boot's config and DTB management, and use OF_BOARD instead. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- arch/arm/Kconfig | 1 - board/broadcom/bcmstb/bcmstb.c | 6 ++ configs/bcm7260_defconfig | 2 +- configs/bcm7445_defconfig | 2 +- 4 files

Re: [PATCH] sandbox: Remove OF_HOSTFILE

2021-10-11 Thread Ilias Apalodimas
[...] > > > > This will work: > > > > diff --git a/dts/Kconfig b/dts/Kconfig > > index dabe0080c1..6aca8a8738 100644 > > --- a/dts/Kconfig > > +++ b/dts/Kconfig > > @@ -90,6 +90,7 @@ config OF_LIVE > > choice > > prompt "Provider of DTB for DT control" > > depends on OF_CONTROL

Re: [PATCH 1/3 v3] riscv: Remove OF_PRIOR_STAGE from RISC-V boards

2021-10-11 Thread Ilias Apalodimas
Hi Simon [] > > > diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c > > b/board/AndesTech/ax25-ae350/ax25-ae350.c > > index 81b0ee992372..6de91208258f 100644 > > --- a/board/AndesTech/ax25-ae350/ax25-ae350.c > > +++ b/board/AndesTech/ax25-ae350/ax25-ae350.c > > @@ -21,7 +21,6 @@ > > > >

[PATCH v4] sandbox: Remove OF_HOSTFILE

2021-10-19 Thread Ilias Apalodimas
. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas --- Note that this must be applied on top of https://lore.kernel.org/u-boot/20211011210016.135929-1

Re: [PATCH v3] sandbox: Remove OF_HOSTFILE

2021-10-19 Thread Ilias Apalodimas
On Mon, Oct 18, 2021 at 08:29:24PM -0400, Tom Rini wrote: > On Mon, Oct 18, 2021 at 04:50:33PM -0400, Tom Rini wrote: > > On Fri, Oct 15, 2021 at 11:42:40AM +0300, Ilias Apalodimas wrote: > > > > > OF_HOSTFILE is used on sandbox configs only. Although it's pretty > &

Re: [PATCH v3] sandbox: Remove OF_HOSTFILE

2021-10-19 Thread Ilias Apalodimas
On Tue, Oct 19, 2021 at 10:56:26AM +0300, Ilias Apalodimas wrote: > On Mon, Oct 18, 2021 at 08:29:24PM -0400, Tom Rini wrote: > > On Mon, Oct 18, 2021 at 04:50:33PM -0400, Tom Rini wrote: > > > On Fri, Oct 15, 2021 at 11:42:40AM +0300, Ilias Apalodimas wrote: > > >

Re: [PATCH v4] sandbox: Remove OF_HOSTFILE

2021-10-19 Thread Ilias Apalodimas
On Tue, 19 Oct 2021 at 18:36, Tom Rini wrote: > > On Tue, Oct 19, 2021 at 06:30:59PM +0300, Ilias Apalodimas wrote: > > On Tue, 19 Oct 2021 at 17:17, Tom Rini wrote: > > > > > > On Tue, Oct 19, 2021 at 08:03:07AM -0600, Simon Glass wrote: > > > >

Re: [PATCH v4] sandbox: Remove OF_HOSTFILE

2021-10-19 Thread Ilias Apalodimas
On Tue, 19 Oct 2021 at 17:17, Tom Rini wrote: > > On Tue, Oct 19, 2021 at 08:03:07AM -0600, Simon Glass wrote: [...] > > > > For some reason this still does not apply for me on -master. Can you > > please confirm the hash you are using? > > The hunk for scripts/Makefile.spl still fails (it

Re: [PATCH 1/1] efi_loader: avoid multiple local copies of lf2_initrd_guid

2021-10-15 Thread Ilias Apalodimas
protocol, while allowing the boot to continue >*/ > - dp = efi_get_dp_from_boot(lf2_initrd_guid); > + dp = efi_get_dp_from_boot(efi_lf2_initrd_guid); > if (!dp) > return EFI_INVALID_PARAMETER; > > -- > 2.30.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/1] efi_loader: efi_dp_from_lo() unused parameter size

2021-10-15 Thread Ilias Apalodimas
loader/efi_helper.c b/lib/efi_loader/efi_helper.c > index 4c5b7cd2e1..89833de222 100644 > --- a/lib/efi_loader/efi_helper.c > +++ b/lib/efi_loader/efi_helper.c > @@ -83,7 +83,7 @@ struct efi_device_path *efi_get_dp_from_boot(const > efi_guid_t guid) > if (ret != EFI_SUCCESS) > goto out; > > - tmp = efi_dp_from_lo(, , ); > + tmp = efi_dp_from_lo(, ); > if (!tmp) > goto out; > > -- > 2.30.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/1] efi_loader: efi_dp_from_lo() should skip VenMedia node

2021-10-15 Thread Ilias Apalodimas
tmp) > - goto out; > + goto err; > > - /* efi_dp_dup will just return NULL if efi_dp_next is NULL */ > - file_path = efi_dp_dup(efi_dp_next(tmp)); > + return efi_dp_from_lo(, ); > > -out: > - efi_free_pool(tmp); > +err: > free(var_value); > - > - return file_path; > + return NULL; > } > -- > 2.30.2 > Reviewed-by: Ilias Apalodimas

[PATCH v3] sandbox: Remove OF_HOSTFILE

2021-10-15 Thread Ilias Apalodimas
, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production) Signed-off-by: Ilias Apalodimas --- Note that this must be applied on top of https://lore.kernel.org/u-boot/20211011210016.135929-1

Re: [PATCH v2] sandbox: Remove OF_HOSTFILE

2021-10-15 Thread Ilias Apalodimas
> > [...] > > This patch does not apply cleanly on top you your other series. > > Can you please resend it? Done! Cheers /Ilias > > Regards, > Simon

[PATCH] efi_loader: Fix loaded image alignment

2021-10-11 Thread Ilias Apalodimas
("efi/libstub: arm64: Double check image alignment at entry") Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_image_loader.c | 12 lib/efi_loader/efi_memory.c | 50 +++ 3 files changed, 58 insert

Re: [PATCH v4 01/11] Revert "Revert "mkeficapsule: Remove dtb related options""

2021-10-08 Thread Ilias Apalodimas
kahiro > > --- > > tools/mkeficapsule.c | 229 ++- > > 1 file changed, 7 insertions(+), 222 deletions(-) > > > > Regards, > Simon It was my patch to begin with so I am not really sure my reviewed tag has any value, but FWIW Reviewed-by: Ilias Apalodimas

Re: [PATCH v4 03/11] efi_loader: capsule: add back efi_get_public_key_data()

2021-10-08 Thread Ilias Apalodimas
key value\n"); > + *pkey = NULL; > + *pkey_len = 0; > + > + return -FDT_ERR_NOTFOUND; > + } > + > + *pkey = (void *)blob; > + *pkey_len = len; > + > + return 0; > +} > > efi_status_t efi_capsule_authenticate(const void *capsule, efi_uintn_t > capsule_size, > void **image, efi_uintn_t *image_size) > -- > 2.33.0 > Reviewed-by: Ilias Apalodimas

[PATCH] sandbox: Remove OF_HOSTFILE

2021-09-28 Thread Ilias Apalodimas
. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary, but discouraged from being used in production Signed-off-by: Ilias Apalodimas --- Makefile | 6 +++--- arch/sandbox/cpu

[PATCH] sandbox: Remove OF_HOSTFILE

2021-09-28 Thread Ilias Apalodimas
. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary, but discouraged from being used in production Signed-off-by: Ilias Apalodimas --- Makefile | 6 +++--- arch/sandbox/cpu

Re: [PATCH v2 1/3] efi_loader: add SMBIOS table measurement

2021-09-28 Thread Ilias Apalodimas
Hi Simon, [...] > > > > We've mentioned this in the past. The sandbox TPM is very limited wrt > > > > tpm testing for the EFI TCG protocol. > > > > > > So let's add some more features? If it helps, think of the sandbox TPM > > > as test code, not an emulator. It is a very simple kind of

Re: [PATCH] sandbox: Remove OF_HOSTFILE

2021-09-29 Thread Ilias Apalodimas
> > > - */ > > > -int sandbox_read_fdt_from_file(void); > > > - > > > /** > > > * sandbox_reset() - reset sandbox > > > * > > > diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig > > > index f7098b496983..358a6c168259 100644 > > > --- a/configs/sandbox64_defconfig > > >

Re: [PATCH] sandbox: Remove OF_HOSTFILE

2021-09-28 Thread Ilias Apalodimas
Hi Simon, [...] > > -INPUTS-$(CONFIG_OF_HOSTFILE) += u-boot.dtb > > +INPUTS-$(CONFIG_SANDBOX) += u-boot.dtb > > ifneq ($(CONFIG_SPL_TARGET),) > > INPUTS-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) > > endif > > @@ -1423,7 +1423,7 @@ u-boot-lzma.img: u-boot.bin.lzma FORCE > > > >

Re: [PATCH 1/3] treewide: Remove OF_PRIOR_STAGE from RISC-V boards

2021-09-29 Thread Ilias Apalodimas
Hi Zong, [...] > > diff --git a/board/sifive/unleashed/unleashed.c > > b/board/sifive/unleashed/unleashed.c > > index 8cd514df3005..7e89c3f740a7 100644 > > --- a/board/sifive/unleashed/unleashed.c > > +++ b/board/sifive/unleashed/unleashed.c > > @@ -116,12 +116,10 @@ int misc_init_r(void) > >

Re: [PATCH 1/3] treewide: Remove OF_PRIOR_STAGE from RISC-V boards

2021-09-29 Thread Ilias Apalodimas
On Wed, Sep 29, 2021 at 12:02:16PM +0300, Ilias Apalodimas wrote: > Hi Zong, > > [...] > > > > diff --git a/board/sifive/unleashed/unleashed.c > > > b/board/sifive/unleashed/unleashed.c > > > index 8cd514df3005..7e89c3f740a7 100644 > > > ---

Re: [PATCH 1/3] treewide: Remove OF_PRIOR_STAGE from RISC-V boards

2021-09-29 Thread Ilias Apalodimas
> > > > > - if (IS_ENABLED(CONFIG_OF_SEPARATE)) { > > > > > - if (gd->arch.firmware_fdt_addr) > > > > > - return (ulong *)gd->arch.firmware_fdt_addr; > > > > > - else > > > > > - return (ulong *)&_end; > > > > > -

Re: [PATCH v2] board: sifive: Fix a potential build warning in board_fdt_blob_setup()

2021-09-29 Thread Ilias Apalodimas
[...] > > > int board_init(void) > > > diff --git a/board/sifive/unmatched/unmatched.c > > > b/board/sifive/unmatched/unmatched.c > > > index d90b252bae..8773b660fa 100644 > > > --- a/board/sifive/unmatched/unmatched.c > > > +++ b/board/sifive/unmatched/unmatched.c > > > @@ -16,9 +16,9 @@ void

Re: [PATCH 1/3 v2] riscv: Remove OF_PRIOR_STAGE from RISC-V boards

2021-09-30 Thread Ilias Apalodimas
Please ignore this. I just noticed it will probably not work for ax25-ae350, since it will try to load a DTB from u-boot binary. I'll send a v3 shortly fixing this Regards /Ilias On Thu, 30 Sept 2021 at 09:41, Ilias Apalodimas wrote: > > At some point back in 2018 prior_stage_fdt_a

[PATCH 3/3] treewide: Remove OF_PRIOR_STAGE

2021-09-30 Thread Ilias Apalodimas
The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since v1, v2: - none dts/Kconfig | 11

[PATCH 2/3 v2] board: arm: Remove OF_PRIOR_STAGE from the remaining Arm boards

2021-09-30 Thread Ilias Apalodimas
U-Boot's config and DTB management, and use OF_BOARD instead. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since v1: - none arch/arm/Kconfig | 1 - board/broadcom/bcmstb/bcmstb.c | 6 ++ configs/bcm7260_defconfig | 2 +- configs/bcm7445_defconfig

[PATCH 3/3] treewide: Remove OF_PRIOR_STAGE

2021-09-30 Thread Ilias Apalodimas
The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since v1: - none dts/Kconfig | 11

[PATCH 1/3 v2] riscv: Remove OF_PRIOR_STAGE from RISC-V boards

2021-09-30 Thread Ilias Apalodimas
from a1 and copy it in their private gd_t. Apart from that they copy it to prior_stage_fdt_address, if the Kconfig option is selected, which is unnecessary. So let's switch the config option for those boards to OF_BOARD and define the required board_fdt_blob_setup() for them. Signed-off-by: Ilias

Re: Driver model at UEFI runtime

2021-09-30 Thread Ilias Apalodimas
On Thu, 30 Sept 2021 at 09:38, Bin Meng wrote: > > On Thu, Sep 30, 2021 at 2:23 PM François Ozog > wrote: >> >> >> >> Le jeu. 30 sept. 2021 à 07:12, Bin Meng a écrit : >>> >>> Hi Heinrich, >>> >>> On Thu, Sep 9, 2021 at 7:16 PM Heinrich Schuchardt >>> wrote: >>> > >>> > Hello Simon, >>> >

[PATCH 1/3 v3] riscv: Remove OF_PRIOR_STAGE from RISC-V boards

2021-09-30 Thread Ilias Apalodimas
from a1 and copy it in their private gd_t. Apart from that they copy it to prior_stage_fdt_address, if the Kconfig option is selected, which is unnecessary. So let's switch the config option for those boards to OF_BOARD and define the required board_fdt_blob_setup() for them. Signed-off-by: Ilias

[PATCH 2/3 v3] board: arm: Remove OF_PRIOR_STAGE from the remaining Arm boards

2021-09-30 Thread Ilias Apalodimas
U-Boot's config and DTB management, and use OF_BOARD instead. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since v1, v2: - none arch/arm/Kconfig | 1 - board/broadcom/bcmstb/bcmstb.c | 6 ++ configs/bcm7260_defconfig | 2 +- configs

Re: [PATCH v3 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-10-06 Thread Ilias Apalodimas
On Wed, 6 Oct 2021 at 16:15, Heinrich Schuchardt wrote: > > On 10/6/21 10:02, Ilias Apalodimas wrote: > > On Wed, 6 Oct 2021 at 10:21, Heinrich Schuchardt > > wrote: > >> > >> > >> > >> On 10/6/21 08:29, Ilias Apalodimas wrote: > >>

Re: [PATCH v3 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-10-07 Thread Ilias Apalodimas
On Thu, 7 Oct 2021 at 08:54, Heinrich Schuchardt wrote: > > > > On 10/6/21 16:05, Ilias Apalodimas wrote: > > On Wed, 6 Oct 2021 at 16:15, Heinrich Schuchardt > > wrote: > >> > >> On 10/6/21 10:02, Ilias Apalodimas wrote: > >>> On Wed,

Re: [PATCHv5] drivers: tpm2: update reset gpio semantics

2021-09-20 Thread Ilias Apalodimas
io-reset is deprecated\n", __func__); > } > + dm_gpio_set_value(_gpio, 1); > + mdelay(1); > + dm_gpio_set_value(_gpio, 0); > } > - > +init: > /* Ensure a minimum amount of time elapsed since reset of the TPM */ > mdelay(drv_data->time_before_first_cmd_ms); > Acked-by: Ilias Apalodimas

Re: [PATCH 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-10-01 Thread Ilias Apalodimas
Hi Heinrich, On Fri, Oct 01, 2021 at 06:42:14PM +0200, Heinrich Schuchardt wrote: > > > On 9/12/21 21:23, Ilias Apalodimas wrote: > > Hi Heinrich > > > > [...] > > > > > -if (!u16_strcmp(name, L"PK") || !u16_strcmp(name, L"KEK&q

<    1   2   3   4   5   6   7   8   9   10   >