On 10/18/22 3:11AM, Dongliang Mu wrote:
On Tue, Oct 18, 2022 at 1:50 PM kernel test robot <lkp@xxxxxxxxx> wrote:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4ca786ae6681b90b0ec3f4c55c89d12f835f8944
commit: 920f4b7e923b35fd9d117fd3cb616b310cd41010 [1304/1443] fs: jfs: fix shift-out-of-bounds in dbAllocAG
config: mips-randconfig-r005-20221017
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mipsel-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=920f4b7e923b35fd9d117fd3cb616b310cd41010
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 920f4b7e923b35fd9d117fd3cb616b310cd41010
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash fs/jfs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
fs/jfs/jfs_dmap.c:196:23: warning: result of comparison of constant 8796093022201 with expression of type 'int' is always false [-Wtautological-constant-out-of-range-compare]
if (bmp->db_agl2size > MAXMAPSIZE - L2MAXAG) {
~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Hi Dave,
I did not double check the upper bound of db_agl2size. It seems the
upper bound should be L2MAXL2SIZE - L2MAXAG, other than MAXMAPSIZE -
L2MAXAG.
And L2MAXL2SIZE = L2BPERDMAP + 3 * L2LPERCTL = 13+3*10 = 43.
I will send a fixes commit.
Thanks for fixing that correctly. This was my mistake, since that's the
value I asked you to use.
I'll use your new patch.
Shaggy