tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/iov-extract head: 924c5c657ea686d6ba5c0cf47561c005befc9484 commit: c42cd4a50930aa022a7afc0fbadcc771ff208908 [28/32] cifs: Change the I/O paths to use an iterator rather than a page list config: hexagon-randconfig-r041-20230116 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/ammarfaizi2/linux-block/commit/c42cd4a50930aa022a7afc0fbadcc771ff208908 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/iov-extract git checkout c42cd4a50930aa022a7afc0fbadcc771ff208908 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash crypto/ fs/cifs/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from fs/cifs/smb2ops.c:8: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from fs/cifs/smb2ops.c:8: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from fs/cifs/smb2ops.c:8: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ >> fs/cifs/smb2ops.c:4294:25: warning: variable 'rc' is uninitialized when used here [-Wuninitialized] iov_iter_revert(iter, rc); ^~ fs/cifs/smb2ops.c:4266:12: note: initialize the variable 'rc' to silence this warning ssize_t rc; ^ = 0 7 warnings generated. vim +/rc +4294 fs/cifs/smb2ops.c 4259 4260 static void *smb2_get_aead_req(struct crypto_aead *tfm, struct smb_rqst *rqst, 4261 int num_rqst, const u8 *sig, u8 **iv, 4262 struct aead_request **req, struct scatterlist **sgl) 4263 { 4264 struct sg_table sgtable = {}; 4265 unsigned int skip, num_sgs, i, j; 4266 ssize_t rc; 4267 void *p; 4268 4269 p = smb2_aead_req_alloc(tfm, rqst, num_rqst, sig, iv, req, &sgtable, &num_sgs); 4270 if (IS_ERR(p)) 4271 return ERR_CAST(p); 4272 4273 sg_init_marker(sgtable.sgl, num_sgs); 4274 4275 for (i = 0; i < num_rqst; i++) { 4276 struct iov_iter *iter = &rqst[i].rq_iter; 4277 size_t count = iov_iter_count(iter); 4278 4279 for (j = 0; j < rqst[i].rq_nvec; j++) { 4280 /* 4281 * The first rqst has a transform header where the 4282 * first 20 bytes are not part of the encrypted blob 4283 */ 4284 skip = (i == 0) && (j == 0) ? 20 : 0; 4285 cifs_sg_set_buf(&sgtable, 4286 rqst[i].rq_iov[j].iov_base + skip, 4287 rqst[i].rq_iov[j].iov_len - skip); 4288 } 4289 sgtable.orig_nents = sgtable.nents; 4290 4291 netfs_extract_iter_to_sg(iter, count, &sgtable, 4292 num_sgs - sgtable.nents, 4293 FOLL_DEST_BUF); > 4294 iov_iter_revert(iter, rc); 4295 sgtable.orig_nents = sgtable.nents; 4296 } 4297 4298 cifs_sg_set_buf(&sgtable, sig, SMB2_SIGNATURE_SIZE); 4299 sg_mark_end(&sgtable.sgl[sgtable.nents - 1]); 4300 return p; 4301 } 4302 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests