Re: [PATCH v7 7/9] Boot var automatic management for removable medias

2023-10-16 Thread João Marcos Costa
_c.auth', > 'setenv -e -nv -bs -rt -at -i 400:$filesize dbx', > -'efidebug boot next 1', > +'efidebug boot order 1', > 'efidebug test bootmgr']) > assert '\'HELLO_abc\' failed' in ''.join(output) > assert 'efi_start_image() returned: 26' in ''.join(output) > diff --git a/test/py/tests/test_efi_secboot/test_unsigned.py > b/test/py/tests/test_efi_secboot/test_unsigned.py > index df63f0df08..7c078f220d 100644 > --- a/test/py/tests/test_efi_secboot/test_unsigned.py > +++ b/test/py/tests/test_efi_secboot/test_unsigned.py > @@ -36,11 +36,11 @@ class TestEfiUnsignedImage(object): > > output = u_boot_console.run_command_list([ > 'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s > ""', > -'efidebug boot next 1', > +'efidebug boot order 1', > 'bootefi bootmgr']) > assert '\'HELLO\' failed' in ''.join(output) > output = u_boot_console.run_command_list([ > -'efidebug boot next 1', > +'efidebug boot order 1', > 'efidebug test bootmgr']) > assert 'efi_start_image() returned: 26' in ''.join(output) > assert 'Hello, world!' not in ''.join(output) > @@ -65,7 +65,7 @@ class TestEfiUnsignedImage(object): > > output = u_boot_console.run_command_list([ > 'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s > ""', > -'efidebug boot next 1', > +'efidebug boot order 1', > 'bootefi bootmgr']) > assert 'Hello, world!' in ''.join(output) > > @@ -89,11 +89,11 @@ class TestEfiUnsignedImage(object): > > output = u_boot_console.run_command_list([ > 'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s > ""', > -'efidebug boot next 1', > +'efidebug boot order 1', > 'bootefi bootmgr']) > assert '\'HELLO\' failed' in ''.join(output) > output = u_boot_console.run_command_list([ > -'efidebug boot next 1', > +'efidebug boot order 1', > 'efidebug test bootmgr']) > assert 'efi_start_image() returned: 26' in ''.join(output) > assert 'Hello, world!' not in ''.join(output) > @@ -107,11 +107,11 @@ class TestEfiUnsignedImage(object): > > output = u_boot_console.run_command_list([ > 'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s > ""', > -'efidebug boot next 1', > +'efidebug boot order 1', > 'bootefi bootmgr']) > assert '\'HELLO\' failed' in ''.join(output) > output = u_boot_console.run_command_list([ > -'efidebug boot next 1', > +'efidebug boot order 1', > 'efidebug test bootmgr']) > assert 'efi_start_image() returned: 26' in ''.join(output) > assert 'Hello, world!' not in ''.join(output) > diff --git a/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py > b/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py > index 527a556ed8..3b8118104f 100644 > --- a/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py > +++ b/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py > @@ -118,6 +118,12 @@ def test_sqfs_ls(u_boot_console): > """ > build_dir = u_boot_console.config.build_dir > > +# If the EFI subsystem is enabled, default file(e.g. > EFI/BOOT/BOOTAA64.EFI) > +# is scanned when the new disk is detected. This ends up with the > unexpected > +# output at the first 'sqfsls' command. > +# Clear the previous state. > +u_boot_console.restart_uboot() > + > # setup test environment > check_mksquashfs_version() > generate_sqfs_src_dir(build_dir) > -- > 2.34.1 > > Signed-off-by: Joao Marcos Costa -- Best regards, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v7 7/9] Boot var automatic management for removable medias

2023-10-16 Thread João Marcos Costa
Hello again, Em seg., 16 de out. de 2023 às 09:58, João Marcos Costa < jmcosta...@gmail.com> escreveu: > Hello, > > Em seg., 16 de out. de 2023 às 08:47, Masahisa Kojima < > masahisa.koj...@linaro.org> escreveu: > >> From: Raymond Mao >> >&g

Re: [PATCH] fs/squashfs: enable LZ4 compression support

2023-11-06 Thread João Marcos Costa
hanges were tested using a sandbox build. An LZ4 compressed > squashfs image was bound as a host block device. > > Signed-off-by: David Oberhollenzer > --- > [...] Reviewed-by: Joao Marcos Costa -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v1 0/4] Port gen_compile_commands.py from Linux to U-Boot

2023-08-31 Thread João Marcos Costa
n the actual code, as in the help message, docstrings, and comments. Would you have any suggestions? -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v1 0/4] Port gen_compile_commands.py from Linux to U-Boot

2023-08-31 Thread João Marcos Costa
Hello Yannic, Em seg., 28 de ago. de 2023 às 10:09, Yannic Moog escreveu: > > Can you also add a patch to add the compile_commands.json to > .gitignore, please? > > Yannic > Absolutely. I will add such patch in the v2 series. Thanks for the suggestion. -- Atenciosamente,

Re: [PATCH v2 6/6] doc: add documentation for gen_compile_commands.py

2023-09-02 Thread João Marcos Costa
ks. > > -- > Tom > I'm not sure what's the most pertinent category in 'develop/index.rst'. Would 'general' be a good idea? I thought about putting it in the same category as checkpatch, but this isn't refactoring per se. Thanks. -- Atenciosament

Re: [PATCH v3 0/7] Port gen_compile_commands.py from Linux to U-Boot

2023-09-13 Thread João Marcos Costa
Hello, Em sáb., 2 de set. de 2023 às 16:53, Joao Marcos Costa escreveu: > Hello U-Boot community, > > I'm submitting a patch series that ports the gen_compile_commands.py > script from the Linux kernel's sources to U-Boot. This script, originally > located in scripts/clang-tools/gen_compile_comm

Re: [PATCH] scripts: gen_compile_commands: fix invalid escape sequence warning

2024-05-03 Thread João Marcos Costa
x.replace(r'\#', '#').replace('$(pound)', '#') > > # Return the canonical path, eliminating any symbolic links > encountered in the path. > abs_path = os.path.realpath(os.path.join(root_directory, file_path)) > if not os.path.exists(abs_path): > -- > 2.45.0 > > Reviewed-by: João Marcos Costa -- Atenciosamente, João Marcos Costa

Re: [PATCH v2 27/28] fs/squashfs: sqfs_read: fragmented files are not supported

2021-05-16 Thread João Marcos Costa
Hello, Em ter., 11 de mai. de 2021 às 10:04, Richard Genoud < richard.gen...@posteo.net> escreveu: > Hi all, > > Le 08/05/2021 à 23:51, Simon Glass a écrit : > > Hi, > > > > On Thu, 4 Feb 2021 at 15:32, João Marcos Costa > wrote: > >> > >

Re: [PATCH] fs/squashfs: fix reading of fragmented files

2021-05-20 Thread João Marcos Costa
by: Richard Genoud > > Tested it on real hardware, with mksquashfs -always-use-fragments, loading > a kernel (fit) from squashfs. > It wasn't working before the patch, and works after. > > Thanks ! > Great! Thanks for testing! -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH] fs/squashfs: fix reading of fragmented files

2021-05-26 Thread João Marcos Costa
essed and uncompressed fragments. > > > > Signed-off-by: Joao Marcos Costa > > Reviewed-by: Miquel Raynal > > But next time, when you fix two issues (even if they fix the same > feature) please provide two patches ;) > > Thanks, > Miquèl > Will do! Thanks for the review! Best regards, Joao -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH 1/3] test/py: rewrite common tools for SquashFS tests

2021-05-29 Thread João Marcos Costa
> function comments? pylint3 will tell you about it if you run it on > this file. > > [...] > > Regards, > Simon > Absolutely, Simon, and thanks for suggesting pylint3! -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH] fs/squashfs: fix reading of fragmented files

2021-06-09 Thread João Marcos Costa
Hello, everyone Em qua., 26 de mai. de 2021 às 09:35, João Marcos Costa < jmcosta...@gmail.com> escreveu: > Hello, Miquèl > > Em qua., 26 de mai. de 2021 às 04:52, Miquel Raynal < > miquel.ray...@bootlin.com> escreveu: > >> Hi Joao, >> >> Joao Marcos

Re: [PATCH] fs/squashfs: fix reading of fragmented files

2021-06-09 Thread João Marcos Costa
suite is error-prone, as it was already reported. Best regards, Em qua., 9 de jun. de 2021 às 14:40, Tom Rini escreveu: > > On Wed, Jun 09, 2021 at 10:16:53AM -0300, João Marcos Costa wrote: > > Hello, everyone > > > > Em qua., 26 de mai. de 2021 às 09:35, João Ma

Re: [PATCH] fs/squashfs: fix reading of fragmented files

2021-06-09 Thread João Marcos Costa
By the way, I apologize for the top-posting on this previous email I sent.

Re: [PATCH v2 27/28] fs/squashfs: sqfs_read: fragmented files are not supported

2021-02-04 Thread João Marcos Costa
the wrong quoting style - we have settled on a single > quote by default in U-Boot. > > Finally, the tests and some functions need comments about what they do > and what the arguments are. > > Please can you take a look? Absolutely. Excuse me for such a late reply. > > Tha

Re: [PATCH] test/py: Improve check for mksquashfs version

2021-07-23 Thread João Marcos Costa
squashfs_version(): > """ Checks if mksquashfs meets the required version. """ > -- > 2.31.1 > Reviewed-by: Joao Marcos Costa Thanks! -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH] Fix a squashfs crash when reading large directories

2020-11-22 Thread João Marcos Costa
Em dom, 22 de nov de 2020 18:02, Campbell Suter escreveu: > SquashFS encodes directories with more than 256 entries, with xattrs or > a few other things with a different type of inode than most directories. > > This type of directory entry has an indexing feature to increase the > performance of

Re: [PATCH] fs/squashfs: fix memory leak in sqfs_read()

2020-10-25 Thread João Marcos Costa
Reviewed-by: João Marcos Costa Em dom., 25 de out. de 2020 às 14:46, Barbaros Tokaoglu < btokao...@airspan.com> escreveu: > data_buffer should be freed on each iteration > > Signed-off-by: Barbaros Tokaoglu > --- > fs/squashfs/sqfs.c | 21 +++-- > 1 fil

Re: [PATCH] fs/squashfs: Fix index off by 1 for inode SQFS_LDIR_TYPE

2020-10-30 Thread João Marcos Costa
di = (void *)di + sizeof(*di) + sz; > @@ -57,7 +57,7 @@ int sqfs_inode_size(struct squashfs_base_inode *inode, > u32 blk_size) > } > > return sizeof(*ldir) + index_list_size + > - (i_count + 1) * SQFS_DIR_INDEX_BASE_LENGTH; > +

Re: [PATCH v2 01/28] fs/squashfs: fix board hang-up when calling .exists()

2020-11-03 Thread João Marcos Costa
orted, > + .write = fs_write_unsupported, > + .ln = fs_ln_unsupported, > + .unlink = fs_unlink_unsupported, > + .mkdir = fs_mkdir_unsupported, > }, > #endif > { > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 03/28] fs/squashfs: sqfs_opendir: simplify error handling

2020-11-03 Thread João Marcos Costa
free(token_list[j]); > free(token_list); > free(pos_list); > -free_path: > free(path); > -free_inode_table: > - if (ret) > + if (ret) { > free(inode_table); > -free_dirs: > - if (ret) > free(dirs); > + } > > return ret; > } > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 04/28] fs/squashfs: sqfs_closedir: fix memory leak

2020-11-03 Thread João Marcos Costa
s_dirs->dir_table); > free(sqfs_dirs->dir_header); > + free(sqfs_dirs); > } > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 05/28] fs/squashfs: sqfs_split_path: fix memory leak and dangling pointers

2020-11-03 Thread João Marcos Costa
me); > if (!*dir) { > ret = -ENOMEM; > - goto free_basec; > + goto out; > } > } > > -free_basec: > +out: > + if (ret) { > + free(*file); > + free(*dir); > + *dir = NULL; > + *file = NULL; > + } > free(basec); > -free_dirc: > free(dirc); > -free_tmp: > free(tmp_path); > > return ret; > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 06/28] fs/squashfs: sqfs_read_directory_table: fix memory leak

2020-11-03 Thread João Marcos Costa
u32 **pos_list) > src_table += src_len + SQFS_HEADER_SIZE; > } > > -free_dtb: > +out: > + if (metablks_count < 1) { > + free(*dir_table); > + free(*pos_list); > + *dir_table = NULL; > + *pos_list = NULL; > + } > free(dtb); > > return metablks_count; > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 08/28] fs/squashfs: sqfs_search_dir: fix memory leaks

2020-11-03 Thread João Marcos Costa
quot;Empty directory.\n"); > free(dirs->entry); > dirs->entry = NULL; > - return SQFS_EMPTY_DIR; > + ret = SQFS_EMPTY_DIR; > + goto out; > } > > dirs->table += SQFS_DIR_HEADER_SIZE; > @@ -579,7 +611,13 @@ static int sqfs_search_dir(struct squashfs_dir_stream > *dirs, char **token_list, > else > memcpy(&dirs->i_ldir, ldir, sizeof(*ldir)); > > - return 0; > +out: > + free(res); > + free(rem); > + free(path); > + free(target); > + free(sym_tokens); > + return ret; > } > > /* > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 10/28] fs/squashfs: sqfs_concat_tokens: check if malloc succeeds

2020-11-03 Thread João Marcos Costa
= sqfs_get_tokens_length(token_list, token_count); > > result = malloc(length + 1); > + if (!result) > + return NULL; > + > result[length] = '\0'; > > for (i = 0; i < token_count; i++) { > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 15/28] fs/squashfs: sqfs_read: fix memory leak

2020-11-03 Thread João Marcos Costa
6 +1531,7 @@ free_datablk: > free_paths: > free(file); > free(dir); > + sqfs_closedir(dirsp); > > return ret; > } > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 18/28] fs/squashfs: sqfs_get_abs_path: fix error check

2020-11-03 Thread João Marcos Costa
359,7 @@ static char *sqfs_get_abs_path(const char *base, const > char *rel) > if (ret) > goto free_r_tokens; > > - sqfs_tokenize(rel_tokens, rc, rel); > + ret = sqfs_tokenize(rel_tokens, rc, rel); > if (ret) >

Re: [PATCH v2 19/28] fs/squashfs: sqfs_get_abs_path: fix possible memory leak on error

2020-11-03 Thread João Marcos Costa
-free_r_tokens_loop: > - for (i = 0; i < rc; i++) > - free(rel_tokens[i]); > - for (i = 0; i < bc; i++) > - free(base_tokens[i]); > -free_r_tokens: > +out: > + if (rel_tokens) > + for (i = 0; i < rc; i++) > +

Re: [PATCH v2 17/28] fs/squashfs: sqfs_frag_lookup: simplify error handling

2020-11-03 Thread João Marcos Costa
+ goto out; > } > } else { > memcpy(entries, metadata, SQFS_METADATA_SIZE(header)); > @@ -181,11 +187,9 @@ static int sqfs_frag_lookup(u32 inode_fragment_index, > *e = entries[offset]; > ret = SQFS_COMPRESSED_BLOCK(e->size); > > -free_entries: > +out: > free(entries); > -free_buffer: > free(metadata_buffer); > -free_table: > free(table); > > return ret; > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 20/28] fs/squashfs: sqfs_read: fix memory leak on finfo.blk_sizes

2020-11-03 Thread João Marcos Costa
fragment_block); > - goto free_fragment; > + goto out; > } > > for (j = offset + *actread; j < finfo.size; j++) { > @@ -1530,17 +1528,15 @@ int sqfs_read(const char *filename, void *buf, > loff_t offset, loff_t len, > } > } > > -free_fragment: > +out: > free(fragment); > -free_buffer: > - if (datablk_count) > + if (datablk_count) { > free(data_buffer); > -free_datablk: > - if (datablk_count) > free(datablock); > -free_paths: > + } > free(file); > free(dir); > + free(finfo.blk_sizes); > sqfs_closedir(dirsp); > > return ret; > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 21/28] fs/squashfs: sqfs_probe: fix possible memory leak on error

2020-11-03 Thread João Marcos Costa
gt; + ctxt.cur_dev = NULL; > + free(ctxt.sblk); > + ctxt.sblk = NULL; > + return ret; > } > > static char *sqfs_basename(char *path) > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 24/28] fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value

2020-11-03 Thread João Marcos Costa
nt sqfs_probe(struct blk_desc *fs_dev_desc, struct > disk_partition *fs_partition > ctxt.sblk = sblk; > > ret = sqfs_decompressor_init(&ctxt); > - > if (ret) { > - ret = -EINVAL; > goto error; > } > > --

Re: [PATCH v2 28/28] fs/squashfs: implement exists() function

2020-11-03 Thread João Marcos Costa
robe(struct blk_desc *fs_dev_desc, > int sqfs_read(const char *filename, void *buf, loff_t offset, > loff_t len, loff_t *actread); > int sqfs_size(const char *filename, loff_t *size); > +int sqfs_exists(const char *filename); > void sqfs_close(void); > void sqfs_closedir(struct fs_dir_stream *dirs); > > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH v2 00/28] fs/squashfs: fix memory leaks and introduce exists() function

2020-11-03 Thread João Marcos Costa
n error > >fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value > >fs/squashfs: sqfs_read: don't write beyond buffer size > >fs/squashfs: sqfs_read: remove buggy offset functionality > >fs/squashfs: sqfs_read: fragmented files are not supported > >fs/squashfs: implement exists() function > > > > fs/fs.c| 7 + > > fs/squashfs/sqfs.c | 399 +++-- > > include/squashfs.h | 1 + > > 3 files changed, 286 insertions(+), 121 deletions(-) > > > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta

Re: [PATCH] fs/sqaushfs: avoid illegal free() in sqfs_opendir()

2025-04-14 Thread João Marcos Costa
free(token_list[j]); > + free(token_list); > + } > free(pos_list); > free(path); > if (ret) { > -- > 2.48.1 > > Thanks for your patch. Just a nit, though: there's a typo in the patch title ('sqaushfs'). Reviewed-by: Joao Marcos Costa -- Best regards, João Marcos Costa