From: kernel test robot <lkp@intel.com>
To: Sabyrzhan Tasbolatov <snovitoll@gmail.com>, phillip@squashfs.org.uk
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org,
syzbot+2ccea6339d368360800d@syzkaller.appspotmail.com
Subject: Re: [PATCH] fs/squashfs: restrict length of xattr_ids in read_xattr_id_table
Date: Wed, 3 Feb 2021 20:56:44 +0800 [thread overview]
Message-ID: <202102032044.wrsk1CfP-lkp@intel.com> (raw)
In-Reply-To: <20210203103513.1510005-1-snovitoll@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3306 bytes --]
Hi Sabyrzhan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.11-rc6 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sabyrzhan-Tasbolatov/fs-squashfs-restrict-length-of-xattr_ids-in-read_xattr_id_table/20210203-184131
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ab38c17aac10bf55ab3efde4c4db3893d8691d2
config: s390-randconfig-r031-20210202 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 275c6af7d7f1ed63a03d05b4484413e447133269)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/0day-ci/linux/commit/7e2a858aa7b4de58aa7b037aad474710f07807e8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sabyrzhan-Tasbolatov/fs-squashfs-restrict-length-of-xattr_ids-in-read_xattr_id_table/20210203-184131
git checkout 7e2a858aa7b4de58aa7b037aad474710f07807e8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/squashfs/xattr_id.c:82:10: warning: incompatible integer to pointer conversion returning 'int' from a function with result type '__le64 *' (aka 'unsigned long long *') [-Wint-conversion]
return -ENOMEM;
^~~~~~~
1 warning generated.
vim +82 fs/squashfs/xattr_id.c
48
49
50 /*
51 * Read uncompressed xattr id lookup table indexes from disk into memory
52 */
53 __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 start,
54 u64 *xattr_table_start, int *xattr_ids)
55 {
56 unsigned int len;
57 struct squashfs_xattr_id_table *id_table;
58
59 id_table = squashfs_read_table(sb, start, sizeof(*id_table));
60 if (IS_ERR(id_table))
61 return (__le64 *) id_table;
62
63 *xattr_table_start = le64_to_cpu(id_table->xattr_table_start);
64 *xattr_ids = le32_to_cpu(id_table->xattr_ids);
65 kfree(id_table);
66
67 /* Sanity check values */
68
69 /* there is always at least one xattr id */
70 if (*xattr_ids == 0)
71 return ERR_PTR(-EINVAL);
72
73 /* xattr_table should be less than start */
74 if (*xattr_table_start >= start)
75 return ERR_PTR(-EINVAL);
76
77 len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids);
78
79 TRACE("In read_xattr_index_table, length %d\n", len);
80
81 if (len > KMALLOC_MAX_SIZE)
> 82 return -ENOMEM;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27135 bytes --]
next prev parent reply other threads:[~2021-02-03 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 10:35 [PATCH] fs/squashfs: restrict length of xattr_ids in read_xattr_id_table Sabyrzhan Tasbolatov
2021-02-03 12:56 ` kernel test robot [this message]
2021-02-03 13:45 ` [PATCH v2] " Sabyrzhan Tasbolatov
2021-02-03 14:11 ` [PATCH] " kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202102032044.wrsk1CfP-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phillip@squashfs.org.uk \
--cc=snovitoll@gmail.com \
--cc=syzbot+2ccea6339d368360800d@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).