Re: [PATCH] fs/erofs: fix an overflow issue of unmapped extents

2024-06-05 Thread Gao Xiang
On 2024/6/5 22:05, Jianan Huang wrote: Here the size should be `length - skip`, otherwise it could cause the destination buffer overflow. Reported-by: jianqiang wang Fixes: 65cb73057b65 ("fs/erofs: add lz4 decompression support") Signed-off-by: Jianan Huang Reviewed-by:

Re: Several potential vulnerabilities in the filesystem

2024-06-05 Thread Gao Xiang
On 2024/6/5 19:26, jianqiang wang wrote: Hi Xiang, I just checked the second crash, the patch can solve this issue. Did you also look into the other two issues? I'm only responsible for the EROFS project. Thanks, Gao Xiang Best Jianqiang Gao Xiang 于2024年6月5日周三 13:18写道: Hi Jianqiang

Re: Several potential vulnerabilities in the filesystem

2024-06-05 Thread Gao Xiang
/commit/?id=884866ca07817e97c59605a2fa858a0b732d3f3c Would you mind checking if the patch above fixes the issue? Hi Jianan, Would you mind backporting this patch for u-boot? Thanks, Gao Xiang Best regards Gao Xiang 于2024年6月5日周三 05:10写道: On 2024/6/5 06:53, jianqiang wang wrote: Hi

Re: Several potential vulnerabilities in the filesystem

2024-06-04 Thread Gao Xiang
observation. Thanks, Gao XIang

Re: [PATCH v4 2/5] lib/lz4: update LZ4 decompressor module

2024-05-28 Thread Gao Xiang
optimization more than old version, if memcpy() assembly doesn't generate well on your platform, it might have some issue. Thanks, Gao Xiang My patch: --- a/lib/lz4.c +++ b/lib/lz4.c @@ -41,6 +41,16 @@ static FORCE_INLINE u16 LZ4_readLE16(const void *src) return get_unaligned_le16(src);

Re: [PATCH v4 2/5] lib/lz4: update LZ4 decompressor module

2024-05-24 Thread Gao Xiang
the old codebase was based on) and the new version mainly relies on memcpy/memmove instead of its own versions. Would you mind to check the assembly how memcpy/memset is generated on your platform? Thanks, Gao Xiang Thanks. Regards, Jonathan

Re: [PATCH] fs/erofs: add DEFLATE algorithm support

2024-04-16 Thread Gao Xiang
les since EROFS > supports multiple compression algorithms in one image. > > Signed-off-by: Jianan Huang Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH 1/1] fs/erofs: avoid noisy messages

2023-08-17 Thread Gao Xiang
patch. For this patch, Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH 12/24] fs/erofs: Quieten test for filesystem presence

2023-08-13 Thread Gao Xiang
Use debugging rather than errors when unable to find a signature, as is done with other filesystems. Signed-off-by: Simon Glass Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH] fs/erofs: Remove an unnecessary assertion

2023-07-26 Thread Gao Xiang
removed. [1] https://lists.denx.de/pipermail/u-boot/2023-July/524679.html [2] https://lists.denx.de/pipermail/u-boot/2023-July/524727.html Fixes: 3a21e92fc255 ("fs/erofs: Introduce new features including ztailpacking, fragments and dedupe") Signed-off-by: Yifan Zhao Acked-by: Gao Xian

Re: [PATCH] fs/erofs: Introduce new features including ztailpacking, fragments and dedupe

2023-07-25 Thread Gao Xiang
s you said) nor u-boot interfaces (I think). Yifan, Could you submit a patch to remove this line? Thanks, Gao Xiang Thanks, Sam

Re: [PATCH] fs/erofs: Introduce new features including ztailpacking, fragments and dedupe

2023-07-17 Thread Gao Xiang
On 2023/7/17 23:12, Tom Rini wrote: On Mon, Jul 17, 2023 at 01:27:39PM +0800, Gao Xiang wrote: Hi Tom, On 2023/7/7 23:52, Yifan Zhao wrote: This patch updates erofs driver code to catch up with the latest code of erofs_utils (commit e4939f9eaa177e05d697ace85d8dc283e25dc2ed). LZMA

