linux/fs/erofs
Gao Xiang 7cef3c8341 erofs: separate plain and compressed filesystems formally
The EROFS on-disk format uses a tiny, plain metadata design that
prioritizes performance and minimizes complex inconsistencies against
common writable disk filesystems (almost all serious metadata
inconsistency cannot happen in well-designed immutable filesystems like
EROFS). EROFS deliberately avoids artificial design flaws to eliminate
serious security risks from untrusted remote sources by design,
although human-made implementation bugs can still happen sometimes.

Currently, there is no strict check to prevent compressed inodes,
especially LZ4-compressed inodes, from being read in plain filesystems.

Starting with erofs-utils 1.0 and Linux 5.3, LZ4_0PADDING sb feature
is automatically enabled for LZ4-compressed EROFS images to support
in-place decompression. Furthermore, since Linux 5.4 LTS is no longer
supported, we no longer need to handle ancient LZ4-compressed EROFS
images generated by erofs-utils prior to 1.0.

To formally distinguish different filesystem types for improved
security:

 - Use the presence of LZ4_0PADDING or a non-zero
   `dsb->u1.lz4_max_distance` as a marker for compressed filesystems
   containing LZ4-compressed inodes only;

 - For other algorithms, use `dsb->u1.available_compr_algs` bitmap.

Note: LZ4_0PADDING has been supported since Linux 5.4 (the first formal
kernel version), so exposing it via sysfs is no longer necessary and is
now deprecated (but remain it for five more years until 2031):

  `dsb->u1` has been strictly non-zero for all EROFS images containing
  compressed inodes starting with erofs-utils v1.3 and it is actually
  a much better marker for compressed filesystems.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-02-03 11:05:57 +08:00
..
compress.h erofs: enable error reporting for z_erofs_fixup_insize() 2025-11-30 23:49:32 +08:00
data.c erofs: support unencoded inodes for page cache share 2026-01-23 20:02:09 +08:00
decompressor.c erofs: separate plain and compressed filesystems formally 2026-02-03 11:05:57 +08:00
decompressor_crypto.c erofs: make z_erofs_crypto[] static 2026-01-23 00:00:18 +08:00
decompressor_deflate.c erofs: enable error reporting for z_erofs_fixup_insize() 2025-11-30 23:49:32 +08:00
decompressor_lzma.c erofs: enable error reporting for z_erofs_fixup_insize() 2025-11-30 23:49:32 +08:00
decompressor_zstd.c erofs: enable error reporting for z_erofs_fixup_insize() 2025-11-30 23:49:32 +08:00
dir.c erofs: Add support for FS_IOC_GETFSLABEL 2025-09-25 11:26:20 +08:00
erofs_fs.h erofs: separate plain and compressed filesystems formally 2026-02-03 11:05:57 +08:00
fileio.c erofs: support unencoded inodes for page cache share 2026-01-23 20:02:09 +08:00
fscache.c erofs: using domain_id in the safer way 2026-01-23 20:02:09 +08:00
inode.c erofs: separate plain and compressed filesystems formally 2026-02-03 11:05:57 +08:00
internal.h erofs: separate plain and compressed filesystems formally 2026-02-03 11:05:57 +08:00
ishare.c erofs: implement .fadvise for page cache share 2026-01-23 20:02:09 +08:00
Kconfig erofs: support user-defined fingerprint name 2026-01-23 20:01:13 +08:00
Makefile erofs: introduce the page cache share feature 2026-01-23 20:02:09 +08:00
namei.c erofs: get rid of erofs_kmap_type 2025-03-17 01:21:24 +08:00
super.c erofs: separate plain and compressed filesystems formally 2026-02-03 11:05:57 +08:00
sysfs.c erofs: separate plain and compressed filesystems formally 2026-02-03 11:05:57 +08:00
xattr.c erofs: mark inodes without acls in erofs_read_inode() 2026-01-28 15:38:37 +08:00
xattr.h erofs: mark inodes without acls in erofs_read_inode() 2026-01-28 15:38:37 +08:00
zdata.c erofs: support compressed inodes for page cache share 2026-01-23 20:02:09 +08:00
zmap.c erofs: consolidate z_erofs_extent_lookback() 2025-10-22 07:54:31 +08:00
zutil.c The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00