Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Simon Goldschmidt
On 13.11.2018 20:53, Simon Glass wrote: Hi Allan, On 12 November 2018 at 18:38, Allan Chandler wrote: Hello, bods. We're trying to architect a relatively safe solution for updating UBoot in the field. What we have at the moment is an iMX6-based board with two UBoot partitions and two

Re: [U-Boot] CVE-2018-18439, CVE-2018-18440 - U-Boot verified boot bypass vulnerabilities

2018-11-14 Thread Simon Goldschmidt
On 14.11.2018 16:51, Simon Goldschmidt wrote: On 14.11.2018 16:35, Daniele Bianco wrote: On Wed, Nov 14, 2018 at 04:26:17PM +0100, Andrea Barisani wrote: On Wed, Nov 14, 2018 at 04:13:00PM +0100, Simon Goldschmidt wrote: On 14.11.2018 15:45, Andrea Barisani wrote: On Wed, Nov 14, 2018 at 01

Re: [U-Boot] configs: move CONFIG_SPL_TEXT_BASE to Kconfig

2018-11-14 Thread Simon Goldschmidt
On 07.10.2018 02:49, Tom Rini wrote: On Sun, Sep 30, 2018 at 02:31:53PM +0200, Simon Goldschmidt wrote: Moved CONFIG_SPL_TEXT_BASE to common/spl/Kconfig with help from moveconfig.py (only had to prepare socfpga, stm32f746 and am33x/43x manually) Signed-off-by: Simon Goldschmidt

Re: [U-Boot] arm: socfpga gen5: warm reboot reliability

2018-11-14 Thread Simon Goldschmidt
On 14.11.2018 21:51, Marek Vasut wrote: On 11/14/2018 09:30 PM, Simon Goldschmidt wrote: Hi, Hi, [This whole description is not qspi specific but qspi happens to be my boot source. It should be the same when booting from mmc or nand.] On my socfgpa gen5 board, I was a little surprised

Re: [U-Boot] [PATCH] arm: socfpga: check total size of SPL

2018-11-02 Thread Simon Goldschmidt
Am Fr., 2. Nov. 2018, 01:08 hat Marek Vasut geschrieben: > On 11/01/2018 08:26 PM, Simon Goldschmidt wrote: > > On 31.10.2018 11:00, Marek Vasut wrote: > >> On 10/31/2018 06:44 AM, Simon Goldschmidt wrote: > >>> On Tue, Oct 30, 2018 at 11:02 PM Marek Vasut > &

[U-Boot] [PATCH v4] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-09 Thread Simon Goldschmidt
This patch prevents disabling the FPGA bridges when SPL or U-Boot is executed from FPGA onchip RAM. Signed-off-by: Simon Goldschmidt --- Changes in v4: - use an inline function in misc.h to check for the address range instead of a macro in base_addr_ac5.h Changes in v3: - use

Re: [U-Boot] [PATCH] debug uart: don't print before initialization

2018-10-08 Thread Simon Goldschmidt
On Tue, Oct 9, 2018 at 5:41 AM Simon Glass wrote: > > Hi, > > On 7 October 2018 at 11:52, Simon Goldschmidt > wrote: > > At least on socfpga gen5, _debug_uart_putc() can be called > > before debug_uart_init(), which leaves us stuck in an > > infinite loop

Re: [U-Boot] [PATCH v2] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-09 Thread Simon Goldschmidt
On Tue, Oct 9, 2018 at 4:49 AM Marek Vasut wrote: > > On 10/08/2018 08:26 PM, Simon Goldschmidt wrote: > > This patch prevents disabling the FPGA bridges when > > SPL or U-Boot is executed from FPGA onchip RAM. > > > > Signed-off-by: Simon Goldschmidt > >

Re: [U-Boot] [PATCH v4] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-10 Thread Simon Goldschmidt
On Wed, Oct 10, 2018 at 12:21 PM Marek Vasut wrote: > > On 10/10/2018 06:26 AM, Simon Goldschmidt wrote: > > This patch prevents disabling the FPGA bridges when > > SPL or U-Boot is executed from FPGA onchip RAM. > > > > Signed-off-by: Simon Goldschmidt > >

Re: [U-Boot] [PATCH] debug uart: don't print before initialization

