Re: [PATCH] btrfs: Encryption: Add btrfs encryption support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anand,

[auto build test WARNING on btrfs/next]
[cannot apply to v4.8-rc6 next-20160913]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Anand-Jain/btrfs-Encryption-Add-btrfs-encryption-support/20160913-214237
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git next
config: i386-randconfig-s0-201637 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/linux/crypto.h:21,
                    from fs/btrfs/encrypt.c:20:
   fs/btrfs/encrypt.c: In function 'btrfs_blkcipher':
   include/linux/kern_levels.h:4:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:264:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
>> fs/btrfs/encrypt.c:327:3: note: in expansion of macro 'pr_err'
      pr_err("BTRFS: crypto, blk can't work with len %lu\n", len);
      ^~~~~~
   fs/btrfs/encrypt.c: In function 'btrfs_decrypt_pages_bio':
   include/linux/kern_levels.h:4:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:264:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   fs/btrfs/encrypt.c:757:3: note: in expansion of macro 'pr_err'
      pr_err("BTRFS: crypto, untested: pages to be decrypted is less than expected, "\
      ^~~~~~

vim +/pr_err +327 fs/btrfs/encrypt.c

   311		int ret = -EFAULT;
   312		struct scatterlist sg;
   313		unsigned int ivsize = 0;
   314		unsigned int blksize = 0;
   315		char *cipher = "cbc(aes)";
   316		struct blkcipher_desc desc;
   317		struct crypto_blkcipher *blkcipher = NULL;
   318	
   319		blkcipher = crypto_alloc_blkcipher(cipher, 0, 0);
   320		if (IS_ERR(blkcipher)) {
   321			pr_err("BTRFS: crypto, allocate blkcipher handle for %s\n", cipher);
   322			return -PTR_ERR(blkcipher);
   323		}
   324	
   325		blksize = crypto_blkcipher_blocksize(blkcipher);
   326		if (len < blksize) {
 > 327			pr_err("BTRFS: crypto, blk can't work with len %lu\n", len);
   328			ret = -EINVAL;
   329			goto out;
   330		}
   331	
   332		if (crypto_blkcipher_setkey(blkcipher, btrfs_req->key,
   333						btrfs_req->key_len)) {
   334			pr_err("BTRFS: crypto, key could not be set\n");
   335			ret = -EAGAIN;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux