[U-Boot] askenv with timeout?

2016-05-16 Thread Eugeniu Rosca
Hi everyone, Recently I got the need to read some environment variable from stdin, as user input. So, I discovered the 'askenv' command. One additional requirement I have is avoiding any blocking behavior, which would be possible if askenv supported the timeout concept. However, it doesn't seem

[U-Boot] [PATCH] kconfig: Print reverse dependencies in groups

2018-05-08 Thread Eugeniu Rosca
1fa3e93b4091651d8ad25 Author: Eugeniu Rosca <ero...@de.adit-jv.com> kconfig: Print reverse dependencies in groups Here is an example of re-formatted information about the reverse dependencies of CONFIG_DM (sandbox_defconfig): * W/o the imported commits: Selected by: NIOS2 [

Re: [U-Boot] [PATCH] kconfig: Print reverse dependencies in groups

2018-05-09 Thread Eugeniu Rosca
Masahiro, Tom, Petr, Thanks for your prompt feedback. > On Wed, May 09, 2018 at 10:27:00AM +0900, Masahiro Yamada wrote: > > I prefer syncing to check-picking. > > [...] > > Would you do that please? > > Or, do you want me to do it? I would happily attempt that. However, see my below question.

Re: [U-Boot] [PATCH] kconfig: Print reverse dependencies in groups

2018-05-09 Thread Eugeniu Rosca
On Wed, May 09, 2018 at 07:23:19AM -0400, Tom Rini wrote: > On Wed, May 09, 2018 at 08:32:56AM +, yamada.masah...@socionext.com wrote: > > Tom will make a decision. > > > > Just my thought. > > > > > > U-Boot is basically a mirror of Linux. > > > > Syncing Kconfig will add new tool

Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-12 Thread Eugeniu Rosca
Hi Petr, On Sat, May 12, 2018 at 09:31:48PM +0200, Petr Vorel wrote: > Hi Eugeniu, > > > Hello Petr, > > > On Sat, May 12, 2018 at 08:25:56PM +0200, Petr Vorel wrote: > > > > When applied all 6 patches, I got several errors (see bellow). > > > I tested in on 2 distros (Debian unstable and

[U-Boot] [PATCH v2 4/6] scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987

2018-05-12 Thread Eugeniu Rosca
- s/_fdt_check_node_offset/fdt_check_node_offset_/ - s/_fdt_check_prop_offset/fdt_check_prop_offset_/ - s/_fdt_find_add_string/fdt_find_add_string_/] Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- v1-v2: * Newly pushed include/linux/libfdt_env.h

[U-Boot] [PATCH v2 6/6] sandbox: dts: test: Fix wrong aliases property names

2018-05-12 Thread Eugeniu Rosca
erty name must include only lowercase and '-' Silent them. Fixes: e8d5291824e2 ("core: ofnode: Fix translation for #size-cells == 0") Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- v1->v2: * Newly pushed arch/sandbox/dts/test.dts | 8 1 file changed,

[U-Boot] [PATCH v2 2/6] board: eets: pdu001: Fix wrong default value in Kconfig

2018-05-12 Thread Eugeniu Rosca
the choice This looks to be caused by a typo. Fix it. Fixes: 85ab0452fefc ("arm: add support for PDU001") Reviewed-by: Masahiro Yamada <yamada.masah...@socionext.com> Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- v1->v2: * Added: Reviewed-by: Masahiro Yamada <

[U-Boot] [PATCH v2 3/6] scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9

2018-05-12 Thread Eugeniu Rosca
libfdt: add stringlist functions to linker script Signed-off-by: Rob Herring <r...@kernel.org> [ Linux commit: e45fe7f788dd1395befe5639149ad8dacfbd94ab ] Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- v1->v2: * Newly pushed scripts/dtc/checks.c | 9 + scripts/

Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-12 Thread Eugeniu Rosca
fter the re-sync > > - running the newly imported Kconfig unit tests as seen below: > > I tested whole patch-set with the other options: > make config > make defconfig > make menuconfig > make xconfig > make gconfig > make oldconfig > > > Reviewed-by: Masahiro Ya

Re: [U-Boot] [RFC PATCH 1/2] kconfig: re-sync with Linux 4.17-rc4

2018-05-12 Thread Eugeniu Rosca
Hi Masahiro, On Sat, May 12, 2018 at 01:46:15PM +0900, Masahiro Yamada wrote: > > This seems to happen because the Kbuild updates apparently didn't make > > room for both "*shipped"-based builds and flex/bison-based builds. A > > similar problem has been reported for genksyms parser in v4.17-rc1

[U-Boot] [RFC PATCH 2/2] board: eets: pdu001: Fix wrong default value in Kconfig

2018-05-11 Thread Eugeniu Rosca
the choice This looks to be caused by a typo. Fix it. Fixes: 85ab0452fefc ("arm: add support for PDU001") Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- board/eets/pdu001/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/eets/pdu001/Kconfig b

Re: [U-Boot] [PATCH v2 4/6] scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987

2018-05-13 Thread Eugeniu Rosca
Hi Simon, On Mon, May 14, 2018 at 08:00:40AM +1000, Simon Glass wrote: > Hi, > > On 13 May 2018 at 03:13, Eugeniu Rosca <roscaeuge...@gmail.com> wrote: > > From: Rob Herring <r...@kernel.org> > > > > This adds the following commits from upstream: > >

Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-13 Thread Eugeniu Rosca
On Sun, May 13, 2018 at 10:52:07PM +0900, Masahiro Yamada wrote: > 2018-05-13 4:17 GMT+09:00 Eugeniu Rosca <roscaeuge...@gmail.com>: > > I wonder if Kconfig could avoid printing whitespace in command line > > user dialogs. Then maybe those space characters

Re: [U-Boot] [PATCH 0/8] Initial integration of AVB2.0

2018-05-06 Thread Eugeniu Rosca
Hello Igor, Alex, Kever, Having these patches in mainline would be great, as this would reduce the delta between our own and community U-boot trees. After having a quick look at this series, I have some questions/review findings. These patches appear to be slightly older than what is available

Re: [U-Boot] [PATCH v2 4/6] scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987

2018-05-15 Thread Eugeniu Rosca
Hi Simon, On Mon, May 14, 2018 at 01:52:09PM -0600, Simon Glass wrote: > Hi, > > On 13 May 2018 at 16:45, Eugeniu Rosca <roscaeuge...@gmail.com> wrote: > > Hi Simon, > > > > On Mon, May 14, 2018 at 08:00:40AM +1000, Simon Glass wrote: > >> Hi, >

Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-16 Thread Eugeniu Rosca
Hi Petr, On Wed, May 16, 2018 at 07:09:05AM +0200, Petr Vorel wrote: > Hi Eugeniu, > > > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca <roscaeuge...@gmail.com>: > > > Align Kconfig to Linux 4.17-rc4 with minimal impact on non-kconfig files. > > > > P

Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-19 Thread Eugeniu Rosca
Dear reviewers, Please, have a look at v3 series. TIA! Best regards, Eugeniu. On Wed, May 16, 2018 at 01:27:02PM +0200, Eugeniu Rosca wrote: > Hi Petr, Masahiro, Simon, > > On Wed, May 16, 2018 at 10:24:41AM +0200, Eugeniu Rosca wrote: > > Hi Petr, > > > > On Wed,

[U-Boot] [PATCH v3 6/6] test: dm: Fix wrong aliases property names

2018-05-19 Thread Eugeniu Rosca
/sandbox/dts/test.dtb ---<-snip->--- => ut dm fdt_translation Test: dm_test_fdt_translation: test-fdt.c Test: dm_test_fdt_translation: test-fdt.c (flat tree) Failures: 0 ---<-snip->--- Fixes: e8d5291824e2 ("core: ofnode: Fix translation for #size-cells == 0") Reported-by: Petr Vore

[U-Boot] [PATCH v3 4/6] scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987

2018-05-19 Thread Eugeniu Rosca
- s/_fdt_check_node_offset/fdt_check_node_offset_/ - s/_fdt_check_prop_offset/fdt_check_prop_offset_/ - s/_fdt_find_add_string/fdt_find_add_string_/] Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> Reviewed-by: Simon Glass <s...@chromium.org> Reviewed-by: Masahiro Ya