2018-10-10 Thread Simon Goldschmidt
+ Marek (as he commented on the original patch http://patchwork.ozlabs.org/patch/955765/) On 09.10.2018 07:06, Simon Goldschmidt wrote: On Tue, Oct 9, 2018 at 5:41 AM Simon Glass wrote: Hi, On 7 October 2018 at 11:52, Simon Goldschmidt wrote: At least on socfpga gen5, _debug_uart_putc

[U-Boot] [PATCH v5] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-10 Thread Simon Goldschmidt
This patch prevents disabling the FPGA bridges when SPL or U-Boot is executed from FPGA onchip RAM. Signed-off-by: Simon Goldschmidt --- Changes in v5: - changed inline function 'socfpga_is_fpga_slaves_addr(addr)' to 'socfpga_is_booting_from_fpga()' Changes in v4: - use an inline function

Re: [U-Boot] [PATCH v4] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-10 Thread Simon Goldschmidt
On Wed, Oct 10, 2018 at 12:50 PM Marek Vasut wrote: > > On 10/10/2018 12:49 PM, Marek Vasut wrote: > > On 10/10/2018 12:32 PM, Simon Goldschmidt wrote: > >> On Wed, Oct 10, 2018 at 12:21 PM Marek Vasut wrote: > >>> > >>> On 10/10/2018 06:26 AM, Simon

Re: [U-Boot] [PATCH] debug uart: don't print before initialization

2018-10-10 Thread Simon Goldschmidt
On Wed, Oct 10, 2018 at 10:03 PM Simon Glass wrote: > > Hi Simon, > > On 10 October 2018 at 07:28, Simon Goldschmidt > wrote: > > > > + Marek (as he commented on the original patch > > http://patchwork.ozlabs.org/patch/955765/) > > > >

Re: [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation

2018-10-06 Thread Simon Goldschmidt
e selected address. Signed-off-by: Michal Simek I needed to apply this to boot my socfpga cyclone5 from FPGA (both SPL and U-Boot in FPGA onchip RAM). Tested-by: Simon Goldschmidt --- Lines are unfortunatelly longer then 80 char limits but there is no nice way how to fix it. --- common/spl

Re: [U-Boot] [PATCH] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-07 Thread Simon Goldschmidt
On 06.10.2018 22:38, Tom Rini wrote: On Sat, Oct 06, 2018 at 10:33:42PM +0200, Simon Goldschmidt wrote: This patch prevents disabling the FPGA bridges when SPL or U-Boot is executed from FPGA onchip RAM. Signed-off-by: Simon Goldschmidt --- There are other patches required to make boot

Re: [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation

2018-10-06 Thread Simon Goldschmidt
On 06.10.2018 17:29, Simon Goldschmidt wrote: On 04.10.2018 09:29, Michal Simek wrote: The patch: "spl: Weed out CONFIG_SYS_TEXT_BASE usage" (sha1: 04ce5427bd3914cab8be78513275a20ab878520a) introduced bug where assigning to u_boot_pos variable wasn't done which end up in situation

[U-Boot] [PATCH] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-06 Thread Simon Goldschmidt
This patch prevents disabling the FPGA bridges when SPL or U-Boot is executed from FPGA onchip RAM. Signed-off-by: Simon Goldschmidt --- There are other patches required to make boot from FPGA work correctly: - CONFIG_SPL_TEXT_BASE needs to be set to 0xC000 ideally this is done by moving

Re: [U-Boot] configs: move CONFIG_SPL_TEXT_BASE to Kconfig

2018-10-07 Thread Simon Goldschmidt
On 07.10.2018 02:49, Tom Rini wrote: On Sun, Sep 30, 2018 at 02:31:53PM +0200, Simon Goldschmidt wrote: Moved CONFIG_SPL_TEXT_BASE to common/spl/Kconfig with help from moveconfig.py (only had to prepare socfpga, stm32f746 and am33x/43x manually) Signed-off-by: Simon Goldschmidt

Re: [U-Boot] [PATCH] arm: socfpga: make socfpga_socrates_defconfig boot from QSPI

2018-10-07 Thread Simon Goldschmidt
On 09.08.2018 23:57, Marek Vasut wrote: On 08/09/2018 09:17 PM, Simon Goldschmidt wrote: On Mon, Aug 6, 2018 at 3:45 PM Simon Goldschmidt wrote: Marek Vasut schrieb am Mo., 6. Aug. 2018, 15:19: On 08/06/2018 03:05 PM, Simon Goldschmidt wrote: This fixes the board's dts to supply SPL

[U-Boot] [PATCH v2] sf: remove spi-flash chip names from SPL binary

2018-10-07 Thread Simon Goldschmidt
configuration (socfpga_socrates_defconfig, MACRONIX, SPANSION and STMICRO enabled). Signed-off-by: Simon Goldschmidt --- Changes in v2: - use CONFIG_SPL_BUILD directly instead of SPI_FLASH_INCLUDE_NAME - iterate spi_flash_ids list until info->sector_size == 0, remove the extra global 'co

[U-Boot] [PATCH] debug uart: don't print before initialization

2018-10-07 Thread Simon Goldschmidt
() until debug_uart_init() has been called. Signed-off-by: Simon Goldschmidt --- include/asm-generic/global_data.h | 3 +++ include/debug_uart.h | 19 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm

[U-Boot] [PATCH v3] arm: socfpga: fix SPL booting from fpga OnChip RAM

2018-10-09 Thread Simon Goldschmidt
This patch prevents disabling the FPGA bridges when SPL or U-Boot is executed from FPGA onchip RAM. Signed-off-by: Simon Goldschmidt --- Changes in v3: - use __image_copy_start to check if we are executing from FPGA Changes in v2: - use less ifdefs and more C code for address checks

[U-Boot] [PATCH] configs: drop CONFIG_SYS_EXTRA_ENV_RELOC

2018-09-27 Thread Simon Goldschmidt
DDR is defined (and ENV_IS_EMBEDDED is not). Signed-off-by: Simon Goldschmidt --- common/board_r.c| 11 --- include/configs/B4860QDS.h | 3 --- include/configs/BSC9131RDB.h| 2 -- include/configs/BSC9132QDS.h| 3 --- include/configs/C29XPCI

Re: [U-Boot] [PATCH] sf: remove spi-flash chip names from SPL binary

2018-09-28 Thread Simon Goldschmidt
On 28.09.2018 19:20, Jagan Teki wrote: On Fri, Aug 17, 2018 at 12:23 PM Simon Goldschmidt wrote: The table of spi flash chips 'spi_flash_ids' currently includes chip names. The only usage of these is to print the name when the chip is probed. Since this message is not shown in SPL, we can

Re: [U-Boot] [PATCH] serial: ns16550: add setconfig support

2018-11-16 Thread Simon Goldschmidt
Am Sa., 3. Nov. 2018, 08:56 hat Simon Goldschmidt < simon.k.r.goldschm...@gmail.com> geschrieben: > On 03.11.2018 07:08, Simon Glass wrote: > > On 2 November 2018 at 14:28, Simon Goldschmidt > > wrote: > >> Add possibility to update the serial parity used.

Re: [U-Boot] [PATCH] serial: ns16550: add setconfig support

2018-11-16 Thread Simon Goldschmidt
Am Fr., 16. Nov. 2018, 18:25 hat Simon Glass geschrieben: > Hi, > > On 16 November 2018 at 09:04, Simon Goldschmidt > wrote: > > > > > > Am Sa., 3. Nov. 2018, 08:56 hat Simon Goldschmidt > > geschrieben: > >> > >> On 03.11.2018 07:08,

Re: [U-Boot] [PATCH v2] dm: spi: prevent setting a speed of 0 Hz

2018-11-16 Thread Simon Goldschmidt
On 31.10.2018 07:42, Simon Goldschmidt wrote: On Wed, Oct 31, 2018 at 7:22 AM Jagan Teki wrote: On Wed, Oct 31, 2018 at 1:40 AM Simon Goldschmidt wrote: When the device tree is missing a correct spi slave description below the bus (compatible "spi-flash" or spi-max-frequency a

[U-Boot] [PATCH 1/2] net: designware: fix tx packet length

2018-11-17 Thread Simon Goldschmidt
of Ethernet allowing such a trailer, most packets seem to be parsed fine by remote hosts, which is probably why this hasn't been noticed. Fix this by correctly clearing the size mask before setting the new length. Tested on socfpga gen5. Signed-off-by: Simon Goldschmidt --- drivers/net

[U-Boot] [PATCH 2/2] net: designware: clear padding bytes

2018-11-17 Thread Simon Goldschmidt
at the end. Tested on socfpga gen5. Signed-off-by: Simon Goldschmidt --- drivers/net/designware.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 688cf9fef2..33463de0f8 100644 --- a/drivers/net/designware.c +++ b

[U-Boot] [PATCH v2 3/8] lib: lmb: extend lmb for checks at load time

2018-11-17 Thread Simon Goldschmidt
. lmb_get_unreserved_size returns the number of bytes that can be used up to the next reserved region or the end of valid ram. This can be 0 if the address passed is reserved. Signed-off-by: Simon Goldschmidt --- Changes in v2: - added lmb_get_unreserved_size() for tftp include/lmb.h | 3 +++ lib/lmb.c

[U-Boot] [PATCH v2 1/8] lib: lmb: reserving overlapping regions should fail

2018-11-17 Thread Simon Goldschmidt
-by: Simon Goldschmidt --- Changes in v2: None lib/lmb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/lmb.c b/lib/lmb.c index 1705417348..8dc703d996 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -136,6 +136,9 @@ static long lmb_add_region(struct lmb_region *rgn, phys_addr_t base

[U-Boot] [PATCH v2 6/8] lmb: remove unused extern declaration

2018-11-17 Thread Simon Goldschmidt
lmb.h includes an extern declaration of "struct lmb lmb;" which is not used anywhere, so remove it. Signed-off-by: Simon Goldschmidt --- Changes in v2: - this patch is new in v2 include/lmb.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index

[U-Boot] [PATCH v2 2/8] fdt: parse "reserved-memory" for memory reservation

2018-11-17 Thread Simon Goldschmidt
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries. Extend this to the more commonly used scheme of the "reserved-memory" node. Signed-off-by: Simon Goldschmidt --- Changes in v2: -

[U-Boot] [PATCH v2 6/8] lmb: remove unused extern declaration

2018-11-17 Thread Simon Goldschmidt
lmb.h includes an extern declaration of "struct lmb lmb;" which is not used anywhere, so remove it. Signed-off-by: Simon Goldschmidt --- Changes in v2: - this patch is new in v2 include/lmb.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index

[U-Boot] [PATCH v2 8/8] tftp: prevent overwriting reserved memory

2018-11-17 Thread Simon Goldschmidt
This fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by using lmb to check for a valid range to store received blocks. Signed-off-by: Simon Goldschmidt --- Changes in v2: - this patch is new in v2 net/t

[U-Boot] [PATCH v2 3/8] lib: lmb: extend lmb for checks at load time

2018-11-17 Thread Simon Goldschmidt
. lmb_get_unreserved_size returns the number of bytes that can be used up to the next reserved region or the end of valid ram. This can be 0 if the address passed is reserved. Signed-off-by: Simon Goldschmidt --- Changes in v2: - added lmb_get_unreserved_size() for tftp include/lmb.h | 3 +++ lib/lmb.c

[U-Boot] [PATCH v2 1/8] lib: lmb: reserving overlapping regions should fail

2018-11-17 Thread Simon Goldschmidt
-by: Simon Goldschmidt --- Changes in v2: None lib/lmb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/lmb.c b/lib/lmb.c index 1705417348..8dc703d996 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -136,6 +136,9 @@ static long lmb_add_region(struct lmb_region *rgn, phys_addr_t base

[U-Boot] [PATCH v2 5/8] bootm: use new common function lmb_init_and_reserve

2018-11-17 Thread Simon Goldschmidt
This reduces duplicate code only. Signed-off-by: Simon Goldschmidt --- Changes in v2: None common/bootm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 8bf84ebcb7..31e4f0f794 100644 --- a/common/bootm.c +++ b/common/bootm.c

[U-Boot] [PATCH v2 4/8] fs: prevent overwriting reserved memory

2018-11-17 Thread Simon Goldschmidt
This fixes CVE-2018-18440 ("insufficient boundary checks in filesystem image load") by using lmb to check the load size of a file against reserved memory addresses. Signed-off-by: Simon Goldschmidt --- Changes in v2: None fs/fs.c

[U-Boot] [PATCH v2 2/8] fdt: parse "reserved-memory" for memory reservation

2018-11-17 Thread Simon Goldschmidt
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries. Extend this to the more commonly used scheme of the "reserved-memory" node. Signed-off-by: Simon Goldschmidt --- Changes in v2: -

[U-Boot] [PATCH v2 5/8] bootm: use new common function lmb_init_and_reserve

2018-11-17 Thread Simon Goldschmidt
This reduces duplicate code only. Signed-off-by: Simon Goldschmidt --- Changes in v2: None common/bootm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 8bf84ebcb7..31e4f0f794 100644 --- a/common/bootm.c +++ b/common/bootm.c

[U-Boot] [PATCH v2 8/8] tftp: prevent overwriting reserved memory

2018-11-17 Thread Simon Goldschmidt
This fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by using lmb to check for a valid range to store received blocks. Signed-off-by: Simon Goldschmidt --- Changes in v2: - this patch is new in v2 net/t

Re: [U-Boot] configs: move CONFIG_SPL_TEXT_BASE to Kconfig

2019-01-02 Thread Simon Goldschmidt
Hi Marek, Am 14.11.2018 um 19:51 schrieb Simon Goldschmidt: On 07.10.2018 02:49, Tom Rini wrote: On Sun, Sep 30, 2018 at 02:31:53PM +0200, Simon Goldschmidt wrote: Moved CONFIG_SPL_TEXT_BASE to common/spl/Kconfig with help from moveconfig.py (only had to prepare socfpga, stm32f746 and am33x

Re: [U-Boot] [PATCH 1/1] altera_pio: fix get_value

2019-01-05 Thread Simon Goldschmidt
Am 04.01.2019 um 19:53 schrieb Marek Vasut: On 1/4/19 5:48 PM, Julien BĂ©raud wrote: gpio_get_value should return 0 or 1, not 1 << pin Is this documented somewhere ? I saw it's kind of documented on 'dm_gpio_get_value', but not on struct dm_gpio_ops: "@return GPIO value (0 for inactive, 1

Re: [U-Boot] serial: ns16550: fix debug uart putc called before init

2019-01-16 Thread Simon Goldschmidt
On Wed, Jan 16, 2019 at 3:44 AM Tom Rini wrote: > > On Wed, Jan 09, 2019 at 08:35:31PM +0100, Simon Goldschmidt wrote: > > > If _debug_uart_putc() is called before _debug_uart_init(), the > > ns16550 debug uart driver hangs in a tight loop waiting for the >

Re: [U-Boot] [PATCH v10 05/10] lib: lmb: extend lmb for checks at load time

2019-01-16 Thread Simon Goldschmidt
Am Mi., 16. Jan. 2019, 22:34 hat Simon Glass geschrieben: > Hi Simon, > > On Mon, 14 Jan 2019 at 14:38, Simon Goldschmidt > wrote: > > > > This adds two new functions, lmb_alloc_addr and > > lmb_get_unreserved_size. > > > > lmb_alloc_addr behave

[U-Boot] [PATCH v2] of-platdata: improve documentation

2019-01-16 Thread Simon Goldschmidt
Improve some things in the documentation of OF_PLATDATA that I found while porting socfgpa_gen5 to it. Signed-off-by: Simon Goldschmidt --- Changes in v2: - further fixes noted by Simon Glass - added info about missing node relations - moved the passage about phandles into section 'caveats

Re: [U-Boot] [PATCH] spl: fat/fs: Add option to include/exclude FAT write build in SPL

2019-01-16 Thread Simon Goldschmidt
On Thu, Jan 17, 2019 at 8:10 AM wrote: > > From: Tien Fong Chee > > Most of the time SPL only needs very simple FAT reading, so having > CONFIG_SPL_FAT_WRITE to exclude or undefined would help to save 64KiB > default max clustersize from memory. > > Signed-off-by: Tien Fong Chee > --- >

Re: [U-Boot] no DTB with nand SPL on sama5d3

2019-01-17 Thread Simon Goldschmidt
On Thu, Jan 17, 2019 at 10:02 AM wrote: > > > > On 16.01.2019 21:05, Daniel Evans wrote: > > Hello, > > > > Yes, I am trying to load the U-boot SPL > > > > What I posted previously was a custom board. I switched over to the > > sama5d3_xplained and all I get with

Re: [U-Boot] [PATCH 2/2] env: Fix saving environment to "bad CRC" location

2019-01-18 Thread Simon Goldschmidt
Am Fr., 18. Jan. 2019, 20:20 hat Sam Protsenko geschrieben: > In case when the environment on some location is malformed (CRC isn't > matching), there is a chance we won't be able to save the environment to > that location. For example, consider the case when we only have the > environment on

Re: [U-Boot] [PATCH 1/2] net: designware: fix tx packet length

2019-01-14 Thread Simon Goldschmidt
Joe, Am 10.12.2018 um 05:08 schrieb Marek Vasut: On 12/09/2018 09:50 PM, Simon Goldschmidt wrote: Am 17.11.2018 um 17:02 schrieb Joe Hershberger: On Sat, Nov 17, 2018 at 3:25 AM Simon Goldschmidt wrote: The designware driver has a bug in setting the tx length into the dma descriptor

Re: [U-Boot] [PATCH v2] spl: implement CRC check on U-Boot uImage

2019-01-14 Thread Simon Goldschmidt
Tom, Am 11.12.2018 um 02:07 schrieb Simon Glass: On Wed, 28 Nov 2018 at 13:52, Simon Goldschmidt wrote: SPL currently does not check uImage CRCs when loading U-Boot. This patch adds checking the uImage CRC when SPL loads U-Boot. It does this by reusing the existing config option

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am 11.01.2019 um 23:02 schrieb Marek Vasut: On 1/11/19 9:39 PM, Simon Goldschmidt wrote: Am 07.01.2019 um 23:53 schrieb Marek Vasut: On 1/7/19 10:14 PM, Simon Goldschmidt wrote: In order to build a smaller SPL, let's imply SPL_DM_RESET and SPL_WATCHDOG_SUPPORT instead of selecting them, so

Re: [U-Boot] [PATCH v6 6/9] fs: prevent overwriting reserved memory

2019-01-14 Thread Simon Goldschmidt
On Sat, Jan 5, 2019 at 2:56 AM Simon Glass wrote: > > Hi Simon, > > On Fri, 14 Dec 2018 at 13:14, Simon Goldschmidt > wrote: > > > > This fixes CVE-2018-18440 ("insufficient boundary checks in filesystem > > image load") by using lmb to check the load

Re: [U-Boot] [PATCH] arm: socfpga: make debug uart work on socfpga_gen5

2019-01-14 Thread Simon Goldschmidt
Am 08.01.2019 um 13:56 schrieb Marek Vasut: On 1/8/19 1:42 PM, Simon Goldschmidt wrote: On Tue, Jan 8, 2019 at 1:08 PM Marek Vasut wrote: On 1/8/19 1:06 PM, Simon Goldschmidt wrote: On Tue, Jan 8, 2019 at 12:20 PM Marek Vasut wrote: On 1/8/19 7:41 AM, Simon Goldschmidt wrote: On Mon

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Hi Dinh, Am 14.01.2019 um 16:58 schrieb Dinh Nguyen: Hi Simon, On 1/14/19 9:50 AM, Simon Goldschmidt wrote: Am 11.01.2019 um 23:02 schrieb Marek Vasut: On 1/11/19 9:39 PM, Simon Goldschmidt wrote: Am 07.01.2019 um 23:53 schrieb Marek Vasut: On 1/7/19 10:14 PM, Simon Goldschmidt wrote

Re: [U-Boot] [PATCH] net: fix env flags for eth10addr and above

2019-01-14 Thread Simon Goldschmidt
Am 14.12.2018 um 14:28 schrieb Tom Rini: On Fri, Dec 14, 2018 at 09:56:19AM +0100, Simon Goldschmidt wrote: +Tom On Sun, Dec 9, 2018 at 9:51 PM Simon Goldschmidt wrote: Am 22.11.2018 um 17:06 schrieb Simon Goldschmidt: With CONFIG_REGEX enabled, ETHADDR_WILDCARD is set up for up to 10

Re: [U-Boot] [PATCH] net: remove duplicate definition of ETHADDR_WILDCARD

2019-01-14 Thread Simon Goldschmidt
Joe, Am 14.12.2018 um 14:43 schrieb Simon Goldschmidt: On Fri, Dec 14, 2018 at 2:28 PM Tom Rini wrote: On Fri, Dec 14, 2018 at 09:55:32AM +0100, Simon Goldschmidt wrote: + Tom On Sun, Dec 9, 2018 at 9:51 PM Simon Goldschmidt wrote: Am 22.11.2018 um 16:58 schrieb Simon Goldschmidt

Re: [U-Boot] [PATCH] arm: socfpga: make debug uart work on socfpga_gen5

2019-01-14 Thread Simon Goldschmidt
Am 14.01.2019 um 19:26 schrieb Marek Vasut: On 1/14/19 4:21 PM, Simon Goldschmidt wrote: Am 08.01.2019 um 13:56 schrieb Marek Vasut: On 1/8/19 1:42 PM, Simon Goldschmidt wrote: On Tue, Jan 8, 2019 at 1:08 PM Marek Vasut wrote: On 1/8/19 1:06 PM, Simon Goldschmidt wrote: On Tue, Jan 8

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am 14.01.2019 um 20:33 schrieb Marek Vasut: On 1/14/19 7:58 PM, Simon Goldschmidt wrote: Am 14.01.2019 um 19:31 schrieb Marek Vasut: On 1/14/19 5:05 PM, Simon Goldschmidt wrote: Hi Dinh, Hi, Am 14.01.2019 um 16:58 schrieb Dinh Nguyen: Hi Simon, On 1/14/19 9:50 AM, Simon Goldschmidt

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am 14.01.2019 um 21:01 schrieb Marek Vasut: On 1/14/19 8:43 PM, Simon Goldschmidt wrote: Am 14.01.2019 um 20:33 schrieb Marek Vasut: On 1/14/19 7:58 PM, Simon Goldschmidt wrote: Am 14.01.2019 um 19:31 schrieb Marek Vasut: On 1/14/19 5:05 PM, Simon Goldschmidt wrote: Hi Dinh, Hi, Am

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
On Mon, Jan 14, 2019 at 9:23 PM Marek Vasut wrote: > > On 1/14/19 9:12 PM, Simon Goldschmidt wrote: > > Am 14.01.2019 um 21:01 schrieb Marek Vasut: > >> On 1/14/19 8:43 PM, Simon Goldschmidt wrote: > >>> Am 14.01.2019 um 20:33 schrieb Marek Vasut: > >&g

Re: [U-Boot] [PATCH] net: fix env flags for eth10addr and above

2019-01-14 Thread Simon Goldschmidt
Hi Joe, Am 14.01.2019 um 19:19 schrieb Joe Hershberger: Hi Simon, On Mon, Jan 14, 2019 at 10:29 AM Tom Rini wrote: On Mon, Jan 14, 2019 at 04:42:10PM +0100, Simon Goldschmidt wrote: Am 14.12.2018 um 14:28 schrieb Tom Rini: On Fri, Dec 14, 2018 at 09:56:19AM +0100, Simon Goldschmidt wrote

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am 14.01.2019 um 19:31 schrieb Marek Vasut: On 1/14/19 5:05 PM, Simon Goldschmidt wrote: Hi Dinh, Hi, Am 14.01.2019 um 16:58 schrieb Dinh Nguyen: Hi Simon, On 1/14/19 9:50 AM, Simon Goldschmidt wrote: Am 11.01.2019 um 23:02 schrieb Marek Vasut: On 1/11/19 9:39 PM, Simon Goldschmidt

Re: [U-Boot] [PATCH v6 1/9] test: add test for lib/lmb.c

2019-01-14 Thread Simon Goldschmidt
Am 05.01.2019 um 02:56 schrieb Simon Glass: Hi Simon, On Fri, 14 Dec 2018 at 13:14, Simon Goldschmidt wrote: Add basic tests for the lmb memory allocation code used to reserve and allocate memory during boot. Signed-off-by: Simon Goldschmidt --- Changes in v6: None Changes in v5

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am Mo., 14. Jan. 2019, 22:50 hat Tom Rini geschrieben: > On Mon, Jan 14, 2019 at 10:30:36PM +0100, Marek Vasut wrote: > > On 1/14/19 10:28 PM, Tom Rini wrote: > > > On Mon, Jan 14, 2019 at 07:31:26PM +0100, Marek Vasut wrote: > > >> On 1/14/19 5:05 PM, Simon Gold

[U-Boot] [PATCH v10 01/10] test: add test for lib/lmb.c

2019-01-14 Thread Simon Goldschmidt
Add basic tests for the lmb memory allocation code used to reserve and allocate memory during boot. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- Changes in v10: - add reviewed-by Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5

[U-Boot] [PATCH v10 10/10] arm: bootm: fix sp detection at end of address range

2019-01-14 Thread Simon Goldschmidt
, not 0. Fixes: 15751403b6 ("ARM: bootm: don't assume sp is in DRAM bank 0") Reported-by: Frank Wunderlich Signed-off-by: Simon Goldschmidt Reviewed-by: Stephen Warren --- Changes in v10: None Changes in v9: - fix compile error in arch/arm/lib/bootm.c Changes in v8: - this patch is

[U-Boot] [PATCH v10 05/10] lib: lmb: extend lmb for checks at load time

2019-01-14 Thread Simon Goldschmidt
. lmb_get_unreserved_size returns the number of bytes that can be used up to the next reserved region or the end of valid ram. This can be 0 if the address passed is reserved. Added test for these new functions. Signed-off-by: Simon Goldschmidt --- Changes in v10: None Changes in v9: None Changes in v8: None

[U-Boot] [PATCH v10 09/10] tftp: prevent overwriting reserved memory

2019-01-14 Thread Simon Goldschmidt
This fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by using lmb to check for a valid range to store received blocks. Signed-off-by: Simon Goldschmidt Acked-by: Joe Hershberger --- Changes in v10: - add acked-by Changes in v9: None Changes in v8: No

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am 14.01.2019 um 21:49 schrieb Marek Vasut: On 1/14/19 9:30 PM, Simon Goldschmidt wrote: On Mon, Jan 14, 2019 at 9:23 PM Marek Vasut wrote: On 1/14/19 9:12 PM, Simon Goldschmidt wrote: Am 14.01.2019 um 21:01 schrieb Marek Vasut: On 1/14/19 8:43 PM, Simon Goldschmidt wrote: Am 14.01.2019

[U-Boot] [PATCH v10 03/10] lib: lmb: reserving overlapping regions should fail

2019-01-14 Thread Simon Goldschmidt
to 'lmb_alloc' etc. Add test to assert this. Signed-off-by: Simon Goldschmidt --- Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: - add braces around if/else with macros accross more than one line Changes in v6: - fix size of allocated regions that need alignment padding

[U-Boot] [PATCH v10 06/10] fs: prevent overwriting reserved memory

2019-01-14 Thread Simon Goldschmidt
This fixes CVE-2018-18440 ("insufficient boundary checks in filesystem image load") by using lmb to check the load size of a file against reserved memory addresses. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- Changes in v10: - return -ENOSPC from fs_read when read t

[U-Boot] [PATCH v10 02/10] lmb: fix allocation at end of address range

2019-01-14 Thread Simon Goldschmidt
The lmb code fails if base + size of RAM overflows to zero. Fix this by calculating end as 'base + size - 1' instead of 'base + size' where appropriate. Added tests to assert this is fixed. Signed-off-by: Simon Goldschmidt --- Changes in v10: None Changes in v9: None Changes in v8: None

[U-Boot] [PATCH v10 04/10] fdt: parse "reserved-memory" for memory reservation

2019-01-14 Thread Simon Goldschmidt
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries. Extend this to the more commonly used scheme of the "reserved-memory" node. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
Am 14.01.2019 um 22:30 schrieb Marek Vasut: On 1/14/19 10:28 PM, Tom Rini wrote: On Mon, Jan 14, 2019 at 07:31:26PM +0100, Marek Vasut wrote: On 1/14/19 5:05 PM, Simon Goldschmidt wrote: Hi Dinh, Hi, Am 14.01.2019 um 16:58 schrieb Dinh Nguyen: Hi Simon, On 1/14/19 9:50 AM, Simon

[U-Boot] [PATCH v10 00/10] Fix CVE-2018-18440 and CVE-2018-18439

2019-01-14 Thread Simon Goldschmidt
ed to resend since patman added too many cc addresses that gmail seemed to detect as spam :-( Changes in v2: - added code to reserve devicetree reserved-memory in lmb - added tftp fixes (patches 7 and 8) - fixed a bug in new function lmb_alloc_addr Simon Goldschmidt (10): test: add test

[U-Boot] [PATCH v10 07/10] bootm: use new common function lmb_init_and_reserve

2019-01-14 Thread Simon Goldschmidt
This reduces duplicate code only. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- Changes in v10: - add reviewed-by Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v2: None common/bootm.c | 8

[U-Boot] [PATCH v10 08/10] lmb: remove unused extern declaration

2019-01-14 Thread Simon Goldschmidt
lmb.h includes an extern declaration of "struct lmb lmb;" which is not used anywhere, so remove it. Signed-off-by: Simon Goldschmidt --- Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Cha

Re: [U-Boot] [PATCH v10 00/10] Fix CVE-2018-18440 and CVE-2018-18439

2019-01-14 Thread Simon Goldschmidt
Am Mo., 14. Jan. 2019, 23:55 hat Tom Rini geschrieben: > On Mon, Jan 14, 2019 at 10:38:13PM +0100, Simon Goldschmidt wrote: > > > This series fixes CVE-2018-18440 ("insufficient boundary checks in > > filesystem image load") by adding restrictions to the 'load' &g

Re: [U-Boot] [PATCH] dtoc: make generated platdata structs const

2019-01-21 Thread Simon Goldschmidt
Hi Simon, Am 20.01.2019 um 21:23 schrieb Simon Glass: Hi Simon, On Tue, 8 Jan 2019 at 08:29, Simon Goldschmidt wrote: The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const. Signed-off-by: Simon Goldschmidt

[U-Boot] [PATCH] tests: dtoc: adapt tests to changed dtoc output

2019-01-21 Thread Simon Goldschmidt
The dtoc tests need to be adapted to dtoc being changed to output platdata structs as const, which has been introduced in commit 7d05d3a8e35f ("dtoc: make generated platdata structs const"). Fixes: 7d05d3a8e35f ("dtoc: make generated platdata structs const") Signed-off-b

Re: [U-Boot] [PATCH 2/2] env: Fix saving environment to "bad CRC" location

2019-01-21 Thread Simon Goldschmidt
Am 19.01.2019 um 14:28 schrieb Sam Protsenko: Hi Simon, On Fri, Jan 18, 2019 at 10:46 PM Simon Goldschmidt wrote: Am Fr., 18. Jan. 2019, 20:20 hat Sam Protsenko geschrieben: In case when the environment on some location is malformed (CRC isn't matching), there is a chance we won't

Re: [U-Boot] [PATCH 2/2] env: Fix saving environment to "bad CRC" location

2019-01-21 Thread Simon Goldschmidt
Am 21.01.2019 um 10:18 schrieb Simon Goldschmidt: Am 19.01.2019 um 14:28 schrieb Sam Protsenko: Hi Simon, On Fri, Jan 18, 2019 at 10:46 PM Simon Goldschmidt wrote: Am Fr., 18. Jan. 2019, 20:20 hat Sam Protsenko geschrieben: In case when the environment on some location is malformed

Re: [U-Boot] [PATCH 1/2] env: common: Return specific error code on bad CRC

2019-01-21 Thread Simon Goldschmidt
t not functional (implemented in subsequent patch). Signed-off-by: Sam Protsenko Reviewed-by: Simon Goldschmidt --- env/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env/common.c b/env/common.c index d1a6a52860..324502ed82 100644 --- a/env/common.c +++ b/

[U-Boot] [PATCH 2/2] lib: lmb: cleanup var names and patman warnings

2019-01-21 Thread Simon Goldschmidt
Change multiple usages of 'j' into 'rgn'; fix whitespace/coding style reported by patman. Signed-off-by: Simon Goldschmidt --- lib/lmb.c | 86 +++ 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index

[U-Boot] [PATCH 1/2] lib: lmb: rename lmb_get_unreserved_size to lmb_get_free_size

2019-01-21 Thread Simon Goldschmidt
As a follow-up, change the name of the newly introduced function 'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more appropriate. Signed-off-by: Simon Goldschmidt --- include/lmb.h | 2 +- lib/lmb.c | 2 +- net/tftp.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions

Re: [U-Boot] Test failures in u-boot/master on NVIDIA HW with recent push

2019-01-22 Thread Simon Goldschmidt
Hi Stephen, On Fri, Jan 18, 2019 at 7:29 AM Stephen Warren wrote: > > On 1/17/19 6:15 PM, Tom Rini wrote: > > On Thu, Jan 17, 2019 at 05:50:27PM -0700, Stephen Warren wrote: > >> On 1/17/19 5:42 PM, Tom Rini wrote: > >>> On Thu, Jan 17, 2019 at 05:34:57PM -0700, Stephen Warren wrote: > >>> >

Re: [U-Boot] [PATCH] net: remove duplicate definition of ETHADDR_WILDCARD

2019-01-21 Thread Simon Goldschmidt
Hi Joe, On Tue, Jan 15, 2019 at 10:00 AM Joe Hershberger wrote: > > On Thu, Nov 22, 2018 at 9:58 AM Simon Goldschmidt > wrote: > > > > ETHADDR_WILDCARD is defined as the same value in both env_flags.h > > and env_callback.h > > > > As env_callback.h inc

Re: [U-Boot] Test failures in u-boot/master on NVIDIA HW with recent push

2019-01-23 Thread Simon Goldschmidt
Am Mi., 23. Jan. 2019, 19:20 hat Stephen Warren geschrieben: > On 1/22/19 1:12 AM, Simon Goldschmidt wrote: > > Hi Stephen, > > On Fri, Jan 18, 2019 at 7:29 AM Stephen Warren > wrote: > >> > >> On 1/17/19 6:15 PM, Tom Rini wrote: > >>> On Thu,

Re: [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select

2019-01-14 Thread Simon Goldschmidt
On Mon, Jan 14, 2019 at 11:26 PM Dinh Nguyen wrote: > > > > On 1/14/19 10:05 AM, Simon Goldschmidt wrote: > > Hi Dinh, > > > > Am 14.01.2019 um 16:58 schrieb Dinh Nguyen: > >> Hi Simon, > >> > >> On 1/14/19 9:50 AM, Simon Goldschmid

Re: [U-Boot] configs: move CONFIG_SPL_TEXT_BASE to Kconfig

2019-01-19 Thread Simon Goldschmidt
Hi Tom, Am Fr., 18. Jan. 2019, 23:02 hat Tom Rini geschrieben: > On Mon, Jan 07, 2019 at 10:12:42AM +0100, Simon Goldschmidt wrote: > > On Wed, Jan 2, 2019 at 9:13 PM Simon Goldschmidt > > wrote: > > > > > > Hi Marek, > > > > > &g

Re: [U-Boot] Test failures in u-boot/master on NVIDIA HW with recent push

2019-01-18 Thread Simon Goldschmidt
Hi, Am Fr., 18. Jan. 2019, 07:29 hat Stephen Warren geschrieben: > On 1/17/19 6:15 PM, Tom Rini wrote: > > On Thu, Jan 17, 2019 at 05:50:27PM -0700, Stephen Warren wrote: > >> On 1/17/19 5:42 PM, Tom Rini wrote: > >>> On Thu, Jan 17, 2019 at 05:34:57PM -0700, Stephen Warren wrote: > >>> >

Re: [U-Boot] [PATCH v2 2/4] spl: fat/fs: Add option to include/exclude FAT write build in SPL

2019-01-22 Thread Simon Goldschmidt
d-off-by: Tien Fong Chee Reviewed-by: Simon Goldschmidt > > --- > > Changes in v2: > - Changed to CONFIG_IS_ENABLED(FAT_WRITE) to control build for FAT write > int both SPL and U-Boot > - Changed to CONFIG_IS_ENABLED for config FS_FAT too. > --- > common/spl/Kconfig |

Re: [U-Boot] [PATCH v2 1/4] spl: Kconfig: Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT

2019-01-22 Thread Simon Goldschmidt
On Wed, Jan 23, 2019 at 7:20 AM wrote: > > From: Tien Fong Chee > > Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT so > obj-$(CONFIG_$(SPL_)FS_FAT) can be used to control the build in both > SPL and U-Boot. > > Signed-off-by: Tien Fong Chee Reviewed-by: Simon Gol

Re: [U-Boot] [PATCH v5 0/9] Fix CVE-2018-18440 and CVE-2018-18439

2018-12-11 Thread Simon Goldschmidt
Hi Tom, [truncated the CC list a bit since I got "too many recipients" errors last time] Am 11.12.2018 um 14:31 schrieb Tom Rini: On Sun, Dec 09, 2018 at 09:45:13PM +0100, Simon Goldschmidt wrote: This series fixes CVE-2018-18440 ("insufficient boundary checks in filesy

Re: [U-Boot] [PATCH 10/16] configs: Get rid of SPI_FLASH_BAR

2018-12-12 Thread Simon Goldschmidt
Am Mi., 12. Dez. 2018, 21:42 hat Jagan Teki geschrieben: > On Wed, Dec 12, 2018 at 11:15 PM Vignesh R wrote: > > > > Now that we have new SPI NOR framework in place that supports 4 byte > > addressing mode by default, get rid of CONFIG_SPI_FLASH_BAR > > I already mentioned in previous mail, BAR

Re: [U-Boot] [PATCH 0/7] Remove defines for SPI default speed and mode

2018-12-10 Thread Simon Goldschmidt
nay/u-boot/branches After applying both of your patches, the da850evm no longer boots from SPI flash. I just did test this and it worked for me. Booting from QSPI on socfpga_socrates and loading something in U-Boot via sf probe/sf read, so: Tested-by: Simon Goldschmidt U-Boot SPL 2019.01

Re: [U-Boot] [U-Boot, PATCHv3, 1/4] dm: MIGRATION: Add migration plan for DM_MMC

2018-12-13 Thread Simon Goldschmidt
migration. > > > > Reviewed-by: Simon Glass > > Cc: Jaehoon Chung > > Signed-off-by: Tom Rini > > Reviewed-by: Simon Goldschmidt > > Reviewed-by: Philipp Tomsich > > Applied to u-boot/master, thanks! I have finally found the time to test current mainline

Re: [U-Boot] [PATCH 0/7] Remove defines for SPI default speed and mode

2018-12-12 Thread Simon Goldschmidt
On Wed, Dec 12, 2018 at 8:51 AM Petr Vorel wrote: > > Hi Patrick, > > FYI this patchset breaks some machines: > https://travis-ci.org/pevik/u-boot/builds/466192406 I might be wrong, but I think that build log indicates an error on a line that should not exist any more after applying this series

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