Re: [PATCH v2] fs: btrfs: fix out of bounds write

2024-06-24 Thread Alex ThreeD
Hi all, Is there something on my side needed to push this forward? On Wed, Jun 19, 2024 at 12:41 AM Alex Shumsky wrote: > Fix btrfs_read/read_and_truncate_page write out of bounds of destination > buffer. Old behavior break bootstd malloc'd buffers of exact file size. > Previously

Re: [PATCH next 2/2] rockchip: remove support for Theobroma Systems RK3368 Lion

2024-06-20 Thread Alex Bee
Am 20.06.24 um 19:08 schrieb Tom Rini: On Thu, Jun 20, 2024 at 07:03:26PM +0200, Alex Bee wrote: Am 20.06.24 um 12:24 schrieb Quentin Schulz: From: Quentin Schulz No meaningful changes were made to this SoM since February 2021. Nobody from Theobroma has booted anything recent

Re: [PATCH next 2/2] rockchip: remove support for Theobroma Systems RK3368 Lion

2024-06-20 Thread Alex Bee
driver [0]. I'm planning to add a board which uses TPL/SPL soonish (when my rare spare time allows). Alex [0] https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/issues/1

[PATCH v2] fs: btrfs: fix out of bounds write

2024-06-18 Thread Alex Shumsky
Fix btrfs_read/read_and_truncate_page write out of bounds of destination buffer. Old behavior break bootstd malloc'd buffers of exact file size. Previously this OOB write have not been noticed because distroboot usually read files into huge static memory areas. Signed-off-by: Alex Shumsky Fixes

[PATCH] fs: btrfs: fix out of bounds write

2024-06-17 Thread Alex Shumsky
Fix btrfs_read/read_and_truncate_page write out of bounds of destination buffer. Old behavior break bootstd malloc'd buffers of exact file size. Previously this OOB write have not been noticed because distroboot usually read files into huge static memory areas. Signed-off-by: Alex Shumsky

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-22 Thread Alex Bee
Am 22.05.24 um 18:20 schrieb Jonas Karlman: On 2024-05-22 16:18, Alex Bee wrote: Am 13.05.24 um 01:22 schrieb Jonas Karlman: On 2024-05-13 00:34, Alex Bee wrote: Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-22 Thread Alex Bee
Am 13.05.24 um 01:22 schrieb Jonas Karlman: On 2024-05-13 00:34, Alex Bee wrote: Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Alex Bee
Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Alex Bee
Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl gpio_request_enable() ops so that a gpio requested pin automatically use gpio pinmux and U-Boot behaves

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-11 Thread Alex Bee
if those SoCs already using OF_UPSTREAM) and leave the -u-boot.dtsi-"hack" alone for now. Alex With the gpio and pinctrl ops implemented this series also remove a PCIe reset-gpios related device lock-up workaround from board u-boot.dtsi. PX30, RK3066, RK3188, RK356x and RK3588 ar

Re: [PATCH 08/14] fastboot: Remove dependencies on CMDLINE

2023-12-04 Thread Alex Kiernan
/* > * This only happens if image is somehow faulty so we start > -- Doesn't this change the logic? Previously if you didn't set fastboot_bootcmd you'd fall into the bootm path (if CONFIG_BOOTM was enabled), with this, if CONFIG_CMDLINE is enabled then you will never hit the bootm path. -- Alex Kiernan

[PATCH] timer-uclass: Always use "clock-frequency" property as fallback

2023-11-14 Thread Alex Bee
ed as 0. Signed-off-by: Alex Bee --- This is currently an issue for Rockchip RK3188 and potentially also for RK3368: The clock driver does not implement the request-op. Even if we would add it: timer-uclass always picks the first clock and the DT bindings for Rockchip timer requires us to

[PATCH v4] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-26 Thread Michel Alex
of a page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel --- Changes for v2: - fixed deviations from checkpatch.pl - improved commit message Changes

AW: [PATCH v2] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-26 Thread Michel Alex
Hi Tom, > We don't need to promote the types to unsigned here do we? You are right, I will provide a new version of my patch where I will change all "unsigned int" 's to int's. Alex

[PATCH v3] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-25 Thread Michel Alex
of a page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel --- Changes for v2: - fixed deviations from checkpatch.pl - improved commit message Changes

[PATCH v2] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-25 Thread Michel Alex
of a page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel --- Changes for v2: - fixed deviations from checkpatch.pl - improved commit message

[PATCH] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-09-21 Thread Michel Alex
-by: Alex Michel --- drivers/misc/i2c_eeprom.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index bdd7e018cc..f345e34179 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -60,6 +60,17

Re: [PATCH] x86: Update cbmem driver

2023-08-13 Thread Alex Sadovsky
t; + cons->body[pos] = data; While at it, is it OK to increment cons->cursor unconditionally, even when the buffer is full? It's better to do it after the check, isn't it? E.g.: if (cons->cursor < cons->size) cons->body[cons->cursor++] = data; Cheers, Alex.

Re: [PATCH v2 5/5] optee: Support Rockchip OP-TEE binaries

2023-07-20 Thread Alex Bee
Hi Kever, Am 19.07.23 um 09:28 schrieb Kever Yang: Hi Alex, On 2023/7/18 22:57, Alex Bee wrote: Currently the only ARM Rockchip SoC which is supported by upstream optee-os is RK322x. For all other ARM SoCs a vendor-provided OP-TEE binary has to be used to have a TEE available. Those

[PATCH v2 5/5] optee: Support Rockchip OP-TEE binaries

2023-07-18 Thread Alex Bee
which signals that any of those vendor binaries is used and changes the calling convension accordingly. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 8 common/spl/spl_optee.S | 4 2 files changed, 12 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig

[PATCH v2 4/5] rockchip: evb_rk3229: Update/fix README

2023-07-18 Thread Alex Bee
This updates the evb_rk3229's README on howto create / use the FIT image created by binman. Also fix some wrong paths and update filenames which have changed in recent upstream optee-os versions. Signed-off-by: Alex Bee --- board/rockchip/evb_rk3229/README | 72

[PATCH v2 3/5] rockchip: RK322x: Select SPL_OPTEE_IMAGE

2023-07-18 Thread Alex Bee
For RK322x series ARM SoCs the OP-TEE is non-optional, as besides the TEE it also provides the PSCI implementation, which is expected to be available by upstream linux. Select CONFIG_SPL_OPTEE_IMAGE if an FIT image is built. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 1 + 1

[PATCH v2 2/5] configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN

2023-07-18 Thread Alex Bee
value for CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN in order successfully unpack the FIT image. Signed-off-by: Alex Bee --- configs/evb-rk3229_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig index cf73afeded

[PATCH v2 1/5] rockchip: Support OP-TEE for ARM in FIT images created by binman

2023-07-18 Thread Alex Bee
n-optional if CONFIG_SPL_OPTEE_IMAGE is selected and there will be an error if the file does not exist and/or `TEE=` build option is missing. Signed-off-by: Alex Bee --- arch/arm/dts/rk3288-u-boot.dtsi | 1 - arch/arm/dts/rockchip-optee.dtsi | 64 --- arch/arm/dts/rockchip-u-boot

[PATCH v2 0/5] rockchip: Support OP-TEE binaries in ARM FIT images

2023-07-18 Thread Alex Bee
_OPTEE_IMAGE only, as the latter depends on SPL_FIT already (via `depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL`) Alex Bee (5): rockchip: Support OP-TEE for ARM in FIT images created by binman configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN rockchip: RK322x: Select SPL_OPTEE_IMAG

Re: [PATCH v1 4/5] rockchip: evb_rk3229: Update/fix README

2023-07-17 Thread Alex Bee
Hi Jerome, Am 17.07.23 um 15:42 schrieb Jerome Forissier: On 7/16/23 10:10, Alex Bee wrote: This updates the evb_rk3229's README on howto create / use the FIT image created by binman. Also fix some wrong paths and update filenames which have changed in recent upstream optee-os versions

[PATCH v1 5/5] optee: Support Rockchip OPTEE binaries

2023-07-16 Thread Alex Bee
which signals that any of those vendor binaries is used and changes the calling convension accordingly. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 9 + common/spl/spl_optee.S | 4 2 files changed, 13 insertions(+) diff --git a/arch/arm/mach-rockchip

[PATCH v1 4/5] rockchip: evb_rk3229: Update/fix README

2023-07-16 Thread Alex Bee
This updates the evb_rk3229's README on howto create / use the FIT image created by binman. Also fix some wrong paths and update filenames which have changed in recent upstream optee-os versions. Signed-off-by: Alex Bee --- board/rockchip/evb_rk3229/README | 72

[PATCH v1 3/5] rockchip: RK322x: select SPL_OPTEE_IMAGE

2023-07-16 Thread Alex Bee
For RK322x series ARM SoCs the OP-TEE is non-optional, as besides the TEE it also provides the PSCI implementation, which is expected to be available by upstream linux. Select CONFIG_SPL_OPTEE_IMAGE if an FIT image is built. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 1 + 1

[PATCH v1 2/5] evb-rk3229_defconfig: Drop SPL_STACK_R_MALLOC_SIMPLE_LEN

2023-07-16 Thread Alex Bee
that definition, so that the default defined will be used, in order to successfully boot that image. Signed-off-by: Alex Bee --- configs/evb-rk3229_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig index cf73afeded..b818d11b69 100644

[PATCH v1 1/5] rockchip: Support OP-TEE for ARM in FIT images created by binman

2023-07-16 Thread Alex Bee
n-optional if CONFIG_SPL_OPTEE_IMAGE is selected and there will be an error if the file does not exist and/or `TEE=` build option is missing. Signed-off-by: Alex Bee --- arch/arm/dts/rk3288-u-boot.dtsi | 1 - arch/arm/dts/rockchip-optee.dtsi | 64 --- arch/arm/dts/rockchip-u-boot

[PATCH v1 0/5] rockchip: Support OP-TEE binaries in ARM FIT images

2023-07-16 Thread Alex Bee
implementation only). [1] https://github.com/rockchip-linux/rkbin Alex Bee (5): rockchip: Support OP-TEE for ARM in FIT images created by binman evb-rk3229_defconfig: Drop SPL_STACK_R_MALLOC_SIMPLE_LEN rockchip: RK322x: select SPL_OPTEE_IMAGE rockchip: evb_rk3229: Update/fix README optee

riscv64 regression

2023-01-04 Thread Alex
:0xfe720fff] pc=0xc496 '/efibootbootriscv64.efi' My questions: * Is GCC 12.2 known broken / unreliable for riscv64 builds of u-boot? * Has anything else changed around memory management on riscv64 between May 2022 and Oct 2022 -- Alex

Re: [BISECTED] BeagleBone Black doesn't boot after a58147c2dbbf

2022-08-11 Thread Alex Kiernan
e notes I have from a previous life which may be useful, but I'm afraid I've no way of checking these days: * CONFIG_DEBUG_UART=y * CONFIG_DEBUG_UART_BASE=0x44e09000 * CONFIG_DEBUG_UART_CLOCK=4800 * CONFIG_DEBUG_UART_OMAP=y * CONFIG_DEBUG_UART_SHIFT=2 * CONFIG_DEBUG_UART_BOARD_INIT=y * CONFIG_DEBUG_UART_ANNOUNCE=y -- Alex Kiernan

SiFive Unmatched (riscv64), hang scanning xhci_pci

2022-07-26 Thread Alex
Somewhere between e7fb67df319cec410c20906bbf33936a6f7479b2 and 86feeab3dc71977afb70f595e42060ce324086d0 u-boot stopped booting on the SiFive unmatched. gcc version 11.2.0 (GCC) GNU ld (GNU Binutils) 2.36.1 First boot... U-Boot SPL 2022.10-rc1-00159-g86feeab3dc (Jul 26 2022 - 17:01:52

Error: unrecognized opcode on riscv64

2022-07-20 Thread Alex
ideas on what's going on? Toolchain: riscv64-linux-gnu-gcc - gcc version 12.1.0 (GCC) riscv64-linux-gnu-as - GNU assembler (GNU Binutils) 2.36.1 Compiling on ArchLinux -- Alex

Re: [PATCH] efi_loader: Expose relocated address for gdb debugging purposes

2022-03-24 Thread Alex
March 24, 2022 1:25 PM, "Alexander von Gluck IV" wrote: > March 24, 2022 12:06 PM, "Heinrich Schuchardt" wrote: > >> On 3/24/22 17:22, Alexander von Gluck IV wrote: >> Do we really always need this output for every invokation of LoadImage()? >> >> Writing test messages during the runtime of a

[RFC] Dumping load addresses - bootefi qemu gdb remote debugging

2022-03-24 Thread Alex
. "positioning image at address 0xfe6b" or something using the leveraged kernel_addr_r (0x8400) was not enough. -- Alex

riscv64 - SiFive Unmatched regression?

2022-03-17 Thread Alex
by u-boot. -- Alex

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

2022-02-28 Thread Alex G.
required-policy" property at /signature or "required" property in individual key nodes. This might separate the logic out in a way that's acceptable to Alex. Let me poke at it. I've thought about this some more and adding support for `required-mode = "none";` or si

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

2022-02-12 Thread Alex G.
urther depending on config selections. It makes many code parsers and IDEs poop their pantaloons. It makes u-boot harder to work with as a result. I suggest finding a way to turn this into a static inline. Alex

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

2022-01-11 Thread Alex G.
. I see quite a few ARMv8 platforms throw such warnings on gitlab-ci. We can compile an elf, right? Any good reason why kwbimage should be different? Alex

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

2022-01-10 Thread Alex G.
err_get_pub_key; - rsa = EVP_PKEY_get0_RSA(pkey); + rsa = (RSA *)EVP_PKEY_get0_RSA(pkey); I think it's the wrong path to discard const qualifiers, whether unwillingly or by type punning. I suggest making 'rsa' a "const RSA *" and fixing the downstream users to do the sa

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.
On 11/26/21 1:53 AM, Chan Kim wrote: Hi Alex, Thanks for the reply. So I gather that to be able to use 'spl export fdt' to store the 'snapshot' to the storage I should make the spl program runnable at least to that stage. (being able to load kernel image, dtb, initrd and give the spl export

Re: a question about falcon mode

2021-11-25 Thread Alex G.
"spl export" and "fdtargs", and package your kernel, devicetree, and overlays in a FIT container. You'd make sure to enable SPL_LOAD_FIT_APPLY_OVERLAY. There isn't much more to this other than the usual gotcha's with FIT and overlays. Alex

Re: [PATCH v2 2/5] ARM: dts: rockchip: update rk3xxx.dtsi

2021-11-04 Thread Alex Bee
- at least for rk3188 and rk3399 (from what I've seen) and it is not fixable with an extra -u-boot.dtsi. Any idea (without having to define an extra config include/configs per board?) [1] https://github.com/u-boot/u-boot/commit/b212ad24a604b00b240add35516b7381965deb31 Alex Am 25.06.21 um 15:26

Re: [PATCH 05/16] arm: qemu: Add a devicetree file for qemu_arm64

2021-10-27 Thread Alex Bennée
600, Simon Glass wrote: > > Hi all, > > > > On Wed, 27 Oct 2021 at 08:56, Tom Rini wrote: > > > > > > On Wed, Oct 27, 2021 at 03:44:08PM +0100, Alex Bennée wrote: > > > > > > > > François Ozog writes: > > > > > > > &

Re: [PATCH 05/16] arm: qemu: Add a devicetree file for qemu_arm64

2021-10-27 Thread Alex Bennée
'm not entirely clear what a qemu_arm and qemu_arm64 def targets are meant to be in this context. -- Alex Bennée

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.
. If platforms can't build a usable image, I suggest just printing a loud warning instead of overriding the user. Alex --- Changes in v3: - Selected TOOLS_LIBCRYPTO on all platforms that use kwbimage (as best as I can tell, using the suggestions from Pali Rohár) Changes in v2: - Refactored

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.
ot instead of SPL. AFAIR the u-boot FIT loader is defective in this regard. Alex APPENDIX A: Example FIT ITS /dts-v1/ ;/ { description = "Flu-boot image with overlays"; #address-cells = <1>; images { kernel-1 { descript

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.
it would be a hardship. That in turn, I think, is coming down to modern vs very old openssl support, rather than having any at all. OK I'll take a look at some point. Or perhaps Alex might like to? We just got a complain about OpenSSL yesterday [1] Alex [1] https://lists.denx.de/pipermail/u-boot

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.
_WITH_PAGER=n \ CFG_NS_ENTRY_ADDR=${KERNEL_UIMAGE_LOADADDRESS} \ CROSS_COMPILE=${HOST_PREFIX} \ CFG_TEE_CORE_DEBUG=y \ CFG_TEE_CORE_LOG_LEVEL=2 \ ${TZDRAM_FLAGS} \ " TZDRAM_FLAGS = "CFG_TZDRAM_START= 0xde00\ CFG_DRAM_SIZE=0x2000 " Alex

Re: Broken build with disabling OpenSSL crypto

2021-10-06 Thread Alex G.
en cross-compiling U-Boot inside LibreELEC build system. It's not needed for our case anyway. Best regards, Can you please give the following diff a try, and if it works for you, submit as patch? Alex diff --git a/tools/Makefile b/tools/Makefile index 4a86321f64..7f72ff9645 100644 --- a/tools/

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

2021-10-06 Thread Alex G.
-intuitive, as I would expect all signatures to be checked. In my mind, the 'break;' clause should only happen when fit_image_check_sig() returns an error. I have no idea why it happened on success. Simon, any thoughts? Alex

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.
algo = "${FIT_HASHISH}"; }; }; Something like: "fpga" "fpga-auth" : authenticated "fpga-enc" : encrypted "fpga-sec" : encrypted and authenticated Can these properties be inferred from the 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.
to this series other than these final thoughts. We can fix the code later, and then remove the HOST configs. Alex Changes in v5: - Update commit message - Use TOOLS_ instead of HOST_ Changes in v2: - Correct comment about USE_HOSTCC being undefined in CONFIG_VAL() - Fix up comment to put

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

2021-09-27 Thread Alex G.
I_WANT_MD5 (which is temporary), and drop define CONFIG_SHA_*, and by extension, drop the need for CONFIG_TOOLS_SHA*. I think that's far more elegant. Alex Changes in v2: - Add SPL_ Kconfigs also, since otherwise hashing algorithms drop from SPL common/hash.c | 49

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.
d in its entirety with host tools. There isn't a huge opportunity for using a DM-type approach here without #ifndef USE_HOSTCC. Alex + int rc; + enum HASH_ALGO hash_algo; + struct udevice *dev; + + rc = uclass_get_device(UCLASS_HASH, 0, ); +

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

2021-09-16 Thread Alex G.
ady exists in common/hash.c for hash_Lookup_algo() and hash_progressive_algo(). Alex

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

2021-09-16 Thread Alex G.
since we already identify them by their strings (e.g. "sha256"). and then associated ops structure. The + +enum HASH_ALGO hash_algo_lookup_by_name(const char *name) string -> hash_lookup_algo() -> ops struct Is the current way to do things. hash_algo_lookup_by_name() does the roundabout through an enum. That doesn't make sense to me. Alex

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

2021-09-13 Thread Alex G.
d the baudrate table doesn't model that very well. Combine this with a CONFIG_MAX_BAUDRATE so that boards with shitty RS232 converters can set a safe upper limit -- and make sure CONFIG_BAUDRATE also enforces this. There's a lot of unrealized potential here. Alex

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.
y to your arguments from a few paragraphs ago. Just don't call optee_verify_boot_image in bootm_os.c. Alex

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

2021-09-03 Thread Alex G.
ned options with their corresponding security implications. Even absent that, SPL is perfectly capable of starting a secure system. I think it's also more flexible. Let's get serious. Without SPL, I wouldn't have been able to boot linux in one second, with a secure OS. Alex

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

2021-09-03 Thread Alex G.
So it seems the motivation behing optee_verify_bootm_image() is flawed. Also the error message is not very helpful. 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 - Remove optee_verify_bootm_image() - No need for CONFIG_OPTEE_IMAGE Alex

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.
release111/ Okay, I don't think it's worth excluding 1.1.0 then. The only way we could do that is a compile time check against OPENSSL_VERSION. That won't prevent someone from compiling with openssl 1.1.1, and then just replacing libcrypto.so with 1.1.0. Alex

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.
memory has been set up by SPL (or TF-A for that matter): Nonsec: c000->ddff Sec:de00->dfdf SHMEM: dfe0->dfff The external DTB will be in the nonsec region, which OP-TEE allegedly can't access. So how would this get patched? Alex

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

2021-08-31 Thread Alex G.
Probably not. It works with SPL and the current LTS linux (v5.10), and is likely the least intensive solution in terms of lines of code. Alex PS: this part is not yet upstreamed in Linux That's not problematic. I can accommodate devicetree changes by using overlays in the FIT image. This flexibi

  1   2   3   4   5   6   7   8   9   10   >