[U-Boot] [PATCH v3 3/6] scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9

2018-05-19 Thread Eugeniu Rosca
libfdt: add stringlist functions to linker script Signed-off-by: Rob Herring <r...@kernel.org> [ Linux commit: e45fe7f788dd1395befe5639149ad8dacfbd94ab ] Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> Reviewed-by: Simon Glass <s...@chromium.org> Reviewed-by: Masah

[U-Boot] [PATCH v3 2/6] board: eets: pdu001: Fix wrong default value in Kconfig

2018-05-19 Thread Eugeniu Rosca
the choice This looks to be caused by a typo. Fix it. Fixes: 85ab0452fefc ("arm: add support for PDU001") Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> Reviewed-by: Masahiro Yamada <yamada.masah...@socionext.com> --- v2->v3: * No changes. v1->v2: * Added: Revi

Re: [U-Boot] [PATCH v2 3/6] scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9

2018-05-16 Thread Eugeniu Rosca
On Wed, May 16, 2018 at 10:54:04AM +0900, Masahiro Yamada wrote: > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca <roscaeuge...@gmail.com>: > > From: Rob Herring <r...@kernel.org> > > > > Pickup the fix for handling unresolved phandles in overlays. > > > >

Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-16 Thread Eugeniu Rosca
Hi Petr, Masahiro, Simon, On Wed, May 16, 2018 at 10:24:41AM +0200, Eugeniu Rosca wrote: > Hi Petr, > > On Wed, May 16, 2018 at 07:09:05AM +0200, Petr Vorel wrote: > > Hi Eugeniu, > > > > > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca <roscaeuge...@gmail.com>: >

Re: [U-Boot] [PATCH 0/8] Initial integration of AVB2.0

