diff options
author | Steve Magnani <steve.magnani@digidescorp.com> | 2017-10-12 15:48:40 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-10-17 11:56:45 +0200 |
commit | b490bdd630cc43a5725e76c7c23f8a7e55551145 (patch) | |
tree | 9ee95e0af7d247b2a8b282b2b5ed1a783465e9da /fs/udf/ialloc.c | |
parent | udf: Remove some outdate references from documentation (diff) | |
download | linux-b490bdd630cc43a5725e76c7c23f8a7e55551145.tar.xz linux-b490bdd630cc43a5725e76c7c23f8a7e55551145.zip |
udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF
Large (> 1 TiB) UDF filesystems appear subject to several problems when
mounted on 64-bit systems:
* readdir() can fail on a directory containing File Identifiers residing
above 0x7FFFFFFF. This manifests as a 'ls' command failing with EIO.
* FIBMAP on a file block located above 0x7FFFFFFF can return a negative
value. The low 32 bits are correct, but applications that don't mask the
high 32 bits of the result can perform incorrectly.
Per suggestion by Jan Kara, introduce a udf_pblk_t type for representation
of UDF block addresses. Ultimately, all driver functions that manipulate
UDF block addresses should use this type; for now, deployment is limited
to functions with actual or potential sign extension issues.
Changes to udf_readdir() and udf_block_map() address the issues noted
above; other changes address potential similar issues uncovered during
audit of the driver code.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/ialloc.c')
-rw-r--r-- | fs/udf/ialloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index c1ed18a10ce4..b6e420c1bfeb 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c @@ -50,7 +50,7 @@ struct inode *udf_new_inode(struct inode *dir, umode_t mode) struct super_block *sb = dir->i_sb; struct udf_sb_info *sbi = UDF_SB(sb); struct inode *inode; - int block; + udf_pblk_t block; uint32_t start = UDF_I(dir)->i_location.logicalBlockNum; struct udf_inode_info *iinfo; struct udf_inode_info *dinfo = UDF_I(dir); |