From: kernel test robot <lkp@intel.com>
To: Keith Busch <kbusch@meta.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH] dm-crypt: allow unaligned bio_vecs for direct io
Date: Sat, 20 Sep 2025 13:33:24 +0800 [thread overview]
Message-ID: <202509201341.vkf3aDEL-lkp@intel.com> (raw)
In-Reply-To: <20250918161642.2867886-1-kbusch@meta.com>
Hi Keith,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on device-mapper-dm/for-next]
[also build test ERROR on linus/master v6.17-rc6 next-20250919]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Keith-Busch/dm-crypt-allow-unaligned-bio_vecs-for-direct-io/20250919-001836
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
patch link: https://lore.kernel.org/r/20250918161642.2867886-1-kbusch%40meta.com
patch subject: [RFC PATCH] dm-crypt: allow unaligned bio_vecs for direct io
config: i386-buildonly-randconfig-001-20250920 (https://download.01.org/0day-ci/archive/20250920/202509201341.vkf3aDEL-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250920/202509201341.vkf3aDEL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509201341.vkf3aDEL-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/md/dm-crypt.c:1473:8: error: assigning to 'struct scatterlist *' from incompatible type 'struct scatterlist'; take the address with &
1473 | sg_in = dmreq->sg_in[0];
| ^ ~~~~~~~~~~~~~~~
| &
1 error generated.
vim +1473 drivers/md/dm-crypt.c
1426
1427 static int crypt_convert_block_skcipher(struct crypt_config *cc,
1428 struct convert_context *ctx,
1429 struct skcipher_request *req,
1430 unsigned int tag_offset)
1431 {
1432 struct bio_vec bv_out = bio_iter_iovec(ctx->bio_out, ctx->iter_out);
1433 unsigned int bytes = cc->sector_size;
1434 struct scatterlist *sg_in, *sg_out;
1435 struct dm_crypt_request *dmreq;
1436 u8 *iv, *org_iv, *tag_iv;
1437 __le64 *sector;
1438 int r = 0;
1439
1440 dmreq = dmreq_of_req(cc, req);
1441 dmreq->iv_sector = ctx->cc_sector;
1442 if (test_bit(CRYPT_IV_LARGE_SECTORS, &cc->cipher_flags))
1443 dmreq->iv_sector >>= cc->sector_shift;
1444 dmreq->ctx = ctx;
1445
1446 *org_tag_of_dmreq(cc, dmreq) = tag_offset;
1447
1448 iv = iv_of_dmreq(cc, dmreq);
1449 org_iv = org_iv_of_dmreq(cc, dmreq);
1450 tag_iv = iv_tag_from_dmreq(cc, dmreq);
1451
1452 sector = org_sector_of_dmreq(cc, dmreq);
1453 *sector = cpu_to_le64(ctx->cc_sector - cc->iv_offset);
1454
1455 /* For skcipher we use only the first sg item */
1456 sg_out = &dmreq->sg_out[0];
1457
1458 do {
1459 struct bio_vec bv_in = bio_iter_iovec(ctx->bio_in, ctx->iter_in);
1460 int len = min(bytes, bv_in.bv_len);
1461
1462 if (r >= ARRAY_SIZE(dmreq->sg_in))
1463 return -EINVAL;
1464
1465 sg_in = &dmreq->sg_in[r++];
1466 memset(sg_in, 0, sizeof(*sg_in));
1467 sg_set_page(sg_in, bv_in.bv_page, len, bv_in.bv_offset);
1468 bio_advance_iter_single(ctx->bio_in, &ctx->iter_in, len);
1469 bytes -= len;
1470 } while (bytes);
1471
1472 sg_mark_end(sg_in);
> 1473 sg_in = dmreq->sg_in[0];
1474
1475 sg_init_table(sg_out, 1);
1476 sg_set_page(sg_out, bv_out.bv_page, cc->sector_size, bv_out.bv_offset);
1477
1478 if (cc->iv_gen_ops) {
1479 /* For READs use IV stored in integrity metadata */
1480 if (cc->integrity_iv_size && bio_data_dir(ctx->bio_in) != WRITE) {
1481 memcpy(org_iv, tag_iv, cc->integrity_iv_size);
1482 } else {
1483 r = cc->iv_gen_ops->generator(cc, org_iv, dmreq);
1484 if (r < 0)
1485 return r;
1486 /* Data can be already preprocessed in generator */
1487 if (test_bit(CRYPT_ENCRYPT_PREPROCESS, &cc->cipher_flags))
1488 sg_in = sg_out;
1489 /* Store generated IV in integrity metadata */
1490 if (cc->integrity_iv_size)
1491 memcpy(tag_iv, org_iv, cc->integrity_iv_size);
1492 }
1493 /* Working copy of IV, to be modified in crypto API */
1494 memcpy(iv, org_iv, cc->iv_size);
1495 }
1496
1497 skcipher_request_set_crypt(req, sg_in, sg_out, cc->sector_size, iv);
1498
1499 if (bio_data_dir(ctx->bio_in) == WRITE)
1500 r = crypto_skcipher_encrypt(req);
1501 else
1502 r = crypto_skcipher_decrypt(req);
1503
1504 if (!r && cc->iv_gen_ops && cc->iv_gen_ops->post)
1505 r = cc->iv_gen_ops->post(cc, org_iv, dmreq);
1506
1507 bio_advance_iter(ctx->bio_out, &ctx->iter_out, cc->sector_size);
1508
1509 return r;
1510 }
1511
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-09-20 5:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 16:16 [RFC PATCH] dm-crypt: allow unaligned bio_vecs for direct io Keith Busch
2025-09-18 20:13 ` Keith Busch
2025-09-26 14:19 ` Mikulas Patocka
2025-09-26 16:17 ` Keith Busch
2025-09-18 20:27 ` Mike Snitzer
2025-09-18 20:52 ` Keith Busch
2025-09-19 9:13 ` kernel test robot
2025-09-20 5:33 ` kernel test robot [this message]
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=202509201341.vkf3aDEL-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbusch@meta.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.