Re: [PATCH] image: Control FIT signature verification at runtime

2022-02-28 Thread Alex G.
On 2/27/22 19:29, Andrew Jeffery wrote: On Tue, 15 Feb 2022, at 13:55, Andrew Jeffery wrote: On Tue, 15 Feb 2022, at 13:42, Dhananjay Phadke wrote: On 2/14/2022 3:13 PM, Patrick Williams wrote: On Mon, Feb 14, 2022 at 11:14:53AM -0800, Dhananjay Phadke wrote: There's a key-requirement

Re: [PATCH] image: Control FIT signature verification at runtime

2022-02-12 Thread Alex G.
On 1/30/22 21:41, Andrew Jeffery wrote: Some platform designs include support for disabling secure-boot via a jumper on the board. Sometimes this control can be separate from the mechanism enabling the root-of-trust for the platform. Add support for this latter scenario by allowing boards to

Re: [PATCH] tools: Do not build kwbimage if CONFIG_TOOLS_LIBCRYPTO=n

2022-01-11 Thread Alex G.
On 1/11/22 13:09, Tom Rini wrote: On Tue, Jan 11, 2022 at 07:58:05PM +0100, Marek Vasut wrote: On 1/11/22 17:16, Tom Rini wrote: On Tue, Jan 11, 2022 at 04:36:34PM +0100, Pali Rohár wrote: On Tuesday 11 January 2022 16:31:20 Marek Vasut wrote: The kwbimage has hard dependency on OpenSSL,

Re: [PATCH] lib/rsa: avoid -Wdiscarded-qualifiers

2022-01-10 Thread Alex G.
On 1/9/22 8:39 AM, Heinrich Schuchardt wrote: The return type of EVP_PKEY_get0_RSA() is const struct rsa_st *. Our code drops the const qualifier leading to In file included from tools/lib/rsa/rsa-sign.c:1: ./tools/../lib/rsa/rsa-sign.c: In function ‘rsa_add_verify_data’:

Re: a question about falcon mode

2021-11-29 Thread Alex G.
On 11/26/21 4:36 PM, Abder wrote: Hi Alex, Just a quick remarque that intrigued me: Le jeu. 25 nov. 2021 à 15:57, Alex G. a écrit : On 11/25/21 1:07 AM, Chan Kim wrote: Hello all, I'm trying to implement falcon mode for our board. Then should I first implement the normal mode(spl

Re: a question about falcon mode

2021-11-26 Thread Alex G.
- From: Alex G. Sent: Thursday, November 25, 2021 11:57 PM To: Chan Kim ; U-Boot Mailing List Subject: Re: a question about falcon mode On 11/25/21 1:07 AM, Chan Kim wrote: Hello all, I'm trying to implement falcon mode for our board. Then should I first implement the normal mode(spl + proper

Re: a question about falcon mode

2021-11-25 Thread Alex G.
On 11/25/21 1:07 AM, Chan Kim wrote: Hello all, I'm trying to implement falcon mode for our board. Then should I first implement the normal mode(spl + proper)? It looks like so while I'm reading doc/README.falcon. (It says, after loading kernel, DT etc. I should give 'spl export' command).

Re: [Query - 5 Mins] Information on U-BOOT FIT Malloc changes

2021-10-25 Thread Alex G.
On 10/25/21 6:55 PM, Spandan Mahadevegowda wrote: Hello Alexandru, I'm currently working on some POC on Pine64 that requires a Trusted Execution Environment. I was using U-Boot 2020.10 with SPL_FIT_GENERATOR and modified mksunxi_fit_atf.sh to accommodate OP-TEE. However, due to new changes

Re: [PATCH v3 1/4] tools: Separate image types which depend on OpenSSL

2021-10-18 Thread Alex G.
On 10/14/21 10:19 PM, Samuel Holland wrote: Some image types (kwbimage and mxsimage) always depend on OpenSSL, so they can only be included in mkimage when TOOLS_LIBCRYPTO is selected. Use Makefile logic to conditionally link the files. When building for platforms which use those image types,

Re: Broken build with disabling OpenSSL crypto

2021-10-18 Thread Alex G.
On 10/15/21 3:30 PM, Pali Rohár wrote: On Friday 15 October 2021 09:35:43 Alex G. wrote: On 10/15/21 6:34 AM, Pali Rohár wrote: On Wednesday 06 October 2021 17:05:24 Alex G. wrote: Hi Jernej, On 10/6/21 4:27 PM, Jernej Škrabec wrote: Hi everyone! Commit cb9faa6f98ae ("tools: Use a s

Re: Broken build with disabling OpenSSL crypto

2021-10-15 Thread Alex G.
On 10/15/21 6:34 AM, Pali Rohár wrote: On Wednesday 06 October 2021 17:05:24 Alex G. wrote: Hi Jernej, On 10/6/21 4:27 PM, Jernej Škrabec wrote: Hi everyone! Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL") recently introduced option to dis

Re: using device-tree fragments/overlays

2021-10-14 Thread Alex G.
Hi Tim, On 10/7/21 4:07 PM, Tim Harvey wrote: Greetings, I'm working on some features for the imx8mm-venice boards I support which depend on making small changes to the dt before booting Linux. The purpose is not to have any of this apply to the U-Boot controlling dt but instead to the Linux

Re: Broken build with disabling OpenSSL crypto

2021-10-11 Thread Alex G.
On 10/10/21 6:06 AM, Jernej Škrabec wrote: Dne četrtek, 07. oktober 2021 ob 00:05:24 CEST je Alex G. napisal(a): Can you please give the following diff a try, and if it works for you, submit as patch? This works, I'll submit it as a patch. Should I keep you as original author and add your SoB

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-07 Thread Alex G.
On 10/7/21 4:04 PM, Tom Rini wrote: On Thu, Oct 07, 2021 at 03:33:32PM -0500, Alex G. wrote: On 10/7/21 2:39 PM, Tom Rini wrote: On Thu, Oct 07, 2021 at 02:32:42PM -0500, Alex G. wrote: On 10/7/21 1:50 PM, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 12:30, Tom Rini wrote

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-07 Thread Alex G.
On 10/7/21 2:39 PM, Tom Rini wrote: On Thu, Oct 07, 2021 at 02:32:42PM -0500, Alex G. wrote: On 10/7/21 1:50 PM, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 12:30, Tom Rini wrote: On Thu, Oct 07, 2021 at 12:02:24PM -0600, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 07:42

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-07 Thread Alex G.
On 10/7/21 1:50 PM, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 12:30, Tom Rini wrote: On Thu, Oct 07, 2021 at 12:02:24PM -0600, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 07:42, Tom Rini wrote: On Thu, Oct 07, 2021 at 07:32:04AM -0600, Simon Glass wrote: Hi Tom, On Wed,

Re: [Uboot-stm32] [PATCH v2 03/11] stm32mp1: Add support for falcon mode boot from SD card

2021-10-07 Thread Alex G.
On 10/4/21 9:57 AM, Patrick DELAUNAY wrote: Hi, => if OPTEE is loaded after SPL the U-Boot configuration change (running in secure world or not) I am starting to work on these issues in the branch https://github.com/u-boot/u-boot/compare/master...patrickdelaunay:spl_optee_W2140

Re: [PATCH 0/3] stm32mp: Attempt to resolve unintended breakage with v2021.10-rc2

2021-10-07 Thread Alex G.
Hi Patrick, On 9/14/21 7:26 AM, Patrick DELAUNAY wrote: Hi Alexandru, I think you need to update  arch/arm/mach-stm32mp/Kconfig something like:  config STM32MP15x bool "Support STMicroelectronics STM32MP15x Soc" -    select ARCH_SUPPORT_PSCI if !TFABOOT -    select ARM_SMCCC if

Re: Broken build with disabling OpenSSL crypto

2021-10-06 Thread Alex G.
Hi Jernej, On 10/6/21 4:27 PM, Jernej Škrabec wrote: Hi everyone! Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL") recently introduced option to disable usage of OpenSSL via CONFIG_TOOLS_LIBCRYPTO. However, just a bit later, another commit b4f3cc2c42d9

Re: [PATCH] fit: display proper node on error

2021-10-06 Thread Alex G.
+ Simon On 10/6/21 10:47 AM, Angelo Dureghello wrote: Fix final error message from Verification failed for '' hash node in 'conf@1' config node to Verification failed for 'signature@1' hash node in 'conf@1' config node Signed-off-by: Angelo Dureghello --- common/image-fit-sig.c | 2 +-

Re: [PATCH v5 15/29] image: Drop IMAGE_ENABLE_IGNORE

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: We can use the new host_build() function for this, so drop it. s/host_build/tools_build/ Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 3 --- 2 files

Re: [PATCH v5 14/29] image: Drop IMAGE_OF_SYSTEM_SETUP

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fdt.c | 2 +- include/image.h| 6 -- 2 files

Re: [PATCH v5 13/29] image: Drop IMAGE_OF_BOARD_SETUP

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fdt.c | 4 ++-- include/image.h| 6 -- 2 files

Re: [PATCH v5 12/29] image: Drop IMAGE_BOOT_GET_CMDLINE

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- Changes

Re: [PATCH v5 11/29] image: Use the correct checks for CRC32

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32) directly in the host build, so drop the unnecessary indirection. Add a few more conditions to SPL_CRC32 to avoid build failures as well as TPL_CRC32. Also update hash.c to make

Re: [PATCH v5 10/29] image: Use Kconfig to enable FIT_RSASSA_PSS on host

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for FIT_RSASSA_PSS. With this we can use CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the forcing of this in the image.h header. Drop the #ifdef around padding_pss_verify() too since it is not needed. Use the

Re: [PATCH v5 09/29] image: Use Kconfig to enable CONFIG_FIT_VERBOSE on host

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the host build, so drop the s/host build/ tools build/ forcing of this in the image.h header. Signed-off-by: Simon Glass Reviewed-by: Alexandru

Re: [PATCH v5 08/29] image: Drop IMAGE_ENABLE_OF_LIBFDT

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the host build, so drop the s/host build/tools build/ unnecessary indirection. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc ---

Re: [PATCH v5 07/29] image: Drop IMAGE_ENABLE_FIT

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- Changes in v5: - Rebase to next

Re: [PATCH v5 06/29] hash: Drop some #ifdefs in hash.c

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: We can use the __maybe_unused attribute to avoid some of the #ifdefs in this file. Update the functions accordingly. Note: The actual hashing interface is still a mess, with four separate combinations and lots of #ifdefs. This should really use a driver

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean

Re: [PATCH v5 04/29] spl: cypto: Bring back SPL_ versions of SHA

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Unfortunately these were removed by mistake. This means that adding hash support to SPL brings in all software algorithms, with a substantial increase in code size. The origin of the problem was renaming them to SPL_FIT_xxx and then these were removed

Re: [PATCH v5 03/29] image: Add Kconfig options for FIT in the tools build

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: In preparation for enabling CONFIG_IS_ENABLED() on the host build, add some options to enable the various FIT options expected in these tools. This will ensure that the code builds correctly when CONFIG_TOOLS_xxx is distinct from CONFIG_xxx. Drop some

Re: [PATCH v5 03/29] image: Add Kconfig options for FIT in the tools build

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: In preparation for enabling CONFIG_IS_ENABLED() on the host build, add some options to enable the various FIT options expected in these tools. This will ensure that the code builds correctly when CONFIG_TOOLS_xxx is distinct from CONFIG_xxx. Drop some

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if we

Re: [PATCH v5 01/29] compiler: Rename host_build() to tools_build()

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are heading towards calling this a tools build rather than a host build, although of course it does happen on the host. I cannot think of anything built by the host which cannot be

Re: FIT image: load secure FPGA

2021-10-04 Thread Alex G.
On 10/4/21 3:32 PM, Jorge Ramirez-Ortiz, Foundries wrote: Hello, We are enabling secure boot on Zynqmp with SPL. The issue however is that during secure boot, the bootrom not only validates the first loader (SPL and PMUFW combo) but it will also expect a signed bitstream during load(FPGA).

Re: [PATCH] arm: dts: stm32mp1: use ssbl partition name for U-Boot

2021-09-29 Thread Alex G.
On 9/14/21 7:14 AM, Patrick Delaunay wrote: Continue to use the "ssbl" name for GPT partition of secondary boot stage = U-Boot for basic boot with SPL to avoid to disturb existing user. The "fip" partition name is only used for TFA_BOOT with FIP, it is a TF-A BL2 requirement; it the default

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-09-27 Thread Alex G.
On 9/27/21 11:06 AM, Simon Glass wrote: Hi Alex, On Mon, 27 Sept 2021 at 09:53, Alex G. wrote: Hi Simon On 9/25/21 8:43 PM, Simon Glass wrote: At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-09-27 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-09-27 Thread Alex G.
Hi Simon On 9/25/21 8:43 PM, Simon Glass wrote: At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it.

Re: [PATCH 2/4] dm: hash: Add new UCLASS_HASH support

2021-09-27 Thread Alex G.
On 9/23/21 9:49 PM, Simon Glass wrote:> On Thu, 16 Sept 2021 at 09:43, Alex G. wrote: On 7/29/21 8:08 PM, Chia-Wei Wang wrote: + +enum HASH_ALGO hash_algo_lookup_by_name(const char *name) string -> hash_lookup_algo() -> ops struct Is the current way to

Re: [PATCH 1/2] spl: Add CONFIG_SPL_FIT_SIGNATURE_STRICT

2021-09-16 Thread Alex G.
Hi Oleksandr On 9/16/21 8:09 AM, Oleksandr Suvorov wrote: From: Henry Beberman SPL FIT load checks the signature on loadable images but just continues in the case of a failure. This is undesirable behavior because the boot process depends on the authenticity of each loadable part. Adding

Re: [PATCH 4/4] fit: Use DM hash driver if supported

