Hi David, I love your patch! Yet something to improve:
[auto build test ERROR on next-20220105] [cannot apply to cifs/for-next linus/master v5.16-rc8 v5.16-rc7 v5.16-rc6 v5.16-rc8] [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] url: https://github.com/0day-ci/linux/commits/David-Howells/cifs-Use-netfslib/20220107-025845 base: 7a769a3922d81cfc74ab4d90a9cc69485f260976 config: x86_64-randconfig-r021-20220107 (https://download.01.org/0day-ci/archive/20220108/202201080540.7gy9dvwv-...@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f3a344d2125fa37e59bae1b0874442c650a19607) 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/0day-ci/linux/commit/ed7e6fa413c08f7992992e2282f64df2a6894f10 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Howells/cifs-Use-netfslib/20220107-025845 git checkout ed7e6fa413c08f7992992e2282f64df2a6894f10 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/cifs/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <l...@intel.com> All error/warnings (new ones prefixed by >>): >> fs/cifs/file.c:2435:7: warning: variable 'len' is uninitialized when used >> here [-Wuninitialized] if (len < max_len) ^~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~ include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ fs/cifs/file.c:2385:30: note: initialize the variable 'len' to silence this warning unsigned int xid, wsize, len, max_len; ^ = 0 1 warning generated. -- >> fs/cifs/cifsencrypt.c:66:24: error: no member named 'rq_npages' in 'struct >> smb_rqst' for (i = 0; i < rqst->rq_npages; i++) { ~~~~ ^ >> fs/cifs/cifsencrypt.c:70:3: error: implicit declaration of function >> 'rqst_page_get_length' [-Werror,-Wimplicit-function-declaration] rqst_page_get_length(rqst, i, &len, &offset); ^ >> fs/cifs/cifsencrypt.c:72:31: error: no member named 'rq_pages' in 'struct >> smb_rqst' kaddr = (char *) kmap(rqst->rq_pages[i]) + offset; ~~~~ ^ fs/cifs/cifsencrypt.c:78:17: error: no member named 'rq_pages' in 'struct smb_rqst' kunmap(rqst->rq_pages[i]); ~~~~ ^ fs/cifs/cifsencrypt.c:82:16: error: no member named 'rq_pages' in 'struct smb_rqst' kunmap(rqst->rq_pages[i]); ~~~~ ^ 5 errors generated. -- >> fs/cifs/smb2ops.c:4437:39: error: no member named 'rq_npages' in 'struct >> smb_rqst' sg_len += rqst[i].rq_nvec + rqst[i].rq_npages; ~~~~~~~ ^ fs/cifs/smb2ops.c:4456:27: error: no member named 'rq_npages' in 'struct smb_rqst' for (j = 0; j < rqst[i].rq_npages; j++) { ~~~~~~~ ^ >> fs/cifs/smb2ops.c:4459:4: error: implicit declaration of function >> 'rqst_page_get_length' [-Werror,-Wimplicit-function-declaration] rqst_page_get_length(&rqst[i], j, &len, &offset); ^ >> fs/cifs/smb2ops.c:4460:36: error: no member named 'rq_pages' in 'struct >> smb_rqst' sg_set_page(&sg[idx++], rqst[i].rq_pages[j], len, offset); ~~~~~~~ ^ >> fs/cifs/smb2ops.c:4663:4: error: must use 'struct' tag to refer to type >> 'page' page = alloc_page(GFP_KERNEL|__GFP_HIGHMEM); ^ struct >> fs/cifs/smb2ops.c:4663:9: error: expected identifier or '(' page = alloc_page(GFP_KERNEL|__GFP_HIGHMEM); ^ >> fs/cifs/smb2ops.c:4664:29: error: use of undeclared identifier 'page' if (!xa_store(buffer, j, page, gfp)) ^ >> fs/cifs/smb2ops.c:4664:35: error: use of undeclared identifier 'gfp' if (!xa_store(buffer, j, page, gfp)) ^ >> fs/cifs/smb2ops.c:4664:29: error: use of undeclared identifier 'page' if (!xa_store(buffer, j, page, gfp)) ^ >> fs/cifs/smb2ops.c:4664:35: error: use of undeclared identifier 'gfp' if (!xa_store(buffer, j, page, gfp)) ^ >> fs/cifs/smb2ops.c:4664:29: error: use of undeclared identifier 'page' if (!xa_store(buffer, j, page, gfp)) ^ >> fs/cifs/smb2ops.c:4664:35: error: use of undeclared identifier 'gfp' if (!xa_store(buffer, j, page, gfp)) ^ fs/cifs/smb2ops.c:4668:28: error: use of undeclared identifier 'page'; did you mean 'pages'? if (copy_page_from_iter(page, 0, seg, &old->rq_iter) != seg) { ^~~~ pages include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^ include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^ fs/cifs/smb2ops.c:4644:16: note: 'pages' declared here struct page **pages; ^ fs/cifs/smb2ops.c:4668:28: error: use of undeclared identifier 'page'; did you mean 'pages'? if (copy_page_from_iter(page, 0, seg, &old->rq_iter) != seg) { ^~~~ pages include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^ include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^ fs/cifs/smb2ops.c:4644:16: note: 'pages' declared here struct page **pages; ^ fs/cifs/smb2ops.c:4668:28: error: use of undeclared identifier 'page'; did you mean 'pages'? if (copy_page_from_iter(page, 0, seg, &old->rq_iter) != seg) { ^~~~ pages include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^ include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^ include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value' (cond) ? \ ^ fs/cifs/smb2ops.c:4644:16: note: 'pages' declared here struct page **pages; ^ fs/cifs/smb2ops.c:4718:7: error: no member named 'rq_pages' in 'struct smb_rqst' rqst.rq_pages = pages; ~~~~ ^ fs/cifs/smb2ops.c:4719:7: error: no member named 'rq_npages' in 'struct smb_rqst' rqst.rq_npages = npages; ~~~~ ^ >> fs/cifs/smb2ops.c:4720:7: error: no member named 'rq_pagesz' in 'struct >> smb_rqst' rqst.rq_pagesz = PAGE_SIZE; ~~~~ ^ >> fs/cifs/smb2ops.c:4721:7: error: no member named 'rq_tailsz' in 'struct >> smb_rqst' rqst.rq_tailsz = (page_data_size % PAGE_SIZE) ? : PAGE_SIZE; ~~~~ ^ 19 errors generated. vim +66 fs/cifs/cifsencrypt.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 26 16c568efff82e4 Al Viro 2015-11-12 27 int __cifs_calc_signature(struct smb_rqst *rqst, 16c568efff82e4 Al Viro 2015-11-12 28 struct TCP_Server_Info *server, char *signature, 16c568efff82e4 Al Viro 2015-11-12 29 struct shash_desc *shash) 84afc29b185334 Steve French 2005-12-02 30 { e9917a000fcc37 Steve French 2006-03-31 31 int i; 307fbd31b61623 Shirish Pargaonkar 2010-10-21 32 int rc; bf5ea0e2f29b00 Jeff Layton 2012-09-18 33 struct kvec *iov = rqst->rq_iov; bf5ea0e2f29b00 Jeff Layton 2012-09-18 34 int n_vec = rqst->rq_nvec; c713c8770fa5bf Ronnie Sahlberg 2018-06-12 35 int is_smb2 = server->vals->header_preamble_size == 0; 84afc29b185334 Steve French 2005-12-02 36 c713c8770fa5bf Ronnie Sahlberg 2018-06-12 37 /* iov[0] is actual data and not the rfc1002 length for SMB2+ */ c713c8770fa5bf Ronnie Sahlberg 2018-06-12 38 if (is_smb2) { 83ffdeadb46b61 Paulo Alcantara 2018-06-15 39 if (iov[0].iov_len <= 4) 83ffdeadb46b61 Paulo Alcantara 2018-06-15 40 return -EIO; 83ffdeadb46b61 Paulo Alcantara 2018-06-15 41 i = 0; c713c8770fa5bf Ronnie Sahlberg 2018-06-12 42 } else { c713c8770fa5bf Ronnie Sahlberg 2018-06-12 43 if (n_vec < 2 || iov[0].iov_len != 4) c713c8770fa5bf Ronnie Sahlberg 2018-06-12 44 return -EIO; 83ffdeadb46b61 Paulo Alcantara 2018-06-15 45 i = 1; /* skip rfc1002 length */ c713c8770fa5bf Ronnie Sahlberg 2018-06-12 46 } c713c8770fa5bf Ronnie Sahlberg 2018-06-12 47 83ffdeadb46b61 Paulo Alcantara 2018-06-15 48 for (; i < n_vec; i++) { 745542e210b3b1 Jeff Layton 2007-11-03 49 if (iov[i].iov_len == 0) 745542e210b3b1 Jeff Layton 2007-11-03 50 continue; e9917a000fcc37 Steve French 2006-03-31 51 if (iov[i].iov_base == NULL) { f96637be081141 Joe Perches 2013-05-04 52 cifs_dbg(VFS, "null iovec entry\n"); e9917a000fcc37 Steve French 2006-03-31 53 return -EIO; 745542e210b3b1 Jeff Layton 2007-11-03 54 } 83ffdeadb46b61 Paulo Alcantara 2018-06-15 55 16c568efff82e4 Al Viro 2015-11-12 56 rc = crypto_shash_update(shash, 307fbd31b61623 Shirish Pargaonkar 2010-10-21 57 iov[i].iov_base, iov[i].iov_len); 14cae3243b555a Shirish Pargaonkar 2011-06-20 58 if (rc) { f96637be081141 Joe Perches 2013-05-04 59 cifs_dbg(VFS, "%s: Could not update with payload\n", 14cae3243b555a Shirish Pargaonkar 2011-06-20 60 __func__); 14cae3243b555a Shirish Pargaonkar 2011-06-20 61 return rc; 14cae3243b555a Shirish Pargaonkar 2011-06-20 62 } 14cae3243b555a Shirish Pargaonkar 2011-06-20 63 } 84afc29b185334 Steve French 2005-12-02 64 fb308a6f22f7f4 Jeff Layton 2012-09-18 65 /* now hash over the rq_pages array */ fb308a6f22f7f4 Jeff Layton 2012-09-18 @66 for (i = 0; i < rqst->rq_npages; i++) { 4c0d2a5a64332c Long Li 2018-05-30 67 void *kaddr; 4c0d2a5a64332c Long Li 2018-05-30 68 unsigned int len, offset; 16c568efff82e4 Al Viro 2015-11-12 69 4c0d2a5a64332c Long Li 2018-05-30 @70 rqst_page_get_length(rqst, i, &len, &offset); 4c0d2a5a64332c Long Li 2018-05-30 71 4c0d2a5a64332c Long Li 2018-05-30 @72 kaddr = (char *) kmap(rqst->rq_pages[i]) + offset; 16c568efff82e4 Al Viro 2015-11-12 73 a12d0c590cc7ae Paulo Alcantara 2018-06-23 74 rc = crypto_shash_update(shash, kaddr, len); a12d0c590cc7ae Paulo Alcantara 2018-06-23 75 if (rc) { a12d0c590cc7ae Paulo Alcantara 2018-06-23 76 cifs_dbg(VFS, "%s: Could not update with payload\n", a12d0c590cc7ae Paulo Alcantara 2018-06-23 77 __func__); a12d0c590cc7ae Paulo Alcantara 2018-06-23 78 kunmap(rqst->rq_pages[i]); a12d0c590cc7ae Paulo Alcantara 2018-06-23 79 return rc; a12d0c590cc7ae Paulo Alcantara 2018-06-23 80 } fb308a6f22f7f4 Jeff Layton 2012-09-18 81 fb308a6f22f7f4 Jeff Layton 2012-09-18 82 kunmap(rqst->rq_pages[i]); fb308a6f22f7f4 Jeff Layton 2012-09-18 83 } fb308a6f22f7f4 Jeff Layton 2012-09-18 84 16c568efff82e4 Al Viro 2015-11-12 85 rc = crypto_shash_final(shash, signature); 14cae3243b555a Shirish Pargaonkar 2011-06-20 86 if (rc) 16c568efff82e4 Al Viro 2015-11-12 87 cifs_dbg(VFS, "%s: Could not generate hash\n", __func__); 84afc29b185334 Steve French 2005-12-02 88 307fbd31b61623 Shirish Pargaonkar 2010-10-21 89 return rc; 84afc29b185334 Steve French 2005-12-02 90 } 84afc29b185334 Steve French 2005-12-02 91 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs