lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107250203.8VeNBTbb-lkp@intel.com>
Date:   Sun, 25 Jul 2021 02:04:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [hch-block:blkdev.h-includes 14/16]
 block/blk-crypto-internal.h:34:49: error: implicit declaration of function
 'blk_rq_bytes'

tree:   git://git.infradead.org/users/hch/block.git blkdev.h-includes
head:   48f7fda047613ceec07881f14a5eaf1ee19d4433
commit: b9615241041911b7ce9a57f1a2d24a66e5c2b091 [14/16] block: move struct request to blk-mq.h
config: i386-randconfig-a005-20210724 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
        git remote add hch-block git://git.infradead.org/users/hch/block.git
        git fetch --no-tags hch-block blkdev.h-includes
        git checkout b9615241041911b7ce9a57f1a2d24a66e5c2b091
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from block/blk-crypto.c:18:
   block/blk-crypto-internal.h: In function 'bio_crypt_ctx_back_mergeable':
>> block/blk-crypto-internal.h:34:36: error: invalid use of undefined type 'struct request'
      34 |  return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
         |                                    ^~
>> block/blk-crypto-internal.h:34:49: error: implicit declaration of function 'blk_rq_bytes' [-Werror=implicit-function-declaration]
      34 |  return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
         |                                                 ^~~~~~~~~~~~
   block/blk-crypto-internal.h: In function 'bio_crypt_ctx_front_mergeable':
   block/blk-crypto-internal.h:42:37: error: invalid use of undefined type 'struct request'
      42 |            bio->bi_iter.bi_size, req->crypt_ctx);
         |                                     ^~
   block/blk-crypto-internal.h: In function 'bio_crypt_ctx_merge_rq':
   block/blk-crypto-internal.h:48:36: error: invalid use of undefined type 'struct request'
      48 |  return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
         |                                    ^~
   block/blk-crypto-internal.h:49:16: error: invalid use of undefined type 'struct request'
      49 |            next->crypt_ctx);
         |                ^~
   block/blk-crypto-internal.h: In function 'blk_crypto_rq_set_defaults':
   block/blk-crypto-internal.h:54:4: error: invalid use of undefined type 'struct request'
      54 |  rq->crypt_ctx = NULL;
         |    ^~
   block/blk-crypto-internal.h:55:4: error: invalid use of undefined type 'struct request'
      55 |  rq->crypt_keyslot = NULL;
         |    ^~
   block/blk-crypto-internal.h: In function 'blk_crypto_rq_is_encrypted':
   block/blk-crypto-internal.h:60:11: error: invalid use of undefined type 'struct request'
      60 |  return rq->crypt_ctx;
         |           ^~
   block/blk-crypto-internal.h: In function 'bio_crypt_do_front_merge':
   block/blk-crypto-internal.h:117:12: error: invalid use of undefined type 'struct request'
     117 |   memcpy(rq->crypt_ctx->bc_dun, bio->bi_crypt_context->bc_dun,
         |            ^~
   block/blk-crypto-internal.h:118:19: error: invalid use of undefined type 'struct request'
     118 |          sizeof(rq->crypt_ctx->bc_dun));
         |                   ^~
   block/blk-crypto.c: In function 'bio_crypt_rq_ctx_compatible':
>> block/blk-crypto.c:186:36: error: invalid use of undefined type 'struct request'
     186 |  return bio_crypt_ctx_compatible(rq->crypt_ctx, bio->bi_crypt_context);
         |                                    ^~
   block/blk-crypto.c: In function '__blk_crypto_init_request':
   block/blk-crypto.c:221:36: error: invalid use of undefined type 'struct request'
     221 |  return blk_ksm_get_slot_for_key(rq->q->ksm, rq->crypt_ctx->bc_key,
         |                                    ^~
   block/blk-crypto.c:221:48: error: invalid use of undefined type 'struct request'
     221 |  return blk_ksm_get_slot_for_key(rq->q->ksm, rq->crypt_ctx->bc_key,
         |                                                ^~
   block/blk-crypto.c:222:9: error: invalid use of undefined type 'struct request'
     222 |      &rq->crypt_keyslot);
         |         ^~
   block/blk-crypto.c: In function '__blk_crypto_free_request':
   block/blk-crypto.c:236:21: error: invalid use of undefined type 'struct request'
     236 |  blk_ksm_put_slot(rq->crypt_keyslot);
         |                     ^~
   block/blk-crypto.c:237:17: error: invalid use of undefined type 'struct request'
     237 |  mempool_free(rq->crypt_ctx, bio_crypt_ctx_pool);
         |                 ^~
   block/blk-crypto.c: In function '__blk_crypto_rq_bio_prep':
   block/blk-crypto.c:297:9: error: invalid use of undefined type 'struct request'
     297 |  if (!rq->crypt_ctx) {
         |         ^~
   block/blk-crypto.c:298:5: error: invalid use of undefined type 'struct request'
     298 |   rq->crypt_ctx = mempool_alloc(bio_crypt_ctx_pool, gfp_mask);
         |     ^~
   block/blk-crypto.c:299:10: error: invalid use of undefined type 'struct request'
     299 |   if (!rq->crypt_ctx)
         |          ^~
   block/blk-crypto.c:302:5: error: invalid use of undefined type 'struct request'
     302 |  *rq->crypt_ctx = *bio->bi_crypt_context;
         |     ^~
   block/blk-crypto.c: In function 'bio_crypt_rq_ctx_compatible':
   block/blk-crypto.c:187:1: error: control reaches end of non-void function [-Werror=return-type]
     187 | }
         | ^
   block/blk-crypto.c: In function '__blk_crypto_init_request':
   block/blk-crypto.c:223:1: error: control reaches end of non-void function [-Werror=return-type]
     223 | }
         | ^
   In file included from include/linux/blkdev.h:7,
                    from block/blk-crypto.c:13:
   At top level:
   include/linux/genhd.h:329:12: warning: 'bd_register_pending_holders' defined but not used [-Wunused-function]
     329 | static int bd_register_pending_holders(struct gendisk *disk)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from block/blk-crypto-fallback.c:22:
   block/blk-crypto-internal.h: In function 'bio_crypt_ctx_back_mergeable':
