linux_dsm_epyc7002/fs/erofs
Gao Xiang 0dcd3c94e0 erofs: fix extended inode could cross boundary
Each ondisk inode should be aligned with inode slot boundary
(32-byte alignment) because of nid calculation formula, so all
compact inodes (32 byte) cannot across page boundary. However,
extended inode is now 64-byte form, which can across page boundary
in principle if the location is specified on purpose, although
it's hard to be generated by mkfs due to the allocation policy
and rarely used by Android use case now mainly for > 4GiB files.

For now, only two fields `i_ctime_nsec` and `i_nlink' couldn't
be read from disk properly and cause out-of-bound memory read
with random value.

Let's fix now.

Fixes: 431339ba90 ("staging: erofs: add inode operations")
Cc: <stable@vger.kernel.org> # 4.19+
Link: https://lore.kernel.org/r/20200729175801.GA23973@xiangao.remote.csb
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2020-08-03 21:04:46 +08:00
..
compress.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
data.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
decompressor.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
dir.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
erofs_fs.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
inode.c erofs: fix extended inode could cross boundary 2020-08-03 21:04:46 +08:00
internal.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
Kconfig erofs: support superblock checksum 2019-11-24 11:02:41 +08:00
Makefile erofs: move erofs out of staging 2019-08-24 14:20:10 +02:00
namei.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
super.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
tagptr.h erofs: move erofs out of staging 2019-08-24 14:20:10 +02:00
utils.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
xattr.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
xattr.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zdata.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zdata.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zmap.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zpvec.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00