2021-09-16 Thread Alex G.
On 7/29/21 8:08 PM, Chia-Wei Wang wrote: Calculate hash using DM driver if supported. For backward compatibility, the call to legacy hash functions is reserved. Signed-off-by: Chia-Wei Wang --- common/image-fit.c | 30 ++ 1 file changed, 30 insertions(+) diff

Re: [PATCH 3/4] crypto: hash: Add software hash DM driver

2021-09-16 Thread Alex G.
On 7/29/21 8:08 PM, Chia-Wei Wang wrote: Add purely software-implmented drivers to support multiple hash operations including CRC, MD5, and SHA family. This driver is based on the new hash uclass. Signed-off-by: Chia-Wei Wang --- drivers/crypto/hash/Kconfig | 11 ++

Re: [PATCH 2/4] dm: hash: Add new UCLASS_HASH support

2021-09-16 Thread Alex G.
Hi, On 7/29/21 8:08 PM, Chia-Wei Wang wrote: Add UCLASS_HASH for hash driver development. Thus the hash drivers (SW or HW-accelerated) can be developed in the DM-based fashion. Software hashing implementations are shared tightly with host tools. With DM, there's no opportunity for code

Re: [PATCH 5/5] serial: Rework CONFIG_SYS_BAUDRATE_TABLE

2021-09-13 Thread Alex G.
On 9/13/21 4:24 PM, Tom Rini wrote: In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework the logic a bit. Rename the users of CONFIG_SYS_BAUDRATE_TABLE to SYS_BAUDRATE_TABLE. Introduce a series of CONFIG_BAUDRATE_TABLE_... that include some number of baud rates. These

Re: [PATCH] Kconfig: Drop duplicate 'select SHA512' instances

2021-09-09 Thread Alex G.
On 9/9/21 10:00 AM, Tom Rini wrote: When dropping SHA512_ALGO in general, we didn't catch some cases where an option was selecting both SHA512 and SHA512_ALGO and caused them to select SHA512 twice. Kconfig doesn't complain, but this is still wrong and should be corrected. Fixes: e60e44993120

Re: [PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE

2021-09-07 Thread Alex G.
On 9/6/21 5:39 PM, Alex G. wrote: On 9/6/21 11:53 AM, Patrick DELAUNAY wrote: In fact, the SPL boot path for OP-TEE doesn't use this function. That's intentional. Here's what I suggest:     - Remove OPTEE_TZDRAM_BASE and _SIZE There is some legacy here, board/warp7and board/technexion

Re: [PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE

2021-09-06 Thread Alex G.
On 9/6/21 11:53 AM, Patrick DELAUNAY wrote: In fact, the SPL boot path for OP-TEE doesn't use this function. That's intentional. Here's what I suggest:     - Remove OPTEE_TZDRAM_BASE and _SIZE There is some legacy here, board/warp7and board/technexion/pico-imx7d. it is not possible, it

Re: [RFC PATCH] stm32mp1: Replace STM32IMAGE config with TFABOOT_FIP

2021-09-03 Thread Alex G.
On 9/3/21 10:32 AM, Marek Vasut wrote: On 9/1/21 11:07 AM, Patrick DELAUNAY wrote: On 8/31/21 6:42 PM, Marek Vasut wrote: I would argue that the U-Boot crypto code went through multiple >> independent security reviews, personally I trust that more than code fully controlled and maintained by

Re: [PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE

2021-09-03 Thread Alex G.
Hi Patrick On 9/2/21 4:56 AM, Patrick Delaunay wrote: The configuration CONFIG_OPTEE is defined 2 times: 1- in lib/optee/Kconfig for support of OPTEE images loaded by bootm command 2- in drivers/tee/optee/Kconfig for support of OP-TEE driver. It is abnormal to have the same CONFIG define for 2

Re: [PATCH 2/2] board: stm32: Remove the bi_boot_params initialization

2021-09-03 Thread Alex G.
On 9/2/21 5:02 AM, Patrick Delaunay wrote: The stm32 platforms never had to support an ATAGs-based Linux Kernel, so remove the bi_boot_params initialization. Signed-off-by: Patrick Delaunay Tested-by: Alexandru Gagniuc --- board/dhelectronics/dh_stm32mp1/board.c | 3 ---

Re: [PATCH 1/2] arm: stm32: Disable ATAGs support

2021-09-03 Thread Alex G.
On 9/2/21 5:02 AM, Patrick Delaunay wrote: These platforms never had to support an ATAGs-based Linux Kernel, so remove the options. Cc: Marek Vasut Signed-off-by: Tom Rini Signed-off-by: Patrick Delaunay Reviewed-by: Alexandru Gagniuc Slowly, but surely, configs/*.h will grow to zero.

Re: [PATCH] lib/rsa: Remove support for OpenSSL < 1.1.0 and libressl < 2.7.0

2021-09-02 Thread Alex G.
On 9/2/21 12:43 PM, Peter Robinson wrote: On Thu, Sep 2, 2021 at 3:38 PM Tom Rini wrote: On Thu, Sep 02, 2021 at 03:36:43PM +0100, Peter Robinson wrote: On Thu, Sep 2, 2021 at 2:28 PM Tom Rini wrote: On Thu, Jul 29, 2021 at 01:31:21PM -0500, Alexandru Gagniuc wrote: Older OpenSSL and

Re: [PATCH 10/10] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads

2021-09-02 Thread Alex G.
Hi Patrick, On 9/1/21 10:10 AM, Alex G. wrote: Hi Patrick, On 8/31/21 12:24 PM, Patrick DELAUNAY wrote: Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases

Re: [PATCH 10/10] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads

2021-09-01 Thread Alex G.
Hi Patrick, On 8/31/21 12:24 PM, Patrick DELAUNAY wrote: Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases that will be some other devicetree-bearing platform, such as

Re: [PATCH 07/10] stm32mp1: spl: Configure MAC address when booting OP-TEE

2021-08-31 Thread Alex G.
On 8/31/21 12:10 PM, Patrick DELAUNAY wrote: Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: When OP-TEE is booted as the SPL payload, the stage after OP-TEE is not guaranteed to be u-boot. Thus the FDT patching in u-boot is not guaranteed to occur. Add this step to SPL. The patching by

Re: [PATCH 04/10] fdt_support: Implement fdt_ethernet_set_macaddr()

2021-08-26 Thread Alex G.
Hi Sean, On 8/26/21 6:35 PM, Sean Anderson wrote: On 8/26/21 5:42 PM, Alexandru Gagniuc wrote: Oftentimes we have MAC address information stored in a ROM or OTP. The way to add that to the FDT would be through the u-boot environment, and then fdt_fixup_ethernet(). This is not very useful in

Re: U-Boot ECDSA Software Implementation Status

2021-08-26 Thread Alex G.
Hi Ryan, I'm only aware of the work that Tim has published. I don't think anyone is actively working on it. Alex On 8/26/21 9:00 AM, Pabis, Ryan wrote: I see that Tim was working to add a non-platform specific implementation of the ECDSA algorithm to u-boot back in February. I would like

Massive stm32mp1 breakage with v2021.10-rc2

2021-08-24 Thread Alex G.
Hi Patrick, I'm having issues with some of the recent changes centered around FIP support and CONFIG_STM32MP15x_STM32IMAGE. and commit f91783edf224 ("arm: stm32mp: handle the OP-TEE nodes in DT with FIP support") ## Problem description > +#ifdef CONFIG_STM32MP15x_STM32IMAGE > + /*

A mea culpa undefined reference in v2021.10-rc2, padding_algos, linker lists

2021-08-18 Thread Alex G.
Hi Simon, I'm seeing an undefined reference to padding_pkcs_15_verify with v2021.10-rc2. It happens when enabling FIT_SIGNATURE. I've tracked it down to the following two commits: commit 92c960bc1d ("lib: rsa: Remove #ifdefs from rsa.h") commit 61416fe9df ("Kconfig: FIT_SIGNATURE should not

Re: [PATCH] mkimage: use environment variable MKIMAGE_SIGN_PIN to set pin for OpenSSL Engine

2021-08-18 Thread Alex G.
Hi Marc, On 7/23/21 3:17 PM, Marc Kleine-Budde wrote: This patch adds the possibility to pass the PIN the OpenSSL Engine used during signing via the environment variable MKIMAGE_SIGN_PIN. This follows the approach used during kernel module signing ("KBUILD_SIGN_PIN") or UBIFS image signing

Re: [PATCH 1/1] lib/ecdsa: Fix LibreSSL before v2.7.0

2021-07-29 Thread Alex G.
Hi Artem On 7/29/21 9:52 AM, Artem Panfilov wrote: On 29.07.2021 15:59, Tom Rini wrote: Well yes, this is part of the question now, is there enough interest in the old version to bother with?  The other part of the question is what's being built now that wasn't being built before, and is that

Re: [PATCH 1/1] lib/ecdsa: Fix LibreSSL before v2.7.0

2021-07-28 Thread Alex G.
. They all looks ugly. Another solution is to disable CONFIG_TOOLS_LIBCRYPTO by default that broke our builds. Do you need cryptographic features in mkimage? If not just disable TOOLS_LIBCRYPTO in your builds. Alex Best regards, Artem ср, 28 июл. 2021 г., 22:16 Alex G. <mailto:mr.n

Re: [PATCH 1/1] lib/ecdsa: Fix LibreSSL before v2.7.0

2021-07-28 Thread Alex G.
On 7/28/21 1:10 PM, Artem Panfilov wrote: Fix LibreSSL compilation for versions before v2.7.0. Fix following compilation issue when CONFIG_TOOLS_LIBCRYPTO is enabled: tools/lib/ecdsa/ecdsa-libcrypto.o: In function `prepare_ctx': ecdsa-libcrypto.c:(.text+0x94): undefined reference to

Re: [PATCH v3 19/19] tools: Use a single target-independent config to enable OpenSSL

2021-07-27 Thread Alex G.
On 7/27/21 4:59 AM, Heiko Thiery wrote: Hi all, Am Do., 15. Juli 2021 um 00:09 Uhr schrieb Alexandru Gagniuc : Host tool features, such as mkimage's ability to sign FIT images were enabled or disabled based on the target configuration. However, this misses the point of a target-agnostic

Re: [PATCH v5 0/5] stm32mp: Enable OP-TEE and TZC support in SPL

2021-07-25 Thread Alex G.
On 7/15/21 2:19 PM, Alexandru Gagniuc wrote: v4 branch was reported to have some issues with SPL becoming too big on some platforms (e.g. imx6dl_mamoj) This is fixed by dropping the call to genimg_get_os_name(). Ping for merge window. Alexandru Gagniuc (5): spl: mmc: Support OP-TEE

Re: [PATCH v4 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode

2021-07-15 Thread Alex G.
On 7/15/21 1:27 PM, Patrick DELAUNAY wrote: Hi, [snip] When I merge this patch on master branch, I get the error: arm:  +   imx6dl_mamoj +spl/u-boot-spl.bin exceeds file size limit: +  limit:  0xefa0 bytes +  actual: 0xf41d bytes +  excess: 0x47d bytes +make[1]: *** [Makefile:1997:

Re: [PATCH] spl: Align device tree blob address at 8-byte boundary

2021-07-13 Thread Alex G
wrote: On 7/13/21 3:47 PM, Tom Rini wrote: On Mon, Jul 12, 2021 at 11:01:24AM -0500, Alex G. wrote: On 7/12/21 10:15 AM, Tom Rini wrote: On Mon, Jul 12, 2021 at 01:36:14PM +0800, Bin Meng wrote: On Mon, Jul 12, 2021 at 1:21 PM Reuben Dowle wrote: I submitted an almost identical patch. See

Re: [PATCH] spl: Align device tree blob address at 8-byte boundary

2021-07-13 Thread Alex G
, 2021 at 04:35:38PM +0200, Marek Vasut wrote: On 7/13/21 3:47 PM, Tom Rini wrote: On Mon, Jul 12, 2021 at 11:01:24AM -0500, Alex G. wrote: On 7/12/21 10:15 AM, Tom Rini wrote: On Mon, Jul 12, 2021 at 01:36:14PM +0800, Bin Meng wrote: On Mon, Jul 12, 2021 at 1:21 PM Reuben Dowle wrote: I

Re: [PATCH] spl: Align device tree blob address at 8-byte boundary

2021-07-12 Thread Alex G.
On 7/12/21 10:15 AM, Tom Rini wrote: On Mon, Jul 12, 2021 at 01:36:14PM +0800, Bin Meng wrote: On Mon, Jul 12, 2021 at 1:21 PM Reuben Dowle wrote: I submitted an almost identical patch. See https://github.com/u-boot/u-boot/commit/eb39d8ba5f0d1468b01b89a2a464d18612d3ea76 This patch

Re: [PATCH v4 0/5] stm32mp: Enable OP-TEE and TZC support in SPL

2021-07-06 Thread Alex G.
On 7/6/21 10:45 AM, Tom Rini wrote: On Tue, Jul 06, 2021 at 10:18:44AM -0500, Alex G. wrote: On 5/31/21 12:43 PM, Alexandru Gagniuc wrote: The purpose of this series is to allow booting an OP-TEE image from SPL, by corectly configuring the TrustZone (TZC) memory regions. Any chance we could

Re: [PATCH v4 0/5] stm32mp: Enable OP-TEE and TZC support in SPL

2021-07-06 Thread Alex G.
On 5/31/21 12:43 PM, Alexandru Gagniuc wrote: The purpose of this series is to allow booting an OP-TEE image from SPL, by corectly configuring the TrustZone (TZC) memory regions. Any chance we could have this hit the merge window? Alex

Re: [PATCH] tools: Use a single target-independent config to enable OpenSSL

2021-06-22 Thread Alex G.
On 6/22/21 8:31 AM, Simon Glass wrote: [snip] +config TOOLS_USE_LIBCRYPTO would HOST_LIBCRYPTO be better? I had considered a shorter kconfig such as the above. Does it mean (1) The build host has libcrypto available? (2) We use the libcrypto on the host? (3) There is a

Re: Boeing Engineer - Help Needed (URGENT)

2021-06-17 Thread Alex G.
Ni Nelson, On 6/17/21 2:21 PM, Su (US), Nelson Z wrote: Hi U-Boot devs, I am an engineer working for Boeing and I need assistance with getting a MicroChip VSC6803 API (https://github.com/microchip-ung/mesa) to work on their VSC7429 Ethernet Switch. From their API, we have a MFI image file

Re: [PATCH] tools: Use a single target-independent config to enable OpenSSL

2021-06-16 Thread Alex G.
On 6/15/21 6:34 PM, AKASHI Takahiro wrote: A gentle ping. What is the current review status? Who will take care of this patch? Patchwork automatically delegates this to a maintainer [1], but anyone is welcome to comment and review. Alex [1]

Re: U-Boot "lib: Add support for ECDSA image signing" commit breaks socfpga_*_atf_defconfig compilation

2021-05-31 Thread Alex G.
On 4/24/21 2:43 AM, Lim, Elly Siew Chin wrote: Add this discussion to denx mailing list. [snip] I can think of two enhancement to fix this: (1) Add separate CONFIG to gate ECDSA algorithm. This enhancement benefits all use cases. I assume not all user need ECDSA algorithm when

Re: [PATCH v3 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE

2021-05-31 Thread Alex G.
On 5/28/21 5:22 AM, Patrick DELAUNAY wrote: Hi, On 4/15/21 6:48 PM, Alexandru Gagniuc wrote: [snip] +    fdt_start = ofnode_get_addr_size(node, "reg", size); warning here because size is 'fdt_size_t *' not 'u32*' arch/arm/mach-stm32mp/spl.c:122:48: warning: passing argument 3 of

Re: [PATCH v3 3/5] arm: stm32mp: Implement support for TZC 400 controller

2021-05-31 Thread Alex G.
Hi Patrick, On 5/28/21 4:59 AM, Patrick DELAUNAY wrote: Hi, Any reason to prefer  uint16_t and uint32_t ? I use standard C types. u32, _u32, and __u32 are non-standard, and they have different meanings depending on how they're used. I avoid them for this reason. Alex See checkpatch

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

2021-05-26 Thread Alex G.
On 5/25/21 10:09 PM, 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]. This commit adds the PE/COFF image measurement, extends PCR, and appends measurement into Event

Re: [PATCH RFC 1/2] Revert "lib: introduce HASH_CALCULATE option"

2021-05-26 Thread Alex G.
On 5/26/21 11:06 AM, Heinrich Schuchardt wrote: On 5/24/21 9:28 PM, Alexandru Gagniuc wrote: 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

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-24 Thread Alex G.
On 5/21/21 2:39 PM, Simon Glass wrote: Hi Alex, On Thu, 20 May 2021 at 18:07, Alex G. wrote: On 5/20/21 6:17 PM, Simon Glass wrote: Hi Alex, On Thu, 20 May 2021 at 17:13, Alex G. wrote: On 5/20/21 12:52 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 20:41, Alex G

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-20 Thread Alex G.
On 5/20/21 6:17 PM, Simon Glass wrote: Hi Alex, On Thu, 20 May 2021 at 17:13, Alex G. wrote: On 5/20/21 12:52 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 20:41, Alex G. wrote: On 5/19/21 4:55 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 11:44, Alex G wrote

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-20 Thread Alex G.
On 5/20/21 12:52 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 20:41, Alex G. wrote: On 5/19/21 4:55 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 11:44, Alex G wrote: On 5/19/21 11:36 AM, Simon Glass wrote: Hi Alexandru, On Mon, 17 May 2021 at 10:38

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-19 Thread Alex G.
On 5/19/21 4:55 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 11:44, Alex G wrote: On 5/19/21 11:36 AM, Simon Glass wrote: Hi Alexandru, On Mon, 17 May 2021 at 10:38, Alexandru Gagniuc wrote: From: Simon Glass We already have a host Kconfig for SHA1. Use

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-19 Thread Alex G
On 5/19/21 11:36 AM, Simon Glass wrote: Hi Alexandru, On Mon, 17 May 2021 at 10:38, Alexandru Gagniuc wrote: From: Simon Glass We already have a host Kconfig for SHA1. Use CONFIG_IS_ENABLED(SHA1) directly in the code shared with the host build, so we can drop the unnecessary

Re: [PATCH v2 16/50] image: Add Kconfig options for FIT in the host build

2021-05-19 Thread Alex G
On 5/17/21 8:23 PM, AKASHI Takahiro wrote: On Mon, May 17, 2021 at 05:29:44PM -0500, Alex G. wrote: On 5/12/21 12:14 PM, Tom Rini wrote: On Wed, May 12, 2021 at 11:19:52AM -0500, Alex G. wrote: On 5/12/21 10:52 AM, Simon Glass wrote: [snip] We have a NO_SDL build-time control

Re: [PATCH v2 16/50] image: Add Kconfig options for FIT in the host build

2021-05-17 Thread Alex G.
On 5/12/21 12:14 PM, Tom Rini wrote: On Wed, May 12, 2021 at 11:19:52AM -0500, Alex G. wrote: On 5/12/21 10:52 AM, Simon Glass wrote: [snip] We have a NO_SDL build-time control. Perhaps have a NO_SSL one as well? It could be a config option instead of an environment variable. I think

Re: [PATCH 09/18] common: Move host-only logic in image-sig.c to separate file

2021-05-17 Thread Alex G.
On 5/17/21 11:38 AM, Alexandru Gagniuc wrote: image-sig.c is used to map a hash or crypto algorithm name to a handler of that algorithm. There is some similarity between the host and target variants, with the differences worked out by #ifdefs. The purpose of this change is to remove those

Re: [PATCH RFC 01/10] common: Move host-only logic in image-sig.c to separate file

2021-05-17 Thread Alex G.
On 5/15/21 10:20 AM, Simon Glass wrote: Hi Alexandru, On Fri, 14 May 2021 at 13:46, Alexandru Gagniuc wrote: image-sig.c is used to map a hash or crypto algorithm name to a handler of that algorithm. There is some similarity between the host and target variants, with the differences worked

Re: [PATCH v2 47/50] image: Remove some #ifdefs from image-fit and image-fit-sig

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: Drop the #ifdefs which are easy to remove without refactoring. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig.boot| 10 ++ common/image-fit-sig.c | 8 ++-- common/image-fit.c | 7 --- 3 files

Re: [PATCH v2 42/50] image: Drop #ifdefs for fit_print_contents()

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fit.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v2 41/50] image: Drop unnecessary #ifdefs from image.h

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: This file has a lot of conditional code and much of it is unnecessary. Clean this up to reduce the number of build combinations. Signed-off-by: Simon Glass --- [snip] @@ -523,12 +520,9 @@ enum fit_load_op { int boot_get_setup(bootm_headers_t

Re: [PATCH v2 38/50] image: Drop IMAGE_ENABLE_BEST_MATCH

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 5 - 2 files

Re: [PATCH v2 29/50] Kconfig: Rename SPL_MD5_SUPPORT to SPL_MD5

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: Drop the _SUPPORT suffix so we can use CONFIG_IS_ENABLED() with this option. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/spl/Kconfig | 2 +- include/image.h| 2 +- 2 files changed, 2

Re: [PATCH v2 27/50] Kconfig: Rename SPL_CRC32_SUPPORT to SPL_CRC32

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: Drop the _SUPPORT suffix so we can use CONFIG_IS_ENABLED() with this option. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/spl/Kconfig| 4 ++-- configs/axm_defconfig

Re: [PATCH v2 37/50] image: Drop IMAGE_ENABLE_SIGN/VERIFY defines

2021-05-14 Thread Alex G.
On 5/14/21 3:44 PM, Simon Glass wrote: Hi Alex, On Fri, 14 May 2021 at 14:38, Alex G. wrote: On 5/6/21 9:24 AM, Simon Glass wrote: Add host Kconfigs for FIT_SIGN and RSA_VERIFY. With these we can use CONFIG_IS_ENABLED() directly in the host build, so drop the unnecessary indirections

Re: [PATCH v2 37/50] image: Drop IMAGE_ENABLE_SIGN/VERIFY defines

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: Add host Kconfigs for FIT_SIGN and RSA_VERIFY. With these we can use CONFIG_IS_ENABLED() directly in the host build, so drop the unnecessary indirections IMAGE_ENABLE_SIGN and HOST_RSA_VERIFY. Also drop FIT_IMAGE_ENABLE_VERIFY which is not actually used.

Re: [PATCH v2 21/50] hash: Drop some #ifdefs in hash.c

2021-05-14 Thread Alex G.
On 5/6/21 9:24 AM, Simon Glass wrote: We can use the __maybe_unused attribute to avoid some of the #ifdefs in this file. Update the functions accordingly. What is __maybe_unused? Does u-boot support booting quantum computers? Note: The actual hashing interface is still a mess, with four

  1   2   >