2018-05-15 Thread Eugeniu Rosca
On Sun, May 06, 2018 at 01:31:18PM +0200, Eugeniu Rosca wrote: > Hello Igor, Alex, Kever, > > I wonder if it would be possible to keep the internal libavb headers in > lib/libavb (similar to how it's done by NXP in [4]), since this would > allow not rewriting the origina

Re: [U-Boot] [PATCH 0/8] Initial integration of AVB2.0

2018-05-15 Thread Eugeniu Rosca
Hi Igor, On Tue, May 15, 2018 at 07:58:51PM +0300, Igor Opaniuk wrote: > Hi Eugeniu, > > You're totally right regarding avb internal headers, they all > should remain in lib/libavb. > v2 patchset (planning to send it by the end of this week) will > include these changes you're talking about (+

Re: [U-Boot] [PATCH v3 1/6] kconfig: re-sync with Linux 4.17-rc4

2018-05-21 Thread Eugeniu Rosca
Hi Petr, On Mon, May 21, 2018 at 12:59:09PM +0200, Petr Vorel wrote: > Tested-by: Petr Vorel > Tested whole patch-set, works as expected. > Travis build is also ok: > https://travis-ci.org/pevik/u-boot/builds/381548813 > > > Kind regards, > Petr Thanks! I appreciate

Re: [U-Boot] [PATCH] dlmalloc: ensure gd is set for early free

2018-05-23 Thread Eugeniu Rosca
Hi Stephen, On Wed, May 23, 2018 at 01:32:53PM -0600, Stephen Warren wrote: > On 05/23/2018 01:07 PM, Eugeniu Rosca wrote: > >This fix seems to be a twin of v2015.01 commit 854d2b9753e4 ("dlmalloc: > >ensure gd is set for early alloc"). Here is a gdb backtrace to ma

Re: [U-Boot] [PATCH v3 6/6] test: dm: Fix wrong aliases property names

2018-05-26 Thread Eugeniu Rosca
Hi Simon, On Fri, May 25, 2018 at 08:07:37PM -0600, Simon Glass wrote: > Hi, > > On 24 May 2018 at 16:04, Eugeniu Rosca <roscaeuge...@gmail.com> wrote: > > Besides the above, it is not clear to me if your Reviewed-by applies to > > to this patch partially (since

Re: [U-Boot] [PATCH v3 6/6] test: dm: Fix wrong aliases property names

2018-05-24 Thread Eugeniu Rosca
Hi Simon, On Tue, May 22, 2018 at 05:30:40PM -0600, Simon Glass wrote: > Hi Eugeniu, > > On 19 May 2018 at 06:13, Eugeniu Rosca <roscaeuge...@gmail.com> wrote: --snip-- > > v2->v3: > > * Fixed an issue in the test code (test/dm/test-fdt.c) generated by the >

[U-Boot] [PATCH] dlmalloc: ensure gd is set for early free

2018-05-23 Thread Eugeniu Rosca
-00280-g5755c9e48b83 (May 23 2018 - 20:53:31) DRAM: 128 MiB Using default environment In:serial Out: lcd Err: lcd => Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- common/dlmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/dlmallo

Re: [U-Boot] [PATCH v3 2/6] board: eets: pdu001: Fix wrong default value in Kconfig

2018-05-22 Thread Eugeniu Rosca
Hi Felix, On Tue, May 22, 2018 at 10:07:58AM +0200, Felix Brack wrote: > Hi Eugeniu, > > On 19.05.2018 14:13, Eugeniu Rosca wrote: > > After importing linux v4.16-rc1 commit 2c37e08464a8 ("kconfig: Warn if > > choice default is not in choice"), Kconfig complains

Re: [U-Boot] [PATCH v2 1/3] efi: Fix truncation of constant value

2018-08-01 Thread Eugeniu Rosca
Hello Tom, Simon, Alexander, Heinrich, On Wed, Jul 25, 2018 at 03:30:16PM +0200, Eugeniu Rosca wrote: > Hello Alexander, > > Heinrich was kind to have a look at [1] and already provided his > Reviewed-by. Could you please state your further expectations to accept > the patches?

Re: [U-Boot] [PATCH v2 1/3] efi: Fix truncation of constant value

2018-08-08 Thread Eugeniu Rosca
Hello Tom, Alexander, On Wed, Aug 01, 2018 at 01:25:54PM +0200, Eugeniu Rosca wrote: > Hello Tom, Simon, Alexander, Heinrich, > > On Wed, Jul 25, 2018 at 03:30:16PM +0200, Eugeniu Rosca wrote: > > Hello Alexander, > > > > Heinrich was kind to have a look at [

Re: [U-Boot] [PATCH v3 0/7] Fixes/Addition to use the USB Ethernet gadget with the DWC3 gadget controller

2018-08-08 Thread Eugeniu Rosca
Hello, FWIW, patch "[7/7] cmd: Add bind/unbind commands to bind a device to a driver from the command line" contributes with a compiler warning, as described in https://patchwork.ozlabs.org/patch/933310/#1952127 . Best regards, Eugeniu. On Wed, Aug 8, 2018 at 8:36 AM Michal Simek wrote: > > Hi

Re: [U-Boot] [PATCH v3 0/7] Fixes/Addition to use the USB Ethernet gadget with the DWC3 gadget controller

2018-08-08 Thread Eugeniu Rosca
On Wed, Aug 8, 2018 at 6:18 PM Jean-Jacques Hiblot wrote: > On 08/08/2018 15:08, Eugeniu Rosca wrote: [snip] > > I think having a warning-free build is a basic policy everybody is > > expected to comply with. > I agree. I meant that it could be fixed at the time of the commit b

[U-Boot] [PATCH 6/7] common: avb_verify: Fix never-occurring avb_free(ops_data)

2018-08-13 Thread Eugeniu Rosca
Cppcheck (v1.85) reports w/o this patch: [common/avb_verify.c:738] -> [common/avb_verify.c:741]: (warning) \ Either the condition 'ops' is redundant or there is possible null \ pointer dereference: ops. Signed-off-by: Eugeniu Rosca --- common/avb_verify.c | 2 +- 1 file changed

[U-Boot] [PATCH 3/7] common: kconfig: Mark AVB_VERIFY as dependent on PARTITION_UUIDS

2018-08-13 Thread Eugeniu Rosca
rify.o] Error 1 [1] aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) [2] r8a7795_ulcb_defconfig, plus: CONFIG_AVB_VERIFY=y CONFIG_PARTITION_UUIDS=y CONFIG_UDP_FUNCTION_FASTBOOT=y CONFIG_LIBAVB=y Signed-off-by: Eugeniu Rosca --- common/Kconfig | 1 + 1 file changed, 1 insertion(+)

[U-Boot] [PATCH 5/7] common: avb_verify: Fix memory leaks

2018-08-13 Thread Eugeniu Rosca
Cppcheck (v1.85) reports w/o this patch: [common/avb_verify.c:351]: (error) Memory leak: part [common/avb_verify.c:356]: (error) Memory leak: part [common/avb_verify.c:361]: (error) Memory leak: part [common/avb_verify.c:366]: (error) Memory leak: part Signed-off-by: Eugeniu Rosca --- common

[U-Boot] [PATCH 7/7] common: avb_verify: Fix division by zero in mmc_byte_io()

2018-08-13 Thread Eugeniu Rosca
UMMARY: AddressSanitizer: FPE common/avb_verify.c:407 in mmc_byte_io ==9388==ABORTING Signed-off-by: Eugeniu Rosca --- common/avb_verify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/avb_verify.c b/common/avb_verify.c index 3d2b4cbad92d..759df7bd25c0 100644 --- a/common/avb_verify.c +++ b/

[U-Boot] [PATCH 2/7] common: avb_verify: Fix invalid 'for' loop condition

2018-08-13 Thread Eugeniu Rosca
.11) Signed-off-by: Eugeniu Rosca --- common/avb_verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index 20e35ade3029..e6f3f207ff6f 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -176,7 +176,7 @@ static int avb_find_dm_a

[U-Boot] [PATCH 4/7] common: avb_verify: Make local data static

2018-08-13 Thread Eugeniu Rosca
Fix sparse complaint: common/avb_verify.c:14:21: warning: \ symbol 'avb_root_pub' was not declared. Should it be static? Signed-off-by: Eugeniu Rosca --- common/avb_verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index

[U-Boot] [PATCH 1/7] libavb: Handle wrong hashtree_error_mode in avb_append_options()

2018-08-13 Thread Eugeniu Rosca
slot_data, "androidboot.veritymode", verity_mode)) { Signed-off-by: Ievgen Maliarenko Signed-off-by: Eugeniu Rosca --- lib/libavb/avb_cmdline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libavb/avb_cmdline.c b/lib/libavb/avb_cmdline.c index 91a6615c740d..d24669

Re: [U-Boot] [PATCH 3/7] common: kconfig: Mark AVB_VERIFY as dependent on PARTITION_UUIDS

2018-08-16 Thread Eugeniu Rosca
Hi Igor, First, thanks for the reviews! On Thu, Aug 16, 2018 at 11:38:18AM +0300, Igor Opaniuk wrote: > Hi Eugeniu, > > Why not keep all dependencies on the same line in this case? Simply: > depends LIBAVB && FASTBOOT && PARTITION_UUIDS I guess it's a matter of personal preference (but maybe

Re: [U-Boot] [PATCH 4/7] common: avb_verify: Make local data static

2018-08-16 Thread Eugeniu Rosca
On Thu, Aug 16, 2018 at 12:07:25PM +0300, Igor Opaniuk wrote: > Hi Eugeniu, > thanks for fixing this! > > BTW, I plan to replace this workaround with hardcoded public RSA key > for verification of vbmeta image signature, > and an option to store it in RPMB using AVB TA/OP-TEE instead, just >

Re: [U-Boot] [PATCH v3 0/7] Fixes/Addition to use the USB Ethernet gadget with the DWC3 gadget controller

2018-08-08 Thread Eugeniu Rosca
On Wed, Aug 8, 2018 at 11:58 AM Michal Simek wrote: > > On 8.8.2018 11:17, Eugeniu Rosca wrote: > > Hello, > > > > FWIW, patch "[7/7] cmd: Add bind/unbind commands to bind a device to a > > driver from the command line" contributes with a com

Re: [U-Boot] [PATCH v3 0/7] Fixes/Addition to use the USB Ethernet gadget with the DWC3 gadget controller

2018-08-08 Thread Eugeniu Rosca
On Wed, Aug 8, 2018 at 1:36 PM Jean-Jacques Hiblot wrote: > > Hi all, > > > On 08/08/2018 11:17, Eugeniu Rosca wrote: > > Hello, > > > > FWIW, patch "[7/7] cmd: Add bind/unbind commands to bind a device to a > > driver from the command line" cont

Re: [U-Boot] [PATCH v3 0/7] Fixes/Addition to use the USB Ethernet gadget with the DWC3 gadget controller

2018-08-08 Thread Eugeniu Rosca
On Wed, Aug 8, 2018 at 6:54 PM Tom Rini wrote: > > On Wed, Aug 08, 2018 at 06:44:07PM +0200, Eugeniu Rosca wrote: > > On Wed, Aug 8, 2018 at 6:18 PM Jean-Jacques Hiblot wrote: > > > On 08/08/2018 15:08, Eugeniu Rosca wrote: > > [snip] > > > > I think having

Re: [U-Boot] [PATCH v2 1/3] efi: Fix truncation of constant value

2018-08-17 Thread Eugeniu Rosca
On Fri, Aug 17, 2018 at 06:48:52AM -0600, Simon Glass wrote: > I believe Alex should pick these up. > > Regards, > Simon Thanks, Simon! I then look forward for some feedback from Alex. Best regards, Eugeniu. ___ U-Boot mailing list

Re: [U-Boot] [PATCH 1/8] UBSAN: run-time undefined behavior sanity checker

2018-08-20 Thread Eugeniu Rosca
On Mon, Aug 20, 2018 at 03:00:31PM +, York Sun wrote: > On 08/19/2018 05:04 PM, Eugeniu Rosca wrote: > > > > > The size increase of sanbox U-Boot (gcc 8.1.0): > > $ size u-boot.sandbox.* > >textdata bss dec hex filename > > 1234958

Re: [U-Boot] [PATCH 4/8] pinctrl: renesas: Fix "left shift in type int" undefined behavior

2018-08-20 Thread Eugeniu Rosca
Hi Marek, On Mon, Aug 20, 2018 at 10:07:16AM +0200, Marek Vasut wrote: > On 08/20/2018 02:00 AM, Eugeniu Rosca wrote: > > Booting R-Car H3-Salvator-X (CONFIG_UBSAN=y) consistently results in: > > > > =

[U-Boot] [PATCH v2 00/13] Import Undefined Behavior Sanitizer

2018-08-26 Thread Eugeniu Rosca
.c:28:26 load of address 0075f180 with insufficient space for an object of type 'char *' ========= Eugeniu Rosca (13): UBSAN: run-time undefined behavior sanity checker mmc: Fix signed shift overflow armv8: mmu: Fix signed shift overflow p

[U-Boot] [PATCH v2 01/13] UBSAN: run-time undefined behavior sanity checker

2018-08-26 Thread Eugeniu Rosca
onfig * qemu-system-arm * ARM64: * aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) * r8a7795_salvator-x_defconfig * R-Car H3 ES2.0 Salvator-X board * PPC: * powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) * qemu-ppce500_defconfig * qemu-system-ppc Any defconfig update (UBSAN=y

[U-Boot] [PATCH v2 10/13] mmc: Fix read-past-end-of-array

2018-08-26 Thread Eugeniu Rosca
accordingly. Fixes: 272cc70b211e ("Add MMC Framework") Signed-off-by: Eugeniu Rosca --- Changes in v2: - Shorten the summary line --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 447519f46f15..01da99edb084 1

[U-Boot] [PATCH v2 02/13] mmc: Fix signed shift overflow

2018-08-26 Thread Eugeniu Rosca
' === Fixes: 272cc70b211e ("Add MMC Framework") Signed-off-by: Eugeniu Rosca --- Changes in v2: - Shorten the summary line --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ad

[U-Boot] [PATCH v2 03/13] armv8: mmu: Fix signed shift overflow

2018-08-26 Thread Eugeniu Rosca
R1 maps in EL1") Signed-off-by: Eugeniu Rosca --- Changes in v2: - Shorten the summary line - Use (1UL << i) instead of BIT() macro for consistency --- arch/arm/include/asm/armv8/mmu.h | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) d

[U-Boot] [PATCH v2 06/13] net: ravb: Fix signed shift overflow

2018-08-26 Thread Eugeniu Rosca
Add Renesas Ethernet RAVB driver") Signed-off-by: Eugeniu Rosca Acked-by: Marek Vasut --- Changes in v2: - Shorten the summary line - Add "Acked-by: Marek Vasut " --- drivers/net/ravb.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dri

[U-Boot] [PATCH v2 04/13] pinctrl: renesas: Fix signed shift overflow

2018-08-26 Thread Eugeniu Rosca
' = While fixing these warnings, convert *all* SH_PFC_PIN_CFG_* definitions to use the recommended BIT() macro. Fixes: 910df4d07e37 ("pinctrl: rmobile: Add Renesas RCar pincontrol driver") Signed-off-by: Eugeniu Rosca Acked-by: Marek Vasut --- Changes in v2:

[U-Boot] [PATCH v2 11/13] hashtable: Fix zero-sized array

2018-08-26 Thread Eugeniu Rosca
Inspired from v4.11-rc1 commit 620711944459 ("crypto: algif_hash - avoid zero-sized array"), which fixes the same type of UB. Fixes: d5370febbcbc ("env: delete selected vars not present in imported env") Signed-off-by: Eugeniu Rosca --- Changes in v2: - Switch to a more el

[U-Boot] [PATCH v2 09/13] common.h: Fix signed shift overflow in cpumask_next()

2018-08-26 Thread Eugeniu Rosca
add support for discontiguous cores") Signed-off-by: Eugeniu Rosca --- Changes in v2: - None. Newly pushed. --- include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common.h b/include/common.h index 940161f1758b..5b92666d0e79 100644 --- a/include/common

[U-Boot] [PATCH v2 05/13] net: phy: Fix signed shift overflow

2018-08-26 Thread Eugeniu Rosca
r). Fixes: 1adb406b0141 ("phy: add phy_find_by_mask/phy_connect_dev") Signed-off-by: Eugeniu Rosca --- Changes in v2: - Shorten the summary line. Rephrase/rewrap the description. --- drivers/net/phy/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net

