linux/fs/udf
lianzhi chang 5cdc4a6950 udf: fix the problem that the disc content is not displayed
When the capacity of the disc is too large (assuming the 4.7G
specification), the disc (UDF file system) will be burned
multiple times in the windows (Multisession Usage). When the
remaining capacity of the CD is less than 300M (estimated
value, for reference only), open the CD in the Linux system,
the content of the CD is displayed as blank (the kernel will
say "No VRS found"). Windows can display the contents of the
CD normally.
Through analysis, in the "fs/udf/super.c": udf_check_vsd
function, the actual value of VSD_MAX_SECTOR_OFFSET may
be much larger than 0x800000. According to the current code
logic, it is found that the type of sbi->s_session is "__s32",
 when the remaining capacity of the disc is less than 300M
(take a set of test values: sector=3154903040,
sbi->s_session=1540464, sb->s_blocksize_bits=11 ), the
calculation result of "sbi->s_session << sb->s_blocksize_bits"
 will overflow. Therefore, it is necessary to convert the
type of s_session to "loff_t" (when udf_check_vsd starts,
assign a value to _sector, which is also converted in this
way), so that the result will not overflow, and then the
content of the disc can be displayed normally.

Link: https://lore.kernel.org/r/20210114075741.30448-1-changlianzhi@uniontech.com
Signed-off-by: lianzhi chang <changlianzhi@uniontech.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2021-01-18 12:06:33 +01:00
..
balloc.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
dir.c udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF 2017-10-17 11:56:45 +02:00
directory.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
ecma_167.h udf: Replace HTTP links with HTTPS ones 2020-07-14 14:37:39 +02:00
file.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
ialloc.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
inode.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
lowlevel.c udf: stop using ioctl_by_bdev 2020-05-04 10:13:42 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
misc.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
namei.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
osta_udf.h udf: osta_udf.h: delete a duplicated word 2020-07-27 10:58:55 +02:00
partition.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
super.c udf: fix the problem that the disc content is not displayed 2021-01-18 12:06:33 +01:00
symlink.c udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
truncate.c udf: Fix spelling in EXT_NEXT_EXTENT_ALLOCDESCS 2020-01-08 11:11:46 +01:00
udf_i.h udf: Remove pointless union in udf_inode_info 2020-09-29 17:21:54 +02:00
udf_sb.h udf: udf_sb.h: Replace zero-length array with flexible-array member 2020-03-16 15:57:09 +01:00
udfdecl.h udf: augment UDF permissions on new inodes 2019-08-27 15:38:46 +02:00
udfend.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
udftime.c udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
unicode.c udf: Allow mounting volumes with incorrect identification strings 2018-11-19 10:27:59 +01:00