summaryrefslogtreecommitdiff
path: root/fs/erofs
AgeCommit message (Collapse)Author
2025-12-05fs/erofs: Fix realloc error handlingFrancois Berder
If realloc failed, raw was not freed and thus memory was leaked. Signed-off-by: Francois Berder <fberder@outlook.fr>
2025-07-11fs: erofs: Do NULL check before dereferencing pointerAndrew Goodbody
The assignments to sect and off use the pointer from ctxt.cur_dev but that has not been NULL checked before this is done. So instead move the assignments after the NULL check. This issue found by Smatch Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Gao Xiang <xiang@kernel.org>
2025-02-18fs/erofs: fix an integer overflow in symlink resolutionGao Xiang
See the original report [1], otherwise len + 1 will be overflowed. Note that EROFS archive can record arbitary symlink sizes in principle, so we don't assume a short number like 4096. [1] https://lore.kernel.org/r/20250210164151.GN1233568@bill-the-cat Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support") Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2024-06-14fs/erofs: fix an overflow issue of unmapped extentsJianan Huang
Here the size should be `length - skip`, otherwise it could cause the destination buffer overflow. Reported-by: jianqiang wang <wjq.sec@gmail.com> Fixes: 65cb73057b65 ("fs/erofs: add lz4 decompression support") Signed-off-by: Jianan Huang <jnhuang95@gmail.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2024-04-18fs/erofs: add DEFLATE algorithm supportJianan Huang
This patch adds DEFLATE compression algorithm support. It's a good choice to trade off between compression ratios and performance compared to LZ4. Alternatively, DEFLATE could be used for some specific files since EROFS supports multiple compression algorithms in one image. Signed-off-by: Jianan Huang <jnhuang95@gmail.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2023-08-19fs/erofs: Quieten test for filesystem presenceSimon Glass
At present listing a partition produces lots of errors about this filesystem: => part list mmc 4 cannot find valid erofs superblock cannot find valid erofs superblock cannot read erofs superblock: -5 [9 more similar lines] Use debugging rather than errors when unable to find a signature, as is done with other filesystems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-07fs/erofs: Remove an unnecessary assertionYifan Zhao
In [1] Sam points out an assertion does not hold true for 32-bit platforms, which only impacts Large File Support (LFS) API usage in erofs-utils according to Xiang [2]. We don't think these APIs are used in u-boot and this restriction could be safely 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 <zhaoyifan@sjtu.edu.cn> Tested-by: Sam Edwards <CFSworks@gmail.com>
2023-07-17fs/erofs: Introduce new features including ztailpacking, fragments and dedupeYifan Zhao
This patch updates erofs driver code to catch up with the latest code of erofs_utils (commit e4939f9eaa177e05d697ace85d8dc283e25dc2ed). LZMA will be supported in the separate patch later. Signed-off-by: Yifan Zhao <zhaoyifan@sjtu.edu.cn> Reviewed-by: Huang Jianan <jnhuang95@gmail.com>
2023-02-10Correct SPL use of FS_EROFSSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_FS_EROFS defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Huang Jianan <jnhuang95@gmail.com>
2022-08-13fs/erofs: silence erofs_probe()Heinrich Schuchardt
fs_set_blk_dev() probes all file-systems until it finds one that matches the volume. We do not expect any console output for non-matching file-systems. Convert error messages in erofs_read_superblock() to debug output. Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Huang Jianan <jnhuang95@gmail.com>
2022-03-15fs/erofs: add lz4 decompression supportHuang Jianan
Support EROFS lz4 compressed files. Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2022-03-15fs/erofs: add erofs filesystem supportHuang Jianan
This patch mainly deals with uncompressed files. Signed-off-by: Huang Jianan <jnhuang95@gmail.com>