[U-Boot] [PATCH 6/8] net: ravb: Fix "left shift in type int" undefined behavior

2018-08-19 Thread Eugeniu Rosca
ted in type 'int' = host 192.168.2.11 is alive There are two issues behind: - calculating RAVB_DESC_DT_* bitfields - assembling MAC address from its char components Fix both. Fixes: 8ae51b6f324e ("net: ravb: Add Renesas Ethernet RAVB driver") Si

[U-Boot] [PATCH 4/8] pinctrl: renesas: Fix "left shift in type int" undefined behavior

2018-08-19 Thread Eugeniu Rosca
' = While fixing these warnings, convert *all* SH_PFC_PIN_CFG_* definitions to use the recommended BIT() macro. Fixes: 910df4d07e37 ("pinctrl: rmobile: Add Renesas RCar pincontrol driver") Signed-off-by: Eugeniu Rosca --- drivers/pinctrl/renesas/sh_pfc.h | 14 +++-

[U-Boot] [PATCH 8/8] hashtable: Fix zero-sized array undefined behavior

2018-08-19 Thread Eugeniu Rosca
Fix the error by making sure that localvars[] can't take a negative or zero size. Fixes: d5370febbcbc ("env: delete selected vars not present in imported env") Signed-off-by: Eugeniu Rosca --- include/search.h | 2 +- lib/hashtable.c | 4 ++-- 2 files changed, 3 insertions(+), 3 delet

[U-Boot] [PATCH 7/8] mmc: Fix read-past-end-of-array undefined behavior

2018-08-19 Thread Eugeniu Rosca
Fixes: 272cc70b211e ("Add MMC Framework") Signed-off-by: Eugeniu Rosca --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 447519f46f15..01da99edb084 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@

[U-Boot] [PATCH 5/8] net: phy: Fix "left shift in type int" undefined behavior

2018-08-19 Thread Eugeniu Rosca
undefined behavior). Fixes: 1adb406b0141 ("phy: add phy_find_by_mask/phy_connect_dev") Signed-off-by: Eugeniu Rosca --- drivers/net/phy/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e837eb7688cc..0a8df72a495f

[U-Boot] [PATCH 1/8] UBSAN: run-time undefined behavior sanity checker

2018-08-19 Thread Eugeniu Rosca
92 0 +379944 The size increase of H3 Salvator-X U-Boot (aarch64-linux-gnu-gcc 7.2.1): $ size u-boot.r8a7795-salvator-x.* text data bss dec hex filename 589954 23504 263984 877442 d6382 u-boot.r8a7795-salvator-x.default 810968 103304 263984 1178256 11fa90 u-boot.r8

[U-Boot] [PATCH 2/8] mmc: Fix "left shift in type int" undefined behavior

2018-08-19 Thread Eugeniu Rosca
' === Fixes: 272cc70b211e ("Add MMC Framework") Signed-off-by: Eugeniu Rosca --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ad429f49c992..447519f46f15 100644 --- a/drivers/mmc/m

[U-Boot] [PATCH 0/8] Import Undefined Behavior Sanitizer

2018-08-19 Thread Eugeniu Rosca
type 'char *' ===== Eugeniu Rosca (8): UBSAN: run-time undefined behavior sanity checker mmc: Fix "left shift in type int" undefined behavior armv8: mmu: Fix "left shift in type int" undefined behavior pinctrl: renesas: Fix "left shift in type int" undefined behavior

[U-Boot] [PATCH 3/8] armv8: mmu: Fix "left shift in type int" undefined behavior

2018-08-19 Thread Eugeniu Rosca
u: Set bits marked RES1 in TCR") Fixes: 9bb367a590fe ("arm64: Disable TTBR1 maps in EL1") Signed-off-by: Eugeniu Rosca --- arch/arm/include/asm/armv8/mmu.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm

Re: [U-Boot] [PATCH 1/8] UBSAN: run-time undefined behavior sanity checker

2018-08-20 Thread Eugeniu Rosca
Hi Tom, On Sun, Aug 19, 2018 at 09:51:32PM -0400, Tom Rini wrote: > On Mon, Aug 20, 2018 at 02:00:25AM +0200, Eugeniu Rosca wrote: [..] > > To enable UBSAN, two prerequisites must be met from Kconfig perspective: > > - ARCH has to select CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL >

Re: [U-Boot] [PATCH 3/8] armv8: mmu: Fix "left shift in type int" undefined behavior

2018-08-20 Thread Eugeniu Rosca
Hi Tom, On Sun, Aug 19, 2018 at 09:51:42PM -0400, Tom Rini wrote: > On Mon, Aug 20, 2018 at 02:00:27AM +0200, Eugeniu Rosca wrote: [..] > > diff --git a/arch/arm/include/asm/armv8/mmu.h > > b/arch/arm/include/asm/armv8/mmu.h > > index 62d00d15c26d..b2ce13db0d2b 100644 >

Re: [U-Boot] [PATCH v2 06/13] net: ravb: Fix signed shift overflow

2018-08-27 Thread Eugeniu Rosca
Hi Marek, On Mon, Aug 27, 2018 at 01:22:54AM +0200, Marek Vasut wrote: > On 08/27/2018 01:13 AM, Eugeniu Rosca wrote: [...] > > > > #define RAVB_DESC_DT(n)((n) << 28) > > What about changing this instead, ((u32)(n) << 28) ? This works

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-08-28 Thread Eugeniu Rosca
Hi Bin, cc: Masahiro, Andrey On Tue, Aug 28, 2018 at 10:05:51AM +0800, Bin Meng wrote: > Hi Eugeniu, > > On Mon, Aug 27, 2018 at 7:19 AM Eugeniu Rosca wrote: > > > > Fix the following UBSAN report: > > ==

[U-Boot] [PATCH v2 13/13] configs: sandbox*: Enable UBSAN

