tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 6a08a9e7fb1525fa296d810d200954f6c18d07a2
commit: d9c7067ceb34ec223012997c1d57f3919528b7ae [13/14] squashfs: add more sanity checks
in xattr id lookup
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.4
git checkout d9c7067ceb34ec223012997c1d57f3919528b7ae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/squashfs/xattr_id.c:33:0:
fs/squashfs/squashfs_fs.h: In function 'squashfs_block_size':
fs/squashfs/squashfs_fs.h:135:29: warning: signed and unsigned type in conditional
expression [-Wsign-compare]
return (size >> 25) ? -EIO : size;
^
fs/squashfs/xattr_id.c: In function 'squashfs_xattr_lookup':
> fs/squashfs/xattr_id.c:51:12: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
if (index >=
msblk->xattr_ids)
^~
fs/squashfs/xattr_id.c: In function 'squashfs_read_xattr_id_table':
fs/squashfs/xattr_id.c:121:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
for (n = 0; n < (indexes - 1); n++) {
^
vim +51 fs/squashfs/xattr_id.c
37
38 /*
39 * Map xattr id using the xattr id look up table
40 */
41 int squashfs_xattr_lookup(struct super_block *sb, unsigned int index,
42 int *count, unsigned int *size, unsigned long long *xattr)
43 {
44 struct squashfs_sb_info *msblk = sb->s_fs_info;
45 int block = SQUASHFS_XATTR_BLOCK(index);
46 int offset = SQUASHFS_XATTR_BLOCK_OFFSET(index);
47 u64 start_block;
48 struct squashfs_xattr_id id;
49 int err;
50
51 if (index >= msblk->xattr_ids)
52 return
-EINVAL;
53
54 start_block = le64_to_cpu(msblk->xattr_id_table[block]);
55
56 err = squashfs_read_metadata(sb, &id, &start_block, &offset,
57 sizeof(id));
58 if (err < 0)
59 return err;
60
61 *xattr = le64_to_cpu(id.xattr);
62 *size = le32_to_cpu(id.size);
63 *count = le32_to_cpu(id.count);
64 return 0;
65 }
66
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org