Re: [PATCH] fs/erofs: Introduce new features including ztailpacking, fragments and dedupe

2023-07-16 Thread Gao Xiang
://github.com/u-boot/u-boot/pull/344 Could you consider this patch for this merge window? LZMA support needs further work, we will address it separately. Thanks, Gao Xiang

Re: [PATCH 1/1] fs/erofs: silence erofs_probe()

2022-07-31 Thread Gao Xiang
blksize %u isn't supported on this platform", > > >1 << blkszbits); > > > > Does this message appear in normal scanning, or is it a genuine error? > > The erofs driver on Linux only supports LOG_BLOCK_SIZE == 12. So if we see > this message we don't have a valid erofs file system. > > @linux-erofs: > > The Linux driver requires EROFS_BLKSIZ == PAGE_SIZE == 4096. > The page size on arm64 can be 4 KiB, 16 KiB, or 64 KiB. > The page size on amd64 can be 4 KiB, 2 MiB or 4 MiB. > Requiring EROFS_BLKSIZ == PAGE_SIZE is obviously a restriction that should > be lifted. Yeah, EROFS doesn't support EROFS_BLKSIZ != PAGE_SIZE explicitly for now, please help error out this message. Thanks! Thanks, Gao Xiang > > Best regards > > Heinrich

Re: [PATCH v3 0/5] fs/erofs: new filesystem

2022-02-10 Thread Gao Xiang
On Thu, Feb 10, 2022 at 08:34:55AM -0500, Tom Rini wrote: > On Thu, Feb 10, 2022 at 08:43:20PM +0800, Gao Xiang wrote: > > > Hi Tom, > > > > Would you mind taking some time having a look at this version > > if it meets what's needed, so we could have a chance to be

Re: [PATCH v3 0/5] fs/erofs: new filesystem

2022-02-10 Thread Gao Xiang
erofs-utils versions. Thanks, Gao Xiang On Tue, Feb 08, 2022 at 10:05:08PM +0800, Huang Jianan wrote: > Changes since v2: > - sync up with erofs-utils 1.4; > - update lib/lz4 to v1.8.3; > - add test for filesystem functions; > > Changes since v1: > - fix the inconsistency

Re: [PATCH v2 0/3] fs/erofs: new filesystem

2022-01-05 Thread Gao Xiang
ort > > fs/erofs: add lz4 1.8.3 decompressor > > fs/erofs: add lz4 decompression support > > Aside from what I've just now sent, can you please extend the existing > py/tests/ to cover basic functionality here, ensure they run on sandbox > and in CI? Thanks. Any further progress on this work? At least sync it up with erofs-utils 1.4? Thanks, Gao Xiang > > -- > Tom

Re: [PATCH v2 1/3] fs/erofs: add erofs filesystem support

2021-08-30 Thread Gao Xiang
d, and some > > come frome using custom macros. It seems that there are still some warnings > > that are inconsistent with the linux kernel, such as : > > > > WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where > > possible > > #835: FILE: fs/erofs/fs.c:224: > > +#ifdef CONFIG_LIB_UUID > > > > WARNING: Possible switch case/default not preceded by break or fallthrough > > comment > > #763: FILE: fs/erofs/zmap.c:489: > > +   case Z_EROFS_VLE_CLUSTER_TYPE_NONHEAD: > > > > erofs-utils is written according to the linux kernel coding style, I expect > > this > > part can be consistent in order to reduce maintenance burden and keep > > with the latest feature. > > Yes, please fix what can be easily fixed and still kept in sync with > other projects. Agreed, erofs-utils follows linux kernel style. Maybe we could fix both together if easily fixed... Thanks, Gao Xiang > > -- > Tom

Re: [PATCH v2 0/3] fs/erofs: new filesystem

2021-08-24 Thread Gao Xiang
oking into this? I think adding erofs support to U-Boot is useful for booting with erofs. And keep sync with erofsfuse code in erofs-utils is a good strategy for latest feature. Thanks in advance. Thanks, Gao Xiang > > fs/Kconfig| 1 + > fs/Makefile | 1 +