Re: barebox bug, sh [ -c /dev/nand0.var.ubi.blablablub ] returns |true| even if there is no "blablablub" partition on "var" volume

2019-09-02 Thread Robert Schwebel
Roland, On Mon, Sep 02, 2019 at 12:37:37PM +, Mainz, Roland wrote: > Could you *please* implement test(1) -b/-c ? Since barebox ls(1) is > able to distinguish files from devices it shouldn't be hard, and there > are cases (like our update script) where telling the difference > between file

RE: barebox bug, sh [ -c /dev/nand0.var.ubi.blablablub ] returns |true| even if there is no "blablablub" partition on "var" volume

2019-09-02 Thread Mainz, Roland
> -Original Message- > From: Sascha Hauer [mailto:s.ha...@pengutronix.de] > Sent: Monday, September 2, 2019 2:08 PM > To: Mainz, Roland > Cc: customers.eckelm...@pengutronix.de; barebox@lists.infradead.org; > Arne Wichmann (arne.wichm...@thinventions.de) > ; Uwe Kleine-König

Re: barebox bug, sh [ -c /dev/nand0.var.ubi.blablablub ] returns |true| even if there is no "blablablub" partition on "var" volume

2019-09-02 Thread Sascha Hauer
Hi Roland, On Mon, Sep 02, 2019 at 09:40:26AM +, Mainz, Roland wrote: > > Hi! > > > > Quick bug report: > > - Version: barebox 2018.05.0-20190221-1-EAG_3.00-gf70df96 #1 Mon Sep 2 > 09:03:05 CEST 2019 > - Hardware: Eckelmann/EAG Quantron > > barebox:/ ls -l

[PATCH 0/2] Fix buffer overflows in nfs code

2019-09-02 Thread Sascha Hauer
These patches fix possible buffer overflows in the nfs code. We take a 32bit value read from an incoming network packet as length argument to memcpy without boundary checking. The patches add the necessary boundary checks. The patches can be backported to any past version, let me know if you are

[PATCH 2/2] fs: nfs: Fix possible buffer overflow

2019-09-02 Thread Sascha Hauer
nfs_readlink_req() interprets a 32bit value directly received from the network as length argument to memcpy() without any boundary checking. Clamp the copy size at the end of the incoming packet. Signed-off-by: Sascha Hauer --- fs/nfs.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 1/2] net: nfs: Fix possible buffer overflow

2019-09-02 Thread Sascha Hauer
nfs_readlink_reply() interprets a 32bit value directly received from the network as length argument to memcpy() without any boundary checking. Clamp the copy size at the end of the incoming packet. Signed-off-by: Sascha Hauer --- net/nfs.c | 5 - 1 file changed, 4 insertions(+), 1

barebox bug, sh [ -c /dev/nand0.var.ubi.blablablub ] returns |true| even if there is no "blablablub" partition on "var" volume

2019-09-02 Thread Mainz, Roland
Hi! Quick bug report: - Version: barebox 2018.05.0-20190221-1-EAG_3.00-gf70df96 #1 Mon Sep 2 09:03:05 CEST 2019 - Hardware: Eckelmann/EAG Quantron Problem: The barebox sh's "test"/"[" shell builtin returns "true" for /dev/nand0.var.ubi.blablablub even if there is no "blablablub"

Re: [PATCH] input: add handler for reset and power key input events

2019-09-02 Thread Sascha Hauer
On Fri, Aug 30, 2019 at 11:33:22AM +0200, Oleksij Rempel wrote: > Am 30.08.19 um 11:02 schrieb Ahmad Fatoum: > > Hello, > > > > On 8/29/19 1:26 PM, duhuanpeng wrote: > > > Hello, I merged this patch to my barebox. and test on my own board. > > > > > > 1. Abort barebox booting and enter the

Re: [PATCH] Documentation: efi: fix typos

2019-09-02 Thread Sascha Hauer
On Fri, Aug 30, 2019 at 02:40:01PM +0200, Ahmad Fatoum wrote: > Signed-off-by: Ahmad Fatoum > --- > Documentation/boards/efi.rst | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Applied, thanks Sascha -- Pengutronix e.K. | |

Re: [PATCH] Documentation: zii-imx7d-dev: Fix errors with openocd configuration script

2019-09-02 Thread Sascha Hauer
On Thu, Aug 29, 2019 at 07:10:25PM +, Cory Tusar wrote: > When attempting to use the existing configuration file to bootstrap an > RMU2 board, openocd would consistently fail in the 'safe_reset' function > with a number of errors. > > Disabling the internal reset handling (similar to what's

Re: [PATCH] gpio: iopoll: implement gpio_poll_timeout_us

2019-09-02 Thread Sascha Hauer
On Thu, Aug 29, 2019 at 02:43:18PM +0200, Ahmad Fatoum wrote: > Sometimes we need to wait for state change on a GPIO, > provide a helper to do this. > > Signed-off-by: Ahmad Fatoum > --- > include/gpio.h | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/include/gpio.h

Re: [PATCH] mtd: spi-nor: Add support for s25fl128s0 s25fl128s1 flashes from Linux

2019-09-02 Thread Sascha Hauer
On Thu, Aug 29, 2019 at 02:03:19AM +0800, iu87m8...@qq.com wrote: > From: DU HUANPENG > > These definitions are taken from Linux's spi-nor driver as of v5.2-rc4 > > Signed-off-by: DU HUANPENG > --- > drivers/mtd/spi-nor/spi-nor.c | 4 > 1 file changed, 4 insertions(+) Applied, thanks

Re: [PATCH v3] elf: add 64 bits elf loading support

2019-09-02 Thread Clément Leger
Hi Oleksij, Thanks for testing, since I only tested on arm, it explain this problem :) I will try to search for all elf->entry usage and fix that according to architectures. Thanks, Clément - On 2 Sep, 2019, at 08:07, Oleksij Rempel o.rem...@pengutronix.de wrote: > Hi Clement, > > thank

Re: [PATCH v3] elf: add 64 bits elf loading support

2019-09-02 Thread Oleksij Rempel
Hi Clement, thank you for your patch. I tested it on MIPS32 system. I get this compile warning: arch/mips/lib/bootm.c: In function 'do_bootm_elf': arch/mips/lib/bootm.c:75:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] entry = (void *)elf->entry;