tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 6a08a9e7fb1525fa296d810d200954f6c18d07a2
commit: a128d6484ea6c26f6266bd8d93c62346436bfd4e [12/14] squashfs: add more sanity checks
in inode lookup
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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 a128d6484ea6c26f6266bd8d93c62346436bfd4e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 arch/arc/include/asm/bug.h:32,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from fs/squashfs/export.c:38:
include/linux/cpumask.h: In function 'cpumask_check':
include/linux/cpumask.h:117:19: warning: comparison of integer expressions of different
signedness: 'unsigned int' and 'int' [-Wsign-compare]
117 | WARN_ON_ONCE(cpu >= nr_cpumask_bits);
| ^~
include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
112 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
In file included from fs/squashfs/export.c:44:
fs/squashfs/squashfs_fs.h: In function 'squashfs_block_size':
fs/squashfs/squashfs_fs.h:135:24: warning: operand of ?: changes signedness from
'int' to 'u32' {aka 'unsigned int'} due to unsignedness of other
operand [-Wsign-compare]
135 | return (size >> 25) ? -EIO : size;
fs/squashfs/export.c: In function 'squashfs_inode_lookup':
> fs/squashfs/export.c:63:36: warning: comparison of integer
expressions of different signedness: 'int' and 'unsigned int'
[-Wsign-compare]
63 | if (ino_num == 0 || (ino_num - 1) >=
msblk->inodes)
| ^~
fs/squashfs/export.c: In function 'squashfs_read_inode_lookup_table':
fs/squashfs/export.c:164:16: warning: comparison of integer expressions of different
signedness: 'int' and 'unsigned int' [-Wsign-compare]
164 | for (n = 0; n < (indexes - 1); n++) {
| ^
vim +63 fs/squashfs/export.c
48
49 /*
50 * Look-up inode number (ino) in table, returning the inode location.
51 */
52 static long long squashfs_inode_lookup(struct super_block *sb, int ino_num)
53 {
54 struct squashfs_sb_info *msblk = sb->s_fs_info;
55 int blk = SQUASHFS_LOOKUP_BLOCK(ino_num - 1);
56 int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino_num - 1);
57 u64 start;
58 __le64 ino;
59 int err;
60
61 TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino_num);
62
63 if (ino_num == 0 || (ino_num - 1) >= msblk->inodes)
64 return -EINVAL;
65
66 start = le64_to_cpu(msblk->inode_lookup_table[blk]);
67
68 err = squashfs_read_metadata(sb, &ino, &start, &offset, sizeof(ino));
69 if (err < 0)
70 return err;
71
72 TRACE("squashfs_inode_lookup, inode = 0x%llx\n",
73 (u64) le64_to_cpu(ino));
74
75 return le64_to_cpu(ino);
76 }
77
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org