2018-08-26 Thread Eugeniu Rosca
0 +379944 Signed-off-by: Eugeniu Rosca --- Changes in v2: - None. Newly pushed. --- configs/sandbox64_defconfig| 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1 + configs/sandbox_noblk_defconfig| 1 + configs/sandbox_spl_defconfig | 1 + 5

[U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-08-26 Thread Eugeniu Rosca
("x86: Import MSR/MTRR code from Linux") Signed-off-by: Eugeniu Rosca --- Changes in v2: - None. Newly pushed. --- arch/x86/include/asm/msr-index.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h in

[U-Boot] [PATCH v2 12/13] input: Fix zero-sized array

2018-08-26 Thread Eugeniu Rosca
sized array"). Fixes: 9bc590e5119f ("input: Add generic keyboard input handler") Signed-off-by: Eugeniu Rosca --- Changes in v2: - None. Newly pushed. --- drivers/input/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/input.c b/drivers/input/

[U-Boot] [PATCH v2 08/13] disk: part_dos: Fix signed shift overflow

2018-08-26 Thread Eugeniu Rosca
06cdba ("Initial revision") Signed-off-by: Eugeniu Rosca --- Changes in v2: - None. Newly pushed. --- disk/part_dos.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 936cee0d36ce..e19695846a95 100644 --- a/disk/part_

Re: [U-Boot] [PATCH] efi.h: Fix truncation of constant value

2018-07-14 Thread Eugeniu Rosca
Hi Heinrich, Many thanks for quick and useful comments. I've implemented your suggestions in v2. TIA for review. Best regards, Eugeniu. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

[U-Boot] [PATCH v2 2/3] efi: Add EFI_MEMORY_{NV, MORE_RELIABLE, RO} attributes

2018-07-14 Thread Eugeniu Rosca
With this update, the memory attributes are in sync with Linux kernel v4.18-rc4. They also match page 190 of UEFI 2.7 spec [1]. [1] http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf Suggested-by: Heinrich Schuchardt Signed-off-by: Eugeniu Rosca --- v2: - Newly added cmd

[U-Boot] [PATCH v2 1/3] efi: Fix truncation of constant value

2018-07-14 Thread Eugeniu Rosca
30340 280076 757469b8edd u-boot.new -22 +32 0 +10 Fixes: 867a6ac86dd8 ("efi: Add start-up library code") Suggested-by: Heinrich Schuchardt Signed-off-by: Eugeniu Rosca --- v2: - Replace _SHIFT enum values by ULL defines to match UEFI 2.7 spec - Add ELF size compariso

[U-Boot] [PATCH v2 3/3] cmd: efi: Clarify calculation precedence for '&' and '?'

2018-07-14 Thread Eugeniu Rosca
Fix cppcheck complaint: [cmd/efi.c:173]: (style) Clarify calculation precedence for '&' and '?'. Fixes: f1a0bafb5802 ("efi: Add a command to display the memory map") Signed-off-by: Eugeniu Rosca --- v2: - newly added cmd/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [U-Boot] [PATCH v2 1/2] avb2.0: add proper dependencies

2018-07-17 Thread Eugeniu Rosca
perations. > > Reported-by: Eugeniu Rosca > Signed-off-by: Igor Opaniuk > --- > cmd/Kconfig | 2 +- > common/Kconfig | 10 ++ > common/Makefile | 2 +- > doc/README.avb2 | 1 + > 4 files changed, 13 insertions(+), 2 deletions(-) With this patch I am now able to c

Re: [U-Boot] [PATCH v2 2/2] avb2.0: use block API in AVB ops

2018-07-17 Thread Eugeniu Rosca
c: In function ‘mmc_read_and_flush’: common/avb_verify.c:291:18: error: ‘struct mmc’ has no member named ‘block_dev’ blks = part->mmc->block_dev.block_read(part->mmc_blk, ^~ common/avb_verify.c: In function ‘mmc_write’: common/avb_verify.c:330:18: error: ‘struct mmc’ h

Re: [U-Boot] [PATCH v2 1/1] avb2.0: add get_size_of_partition()

2018-07-17 Thread Eugeniu Rosca
On Tue, Jul 17, 2018 at 02:44:17PM +0300, Igor Opaniuk wrote: > Implement get_size_of_partition() operation, > which is required by the latest upstream libavb [1]. FWIW, any living repository is a moving target, so there is nothing more volatile than the "latest" state of such repository. Kind

Re: [U-Boot] [PATCH v2 1/3] efi: Fix truncation of constant value

2018-07-16 Thread Eugeniu Rosca
Hi Heinrich, Thanks for your review comments. See my reply below. On Mon, Jul 16, 2018 at 07:52:20AM +0200, Heinrich Schuchardt wrote: [--snip--] > > diff --git a/include/efi.h b/include/efi.h > > index 0fe15e65c06c..eb2a569fe010 100644 > > --- a/include/efi.h > > +++ b/include/efi.h > > @@

Re: [U-Boot] [PATCH v2 1/3] efi: Fix truncation of constant value

2018-07-25 Thread Eugeniu Rosca
Hello Alexander, Heinrich was kind to have a look at [1] and already provided his Reviewed-by. Could you please state your further expectations to accept the patches? [1] https://patchwork.ozlabs.org/patch/944004/ Thanks, Eugeniu. ___ U-Boot mailing

Re: [U-Boot] [PATCH 1/2] avb2.0: add proper dependencies

2018-07-14 Thread Eugeniu Rosca
; re-used in partition verification operations. > > Reported-by: Eugeniu Rosca > Signed-off-by: Igor Opaniuk > --- > cmd/Kconfig | 2 +- > common/Kconfig | 7 +++ > doc/README.avb2 | 1 + > 3 files changed, 9 insertions(+), 1 deletion(-) > > diff

[U-Boot] [PATCH] efi.h: Fix truncation of constant value

2018-07-14 Thread Eugeniu Rosca
tart-up library code") Signed-off-by: Eugeniu Rosca --- include/efi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/efi.h b/include/efi.h index 0fe15e65c06c..3e3f23b42f8a 100644 --- a/include/efi.h +++ b/include/efi.h @@ -172,11 +172,11 @@ enum {

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-01 Thread Eugeniu Rosca
Hi there, On Tue, Aug 28, 2018 at 08:42:01AM +0200, Eugeniu Rosca wrote: > Hi Bin, > > cc: Masahiro, Andrey > > On Tue, Aug 28, 2018 at 10:05:51AM +0800, Bin Meng wrote: > > Hi Eugeniu, > > > > On Mon, Aug 27, 2018 at 7:19 AM Eugeniu Rosca > > wro

Re: [U-Boot] [PATCH 1/1] avb2.0: add proper dependencies to libavb

2018-07-12 Thread Eugeniu Rosca
protocol for downloads) > 2. !CONFIG_BLK, as current implementation currently > doesn't support non-legacy block API. > > Reported-by: Eugeniu Rosca > Signed-off-by: Igor Opaniuk > --- > lib/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --

Re: [U-Boot] [PATCH v3 7/7] cmd: Add bind/unbind commands to bind a device to a driver from the command line

2018-07-11 Thread Eugeniu Rosca
Hi, On Fri, Jun 22, 2018 at 02:25:34PM +0200, Jean-Jacques Hiblot wrote: > +static int do_bind_unbind(cmd_tbl_t *cmdtp, int flag, int argc, > + char * const argv[]) > +{ > + int ret; > + bool bind; > + bool by_node; > + > + if (argc < 2) > +

Re: [U-Boot] [PATCH 1/1] avb2.0: add get_size_of_partition()

2018-07-09 Thread Eugeniu Rosca
On Mon, Jul 09, 2018 at 03:15:54PM +0300, Igor Opaniuk wrote: > Implement get_size_of_partition() operation, > which is required by the latest upstream libavb [1]. > > [1] https://android.googlesource.com/platform/external/avb/+/master/README.md > > Signed-off-by: Igor Opaniuk > --- >

[U-Boot] [PATCH] lib/rsa: Kconfig: Remove superfluous 'depends on RSA'

2018-04-21 Thread Eugeniu Rosca
_RSA. This tidies up and simplifies reading of lib/rsa/Kconfig. No functional change intended. Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> --- lib/rsa/Kconfig | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig index fde1ac108d0f..2b3

Re: [U-Boot] [RFC] ARM: rmobile: create DT memory nodes for R8A7795 3.0 and newer

2018-06-28 Thread Eugeniu Rosca
Hi Marek, All, I am looking forward for the solution/approach you are going to reach in this thread. Currently, integrating Renesas Yocto v3.7.0 release [1], I can see that the increase of SoC/SiP versions supported in this release increases the number of ATF/U-boot build variants dramatically.

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-10-08 Thread Eugeniu Rosca
Hi Bin, On Tue, Sep 25, 2018 at 10:06:52AM +0800, Bin Meng wrote: > Hi Eugeniu, > > On Sun, Sep 23, 2018 at 7:10 AM Eugeniu Rosca wrote: > > > > Hi Bin, > > > > jFYI, I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87392 > > ("UBSAN b

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-22 Thread Eugeniu Rosca
Hi Bin, jFYI, I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87392 ("UBSAN behavior on left-shifting 1 into the sign bit is dependent on C standard"), to get some recommendation from GCC guys how to handle these warnings in U-Boot. Regards, Eugeniu.

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-16 Thread Eugeniu Rosca
Hi Bin, Apologize for the delay. I came back from vacation a few days ago. On Tue, Sep 04, 2018 at 12:00:14PM +0800, Bin Meng wrote: > Hi Eugeniu, > > On Sat, Sep 1, 2018 at 6:59 PM Eugeniu Rosca wrote: [..] > > Just wanted to let you know that coreboot folks are going thro

Re: [U-Boot] [PATCH v2 13/13] configs: sandbox*: Enable UBSAN

2018-09-17 Thread Eugeniu Rosca
Hi Simon, On Wed, Aug 29, 2018 at 08:51:24PM -0600, Simon Glass wrote: > Hi, > > On 26 August 2018 at 17:13, Eugeniu Rosca wrote: > > On Sun, Aug 19, 2018 at 09:51:32PM -0400, Tom Rini wrote: > >> [..] we should be able to say more broadly that just about everyone > &

Re: [U-Boot] [5/5] arm: ti: boot: Implement Android boot using DT image format

2019-03-29 Thread Eugeniu Rosca
Hi Sam, On Fri, Mar 29, 2019 at 05:20:33PM +0200, Sam Protsenko wrote: > Hi Eugeniu, [..] > Just checked in AOSP/master, seems like the feature is there, it's > called "dump". > > $ mkdtimg dump dtbo.img --dtb filename > > For details see: > > $ mkdtimg help dump > > mkdtimg dump

  1   2   3   4   >