* fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit
@ 2020-09-10 15:04 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-10 15:04 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3919 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
CC: Jaegeuk Kim <jaegeuk@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7fe10096c1508c7f033d34d0741809f8eecc1ed4
commit: 50cfa66f0de02eff30fb81bdc878bb986cf3aff3 f2fs: compress: support zstd compress algorithm
date: 5 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 5 months ago
config: h8300-randconfig-m031-20200909 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit type?
Old smatch warnings:
fs/f2fs/compress.c:213 lzo_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit type?
fs/f2fs/compress.c:277 lz4_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit type?
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50cfa66f0de02eff30fb81bdc878bb986cf3aff3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 50cfa66f0de02eff30fb81bdc878bb986cf3aff3
vim +433 fs/f2fs/compress.c
50cfa66f0de02e Chao Yu 2020-03-03 408
50cfa66f0de02e Chao Yu 2020-03-03 409 static int zstd_decompress_pages(struct decompress_io_ctx *dic)
50cfa66f0de02e Chao Yu 2020-03-03 410 {
50cfa66f0de02e Chao Yu 2020-03-03 411 ZSTD_DStream *stream = dic->private2;
50cfa66f0de02e Chao Yu 2020-03-03 412 ZSTD_inBuffer inbuf;
50cfa66f0de02e Chao Yu 2020-03-03 413 ZSTD_outBuffer outbuf;
50cfa66f0de02e Chao Yu 2020-03-03 414 int ret;
50cfa66f0de02e Chao Yu 2020-03-03 415
50cfa66f0de02e Chao Yu 2020-03-03 416 inbuf.pos = 0;
50cfa66f0de02e Chao Yu 2020-03-03 417 inbuf.src = dic->cbuf->cdata;
50cfa66f0de02e Chao Yu 2020-03-03 418 inbuf.size = dic->clen;
50cfa66f0de02e Chao Yu 2020-03-03 419
50cfa66f0de02e Chao Yu 2020-03-03 420 outbuf.pos = 0;
50cfa66f0de02e Chao Yu 2020-03-03 421 outbuf.dst = dic->rbuf;
50cfa66f0de02e Chao Yu 2020-03-03 422 outbuf.size = dic->rlen;
50cfa66f0de02e Chao Yu 2020-03-03 423
50cfa66f0de02e Chao Yu 2020-03-03 424 ret = ZSTD_decompressStream(stream, &outbuf, &inbuf);
50cfa66f0de02e Chao Yu 2020-03-03 425 if (ZSTD_isError(ret)) {
50cfa66f0de02e Chao Yu 2020-03-03 426 printk_ratelimited("%sF2FS-fs (%s): %s ZSTD_compressStream failed, ret: %d\n",
50cfa66f0de02e Chao Yu 2020-03-03 427 KERN_ERR, F2FS_I_SB(dic->inode)->sb->s_id,
50cfa66f0de02e Chao Yu 2020-03-03 428 __func__, ZSTD_getErrorCode(ret));
50cfa66f0de02e Chao Yu 2020-03-03 429 return -EIO;
50cfa66f0de02e Chao Yu 2020-03-03 430 }
50cfa66f0de02e Chao Yu 2020-03-03 431
50cfa66f0de02e Chao Yu 2020-03-03 432 if (dic->rlen != outbuf.pos) {
50cfa66f0de02e Chao Yu 2020-03-03 @433 printk_ratelimited("%sF2FS-fs (%s): %s ZSTD invalid rlen:%zu, "
50cfa66f0de02e Chao Yu 2020-03-03 434 "expected:%lu\n", KERN_ERR,
50cfa66f0de02e Chao Yu 2020-03-03 435 F2FS_I_SB(dic->inode)->sb->s_id,
50cfa66f0de02e Chao Yu 2020-03-03 436 __func__, dic->rlen,
50cfa66f0de02e Chao Yu 2020-03-03 437 PAGE_SIZE << dic->log_cluster_size);
50cfa66f0de02e Chao Yu 2020-03-03 438 return -EIO;
50cfa66f0de02e Chao Yu 2020-03-03 439 }
50cfa66f0de02e Chao Yu 2020-03-03 440
50cfa66f0de02e Chao Yu 2020-03-03 441 return 0;
50cfa66f0de02e Chao Yu 2020-03-03 442 }
50cfa66f0de02e Chao Yu 2020-03-03 443
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23344 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit
@ 2021-02-13 17:18 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-02-13 17:18 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3509 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
CC: Jaegeuk Kim <jaegeuk@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 50cfa66f0de02eff30fb81bdc878bb986cf3aff3 f2fs: compress: support zstd compress algorithm
date: 11 months ago
:::::: branch date: 2 days ago
:::::: commit date: 11 months ago
config: i386-randconfig-m031-20210213 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit type?
Old smatch warnings:
fs/f2fs/compress.c:277 lz4_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit type?
vim +433 fs/f2fs/compress.c
50cfa66f0de02e Chao Yu 2020-03-03 408
50cfa66f0de02e Chao Yu 2020-03-03 409 static int zstd_decompress_pages(struct decompress_io_ctx *dic)
50cfa66f0de02e Chao Yu 2020-03-03 410 {
50cfa66f0de02e Chao Yu 2020-03-03 411 ZSTD_DStream *stream = dic->private2;
50cfa66f0de02e Chao Yu 2020-03-03 412 ZSTD_inBuffer inbuf;
50cfa66f0de02e Chao Yu 2020-03-03 413 ZSTD_outBuffer outbuf;
50cfa66f0de02e Chao Yu 2020-03-03 414 int ret;
50cfa66f0de02e Chao Yu 2020-03-03 415
50cfa66f0de02e Chao Yu 2020-03-03 416 inbuf.pos = 0;
50cfa66f0de02e Chao Yu 2020-03-03 417 inbuf.src = dic->cbuf->cdata;
50cfa66f0de02e Chao Yu 2020-03-03 418 inbuf.size = dic->clen;
50cfa66f0de02e Chao Yu 2020-03-03 419
50cfa66f0de02e Chao Yu 2020-03-03 420 outbuf.pos = 0;
50cfa66f0de02e Chao Yu 2020-03-03 421 outbuf.dst = dic->rbuf;
50cfa66f0de02e Chao Yu 2020-03-03 422 outbuf.size = dic->rlen;
50cfa66f0de02e Chao Yu 2020-03-03 423
50cfa66f0de02e Chao Yu 2020-03-03 424 ret = ZSTD_decompressStream(stream, &outbuf, &inbuf);
50cfa66f0de02e Chao Yu 2020-03-03 425 if (ZSTD_isError(ret)) {
50cfa66f0de02e Chao Yu 2020-03-03 426 printk_ratelimited("%sF2FS-fs (%s): %s ZSTD_compressStream failed, ret: %d\n",
50cfa66f0de02e Chao Yu 2020-03-03 427 KERN_ERR, F2FS_I_SB(dic->inode)->sb->s_id,
50cfa66f0de02e Chao Yu 2020-03-03 428 __func__, ZSTD_getErrorCode(ret));
50cfa66f0de02e Chao Yu 2020-03-03 429 return -EIO;
50cfa66f0de02e Chao Yu 2020-03-03 430 }
50cfa66f0de02e Chao Yu 2020-03-03 431
50cfa66f0de02e Chao Yu 2020-03-03 432 if (dic->rlen != outbuf.pos) {
50cfa66f0de02e Chao Yu 2020-03-03 @433 printk_ratelimited("%sF2FS-fs (%s): %s ZSTD invalid rlen:%zu, "
50cfa66f0de02e Chao Yu 2020-03-03 434 "expected:%lu\n", KERN_ERR,
50cfa66f0de02e Chao Yu 2020-03-03 435 F2FS_I_SB(dic->inode)->sb->s_id,
50cfa66f0de02e Chao Yu 2020-03-03 436 __func__, dic->rlen,
50cfa66f0de02e Chao Yu 2020-03-03 437 PAGE_SIZE << dic->log_cluster_size);
50cfa66f0de02e Chao Yu 2020-03-03 438 return -EIO;
50cfa66f0de02e Chao Yu 2020-03-03 439 }
50cfa66f0de02e Chao Yu 2020-03-03 440
50cfa66f0de02e Chao Yu 2020-03-03 441 return 0;
50cfa66f0de02e Chao Yu 2020-03-03 442 }
50cfa66f0de02e Chao Yu 2020-03-03 443
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36855 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-13 17:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 15:04 fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit kernel test robot
2021-02-13 17:18 fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '((1) " kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.