CC: [email protected] BCC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Christoph Hellwig <[email protected]> TO: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: Adrian Hunter <[email protected]> CC: Daeho Jeong <[email protected]> CC: Eric Biggers <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected]
Hi Christoph, I love your patch! Perhaps something to improve: [auto build test WARNING on jaegeuk-f2fs/dev-test] [also build test WARNING on linux/master linus/master v5.17-rc8] [cannot apply to axboe-block/for-next next-20220318] [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/Christoph-Hellwig/block-fix-the-REQ_OP_SECURE_ERASE-handling-to-not-leak-erased-data/20220316-174028 base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test :::::: branch date: 3 days ago :::::: commit date: 3 days ago config: x86_64-randconfig-m001-20220314 (https://download.01.org/0day-ci/archive/20220319/[email protected]/config) compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: block/blk-lib.c:464 blkdev_issue_secure_erase() warn: should 'len << 9' be a 64 bit type? Old smatch warnings: block/blk-lib.c:465 blkdev_issue_secure_erase() warn: should 'len << 9' be a 64 bit type? vim +464 block/blk-lib.c 04d790607abc51e Christoph Hellwig 2022-03-16 436 04d790607abc51e Christoph Hellwig 2022-03-16 437 int blkdev_issue_secure_erase(struct block_device *bdev, sector_t sector, 04d790607abc51e Christoph Hellwig 2022-03-16 438 sector_t nr_sects, gfp_t gfp) 04d790607abc51e Christoph Hellwig 2022-03-16 439 { 04d790607abc51e Christoph Hellwig 2022-03-16 440 sector_t bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1; 04d790607abc51e Christoph Hellwig 2022-03-16 441 unsigned int max_sectors = 04d790607abc51e Christoph Hellwig 2022-03-16 442 bdev_get_queue(bdev)->limits.max_discard_sectors; 04d790607abc51e Christoph Hellwig 2022-03-16 443 struct bio *bio = NULL; 04d790607abc51e Christoph Hellwig 2022-03-16 444 struct blk_plug plug; 04d790607abc51e Christoph Hellwig 2022-03-16 445 int ret = 0; 04d790607abc51e Christoph Hellwig 2022-03-16 446 04d790607abc51e Christoph Hellwig 2022-03-16 447 if (max_sectors == 0) 04d790607abc51e Christoph Hellwig 2022-03-16 448 return -EOPNOTSUPP; 04d790607abc51e Christoph Hellwig 2022-03-16 449 if ((sector | nr_sects) & bs_mask) 04d790607abc51e Christoph Hellwig 2022-03-16 450 return -EINVAL; 04d790607abc51e Christoph Hellwig 2022-03-16 451 if (bdev_read_only(bdev)) 04d790607abc51e Christoph Hellwig 2022-03-16 452 return -EPERM; 04d790607abc51e Christoph Hellwig 2022-03-16 453 04d790607abc51e Christoph Hellwig 2022-03-16 454 blk_start_plug(&plug); 04d790607abc51e Christoph Hellwig 2022-03-16 455 for (;;) { 04d790607abc51e Christoph Hellwig 2022-03-16 456 unsigned int len = min_t(sector_t, nr_sects, max_sectors); 04d790607abc51e Christoph Hellwig 2022-03-16 457 04d790607abc51e Christoph Hellwig 2022-03-16 458 bio = blk_next_bio(bio, 0, gfp); 04d790607abc51e Christoph Hellwig 2022-03-16 459 bio_set_dev(bio, bdev); 04d790607abc51e Christoph Hellwig 2022-03-16 460 bio->bi_opf = REQ_OP_SECURE_ERASE; 04d790607abc51e Christoph Hellwig 2022-03-16 461 bio->bi_iter.bi_sector = sector; 04d790607abc51e Christoph Hellwig 2022-03-16 462 bio->bi_iter.bi_size = len; 04d790607abc51e Christoph Hellwig 2022-03-16 463 04d790607abc51e Christoph Hellwig 2022-03-16 @464 sector += len << SECTOR_SHIFT; --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