>> block/blk-crypto-internal.h:34:36: error: invalid use of undefined type 'struct request'
      34 |  return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
         |                                    ^~
>> block/blk-crypto-internal.h:34:49: error: implicit declaration of function 'blk_rq_bytes' [-Werror=implicit-function-declaration]
      34 |  return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
         |                                                 ^~~~~~~~~~~~
   block/blk-crypto-internal.h: In function 'bio_crypt_ctx_front_mergeable':
   block/blk-crypto-internal.h:42:37: error: invalid use of undefined type 'struct request'
      42 |            bio->bi_iter.bi_size, req->crypt_ctx);
         |                                     ^~
   block/blk-crypto-internal.h: In function 'bio_crypt_ctx_merge_rq':
   block/blk-crypto-internal.h:48:36: error: invalid use of undefined type 'struct request'
      48 |  return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
         |                                    ^~
   block/blk-crypto-internal.h:49:16: error: invalid use of undefined type 'struct request'
      49 |            next->crypt_ctx);
         |                ^~
   block/blk-crypto-internal.h: In function 'blk_crypto_rq_set_defaults':
   block/blk-crypto-internal.h:54:4: error: invalid use of undefined type 'struct request'
      54 |  rq->crypt_ctx = NULL;
         |    ^~
   block/blk-crypto-internal.h:55:4: error: invalid use of undefined type 'struct request'
      55 |  rq->crypt_keyslot = NULL;
         |    ^~
   block/blk-crypto-internal.h: In function 'blk_crypto_rq_is_encrypted':
   block/blk-crypto-internal.h:60:11: error: invalid use of undefined type 'struct request'
      60 |  return rq->crypt_ctx;
         |           ^~
   block/blk-crypto-internal.h: In function 'bio_crypt_do_front_merge':
   block/blk-crypto-internal.h:117:12: error: invalid use of undefined type 'struct request'
     117 |   memcpy(rq->crypt_ctx->bc_dun, bio->bi_crypt_context->bc_dun,
         |            ^~
   block/blk-crypto-internal.h:118:19: error: invalid use of undefined type 'struct request'
     118 |          sizeof(rq->crypt_ctx->bc_dun));
         |                   ^~
   In file included from include/linux/blkdev.h:7,
                    from include/linux/blk-cgroup.h:23,
                    from block/blk-crypto-fallback.c:13:
   At top level:
   include/linux/genhd.h:329:12: warning: 'bd_register_pending_holders' defined but not used [-Wunused-function]
     329 | static int bd_register_pending_holders(struct gendisk *disk)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/blk_rq_bytes +34 block/blk-crypto-internal.h

a892c8d52c0228 Satya Tangirala 2020-05-14  27  
a892c8d52c0228 Satya Tangirala 2020-05-14  28  bool bio_crypt_ctx_mergeable(struct bio_crypt_ctx *bc1, unsigned int bc1_bytes,
a892c8d52c0228 Satya Tangirala 2020-05-14  29  			     struct bio_crypt_ctx *bc2);
a892c8d52c0228 Satya Tangirala 2020-05-14  30  
a892c8d52c0228 Satya Tangirala 2020-05-14  31  static inline bool bio_crypt_ctx_back_mergeable(struct request *req,
a892c8d52c0228 Satya Tangirala 2020-05-14  32  						struct bio *bio)
a892c8d52c0228 Satya Tangirala 2020-05-14  33  {
a892c8d52c0228 Satya Tangirala 2020-05-14 @34  	return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req),
a892c8d52c0228 Satya Tangirala 2020-05-14  35  				       bio->bi_crypt_context);
a892c8d52c0228 Satya Tangirala 2020-05-14  36  }
a892c8d52c0228 Satya Tangirala 2020-05-14  37  

:::::: The code at line 34 was first introduced by commit
:::::: a892c8d52c02284076fbbacae6692aa5c5807d11 block: Inline encryption support for blk-mq

:::::: TO: Satya Tangirala <satyat@...gle.com>
:::::: CC: Jens Axboe <axboe@...nel.dk>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (31209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