Re: [PATCH 2/4] fscrypt: add per-extent encryption support

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

 



Hi Josef,

kernel test robot noticed the following build warnings:

[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v6.6-rc1 next-20230914]
[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/Josef-Bacik/fscrypt-rename-fscrypt_info-fscrypt_inode_info/20230915-085013
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/29b2303463c3b4978d17a6a257e7a8aa3da23de4.1694738282.git.josef%40toxicpanda.com
patch subject: [PATCH 2/4] fscrypt: add per-extent encryption support
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20230915/202309151147.DmtmoJbq-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230915/202309151147.DmtmoJbq-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309151147.DmtmoJbq-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   fs/crypto/keysetup.c: In function 'fscrypt_load_extent_info':
>> fs/crypto/keysetup.c:904:40: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
     904 |         memcpy(&extent_ctx, ctx, sizeof(ctx));
         |                                        ^


vim +904 fs/crypto/keysetup.c

   881	
   882	/**
   883	 * fscrypt_load_extent_info() - create an fscrypt_extent_info from the context
   884	 * @inode: the inode
   885	 * @ctx: the context buffer
   886	 * @ctx_size: the size of the context buffer
   887	 *
   888	 * Create the file_extent_info and derive the key based on the
   889	 * fscrypt_extent_context buffer that is probided.
   890	 *
   891	 * Return: The newly allocated fscrypt_extent_info on success, -EOPNOTSUPP if
   892	 *	   we're not encrypted, or another -errno code
   893	 */
   894	struct fscrypt_extent_info *fscrypt_load_extent_info(struct inode *inode,
   895							     u8 *ctx, size_t ctx_size)
   896	{
   897		struct fscrypt_extent_context extent_ctx;
   898	
   899		if (!fscrypt_inode_uses_inline_crypto(inode))
   900			return ERR_PTR(-EOPNOTSUPP);
   901		if (ctx_size < sizeof(extent_ctx))
   902			return ERR_PTR(-EINVAL);
   903	
 > 904		memcpy(&extent_ctx, ctx, sizeof(ctx));
   905		return setup_extent_info(inode, extent_ctx.nonce);
   906	}
   907	EXPORT_SYMBOL(fscrypt_load_extent_info);
   908	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [linux Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux