Re: [U-Boot] [PATCH v2 2/8] fs/fat: introduce new director iterators

2017-09-09 Thread Rob Clark
On Sat, Sep 9, 2017 at 12:55 AM, Simon Glass wrote: > Hi Rob, > > On 5 September 2017 at 03:54, Rob Clark wrote: >> On Tue, Sep 5, 2017 at 4:56 AM, Simon Glass wrote: >>> Hi Rob, >>> >>> On 3 September 2017 at 00:37, Rob Clark wrote: Untangle directory traversal into a simple iterator, to

[U-Boot] [PATCH v2 0/5] vsprintf and short-wchar

2017-09-09 Thread Rob Clark
This patchset enables -fshort-wchar and adds support to vsprintf (%ls), along with GUID printing. Both things needed by efi_loader. Unlike the previous version of the patchset, which had a kconfig option selected by efi_loader to enable -fshort-wchar, and at Tom's suggestion, this patchset uncond

[U-Boot] [PATCH v2 1/5] kbuild: Enable -fshort-wchar

2017-09-09 Thread Rob Clark
EFI_LOADER really wants UTF-16 strings (ie. %ls and L"string" are 16bit chars instead of 32bit chars). But rather than enabling -fshort-wchar conditionally if EFI_LOADER is enabled, it was deemed preferrable to globally switch. Signed-off-by: Rob Clark --- Makefile | 1 + 1 file changed, 1 inse

[U-Boot] [PATCH v2 4/5] vsprintf.c: add GUID printing

2017-09-09 Thread Rob Clark
This works (roughly) the same way as linux's, but we currently always print lower-case (ie. we just keep %pUB and %pUL for compat with linux), mostly just because that is what uuid_bin_to_str() supports. %pUb: 01020304-0506-0708-090a-0b0c0d0e0f10 %pUl: 04030201-0605-0807-090a-0b0c0d0e0f10

[U-Boot] [PATCH v2 5/5] examples: add fallback memcpy

2017-09-09 Thread Rob Clark
Solves build issue: Building current source for 134 boards (12 threads, 1 job per thread) arm: + lsxhl +examples/api/vsprintf.o: In function `string16': +lib/vsprintf.c:278: undefined reference to `memcpy' +examples/api/uuid.o: In function `uuid_bin_to_str': +lib/uuid.c:197:

[U-Boot] [PATCH v2 3/5] vsprintf.c: add UTF-16 string (%ls) support

2017-09-09 Thread Rob Clark
This is convenient for efi_loader which deals a lot with UTF-16. Only enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when CC_SHORT_WCHAR is not enabled. Signed-off-by: Rob Clark Reviewed-by: Simon Glass --- examples/api/Makefile | 1 + lib/vsprintf.c| 30 +++

[U-Boot] [PATCH v2 2/5] lib: add some utf16 handling helpers

2017-09-09 Thread Rob Clark
We'll eventually want these in a few places in efi_loader, and also vsprintf. Signed-off-by: Rob Clark --- include/charset.h| 65 lib/Makefile | 1 + lib/charset.c| 101 +++ lib/ef

Re: [U-Boot] [PATCH 05/13] usb: gadget: Make g_dnl USB settings common

2017-09-09 Thread Łukasz Majewski
Hi Maxime, The g_dnl USB settings for the vendor ID, product ID and manufacturer are actually common settings that can and should be shared by all the gadgets. Make them common by renaming them, and convert all the users. Reviewed-by: Lukasz Majewski Signed-off-by: Maxime Ripard --- bo

[U-Boot] VU#166743: Das U-Boot AES-CBC encryption

2017-09-09 Thread Blibbet
I apologize if I missed it, but I haven't see any mention of this recent vulnerability here, excerpts below. http://www.kb.cert.org/vuls/id/166743 -snip- Vulnerability Note VU#166743 Das U-Boot AES-CBC encryption implementation contains multiple vulnerabilities Original Release date: 08

[U-Boot] [PATCH v3 0/9] fs/fat: cleanups + readdir implementation

2017-09-09 Thread Rob Clark
Introduce directory traversal iterators, and implement fs_readdir() which is needed by EFI_LOADER. The part re-working fat.c to use the directory iterators itself is nearly a 2:1 negative diffstat, and a pretty big cleanup. I fixed one or two other small issues along the way. v2: fix a couple is

[U-Boot] [PATCH v3 1/9] fs/fat: split out helper to init fsdata

2017-09-09 Thread Rob Clark
Want to re-use this in fat dirent iterator in next patch. Signed-off-by: Rob Clark Reviewed-by: Łukasz Majewski Reviewed-by: Simon Glass --- fs/fat/fat.c | 73 +++ include/fat.h | 1 + 2 files changed, 44 insertions(+), 30 deletions(-)

[U-Boot] [PATCH v3 5/9] fs/fat: implement opendir/readdir/closedir

2017-09-09 Thread Rob Clark
Implement the readdir interface using the directory iterators. Signed-off-by: Rob Clark Reviewed-by: Łukasz Majewski --- fs/fat/fat.c | 61 1 file changed, 61 insertions(+) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index bbba7947ee..8

[U-Boot] [PATCH v3 4/9] fs: add fs_readdir()

2017-09-09 Thread Rob Clark
Needed to support efi file protocol. The fallback.efi loader wants to be able to read the contents of the /EFI directory to find an OS to boot. Modelled after POSIX opendir()/readdir()/closedir(). Unlike the other fs APIs, this is stateful (ie. state is held in the FS_DIR "directory stream"), to

[U-Boot] [PATCH v3 8/9] fs/fat: fix case for FAT shortnames

2017-09-09 Thread Rob Clark
Noticed when comparing our output to linux. There are some lcase bits which control whether filename and/or extension should be downcase'd. Signed-off-by: Rob Clark Reviewed-by: Łukasz Majewski --- fs/fat/fat.c | 16 ++-- fs/fat/fat_write.c | 4 ++-- include/fat.h | 6

[U-Boot] [PATCH v3 3/9] fat/fs: convert to directory iterators

2017-09-09 Thread Rob Clark
And drop a whole lot of ugly code! Signed-off-by: Rob Clark Reviewed-by: Łukasz Majewski --- fs/fat/fat.c | 722 +++--- include/fat.h | 6 - 2 files changed, 76 insertions(+), 652 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index

[U-Boot] [PATCH v3 6/9] fat/fs: remove a bunch of dead code

2017-09-09 Thread Rob Clark
Spotted by chance, when trying to remove file_fat_ls(), I noticed there were some dead users of the API. Signed-off-by: Rob Clark Acked-by: Stefan Brüns Reviewed-by: Simon Glass --- fs/fat/Makefile | 4 -- fs/fat/file.c | 183 includ

[U-Boot] [PATCH v3 9/9] fs/fat: Clean up open-coded sector <-> cluster conversions

2017-09-09 Thread Rob Clark
Use the clust_to_sect() helper that was introduced earlier, and add an inverse sect_to_clust(), plus update the various spots that open-coded this conversion previously. Signed-off-by: Rob Clark --- fs/fat/fat.c | 8 +++- fs/fat/fat_write.c | 8 +++- include/fat.h | 6 +-

[U-Boot] [PATCH v3 7/9] fat/fs: move ls to generic implementation

2017-09-09 Thread Rob Clark
Add a generic implementation of 'ls' using opendir/readdir/closedir, and replace fat's custom implementation. Other filesystems should move to the generic implementation after they add opendir/readdir/closedir support. Signed-off-by: Rob Clark Reviewed-by: Łukasz Majewski Reviewed-by: Simon Gla

[U-Boot] [PATCH v3 2/9] fs/fat: introduce new director iterators

2017-09-09 Thread Rob Clark
Untangle directory traversal into a simple iterator, to replace the existing multi-purpose do_fat_read_at() + get_dentfromdir(). Signed-off-by: Rob Clark Reviewed-by: Łukasz Majewski --- fs/fat/fat.c | 356 +- include/fat.h | 7 ++ 2 fi

Re: [U-Boot] VU#166743: Das U-Boot AES-CBC encryption

2017-09-09 Thread Tom Rini
On Sat, Sep 09, 2017 at 09:29:45AM -0700, Blibbet wrote: > I apologize if I missed it, but I haven't see any mention of this recent > vulnerability here, excerpts below. > > http://www.kb.cert.org/vuls/id/166743 > > -snip- > Vulnerability Note VU#166743 > > Das U-Boot AES-CBC encryption

[U-Boot] Building qemu-x86_64_defconfig fails: u-boot-spl-nodtb.bin of 4, 293, 642, 704 bytes

2017-09-09 Thread Heinrich Schuchardt
export BUILD_ROM=y make mrproper make qemu-x86_64_defconfig make results in a file u-boot-spl-nodtb.bin of 4,293,642,704 bytes for git HEAD. The problematic statement is objcopy -O binary -R .start16 -R .resetvec \ spl/u-boot-spl spl/u-boot-spl-nodtb.bin spl/u-boot-spl has 2,385,168 bytes. M

[U-Boot] [PATCH 0/2] GPT: create block device for guid testing

2017-09-09 Thread alison
From: Alison Chaiken Simon Glass asked: > Can you please move this into the Python script so that it is created > automatically and deleted at the end. In this version, the device creation is moved to a Python function that the pytest framework can invoke, and a description of the function is a

[U-Boot] [PATCH 2/2] add pytests for 'gpt guid' command in sandbox

2017-09-09 Thread alison
From: Alison Chaiken Run unit tests for the 'gpt guid' command, making use of the block device created by test/py/make_test_disk.py. Remove this device at the end of the tests. Signed-off-by: Alison Chaiken --- test/py/tests/test_gpt.py | 38 ++ 1 file chan

[U-Boot] [PATCH 1/2] GPT: create block device for sandbox testing

2017-09-09 Thread alison
From: Alison Chaiken Provide a Python function that creates a small block device for the purpose of testing the cmd/gpt.c or cmd/part.c functions in the u-boot sandbox. Signed-off-by: Alison Chaiken --- board/sandbox/README.sandbox | 5 + test/py/make_test_disk.py| 19

[U-Boot] [PATCH 1/1] add pytests for 'gpt rename' and 'gpt swap'

2017-09-09 Thread alison
From: Alison Chaiken Add unit tests for the 'gpt rename' and 'gpt swap' commands that rely on the block device created by test/py/make_test_disk.py. Add CONFIG_CMD_GPT_RENAME to the sandbox_defconfig. Remove the testdisk.raw test device at the end of the tests. Signed-off-by: Alison Chaiken --

[U-Boot] [PATCH v2 1/3] add pytests for 'gpt rename' and 'gpt swap'

2017-09-09 Thread alison
From: Alison Chaiken On Tue, Sep 5, 2017 at 1:55 AM, Simon Glass wrote: > How about we add this to sandbox_defconfig instead? So done. -- Alison Alison Chaiken (1): add pytests for 'gpt rename' and 'gpt swap' configs/sandbox_defconfig | 1 + test/py/tests/test_gpt.py | 31 +++