CC: [email protected] CC: [email protected] BCC: [email protected] CC: "GNU/Weeb Mailing List" <[email protected]> CC: [email protected] TO: David Howells <[email protected]>
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/rxrpc-ringless head: 14d1ef9d0da567ca88d30b4c79706079cc997e9f commit: 87c13f9a6f1a63f389778a34c67060e7dd5c7209 [11/24] rxrpc: Don't use a ring buffer for call Tx queue :::::: branch date: 2 days ago :::::: commit date: 9 days ago config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220501/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 400775649969b9baf3bc2a510266e7912bb16ae9) 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/87c13f9a6f1a63f389778a34c67060e7dd5c7209 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/rxrpc-ringless git checkout 87c13f9a6f1a63f389778a34c67060e7dd5c7209 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) ^~~~~~~~~~~~~~~~ fs/cifs/smb2inode.c:491:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 memcpy(dst, src, (size_t)(&src->CurrentByteOffset) - (size_t)src); ^ include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy' #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk' __underlying_##op(p, q, __fortify_size); \ ^~~~~~~~~~~~~~~~~ note: expanded from here include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy' #define __underlying_memcpy __builtin_memcpy ^~~~~~~~~~~~~~~~ fs/cifs/smb2inode.c:605:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memcpy(data, smb2_data, sizeof(struct smb311_posix_qinfo)); ^ include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy' #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk' __underlying_##op(p, q, __fortify_size); \ ^~~~~~~~~~~~~~~~~ note: expanded from here include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy' #define __underlying_memcpy __builtin_memcpy ^~~~~~~~~~~~~~~~ fs/cifs/smb2inode.c:605:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 memcpy(data, smb2_data, sizeof(struct smb311_posix_qinfo)); ^ include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy' #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk' __underlying_##op(p, q, __fortify_size); \ ^~~~~~~~~~~~~~~~~ note: expanded from here include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy' #define __underlying_memcpy __builtin_memcpy ^~~~~~~~~~~~~~~~ fs/cifs/smb2inode.c:634:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(&data, 0, sizeof(data)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ fs/cifs/smb2inode.c:634:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(&data, 0, sizeof(data)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ Suppressed 76 warnings (76 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 45 warnings generated. Suppressed 45 warnings (45 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 46 warnings generated. fs/reiserfs/tail_conversion.c:157:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(kaddr + pgoff, 0, blk_size - total_tail); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ fs/reiserfs/tail_conversion.c:157:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(kaddr + pgoff, 0, blk_size - total_tail); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ Suppressed 45 warnings (45 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 90 warnings generated. Suppressed 90 warnings (90 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 91 warnings generated. >> net/rxrpc/call_event.c:258:14: warning: Value stored to 'hard_ack' during >> its initialization is never read [clang-analyzer-deadcode.DeadStores] rxrpc_seq_t hard_ack = smp_load_acquire(&call->acks_hard_ack); ^~~~~~~~ net/rxrpc/call_event.c:258:14: note: Value stored to 'hard_ack' during its initialization is never read rxrpc_seq_t hard_ack = smp_load_acquire(&call->acks_hard_ack); ^~~~~~~~ Suppressed 90 warnings (90 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 93 warnings generated. net/rxrpc/call_object.c:170:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(&call->sock_node, 0xed, sizeof(call->sock_node)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ net/rxrpc/call_object.c:170:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(&call->sock_node, 0xed, sizeof(call->sock_node)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ net/rxrpc/call_object.c:569:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(&call->sock_node, 0xdd, sizeof(call->sock_node)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ net/rxrpc/call_object.c:569:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(&call->sock_node, 0xdd, sizeof(call->sock_node)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ net/rxrpc/call_object.c:688:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(&call->sock_node, 0xcd, sizeof(call->sock_node)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ net/rxrpc/call_object.c:688:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(&call->sock_node, 0xcd, sizeof(call->sock_node)); ^ include/linux/fortify-string.h:272:25: note: expanded from macro 'memset' #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk' __underlying_memset(p, c, __fortify_size); \ ^~~~~~~~~~~~~~~~~~~ include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset' #define __underlying_memset __builtin_memset ^~~~~~~~~~~~~~~~ Suppressed 90 warnings (90 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 76 warnings generated. Suppressed 76 warnings (76 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 76 warnings generated. Suppressed 76 warnings (76 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 78 warnings generated. drivers/net/wireless/st/cw1200/cw1200_sdio.c:297:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = cw1200_sdio_irq_subscribe(self); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/st/cw1200/cw1200_sdio.c:297:2: note: Value stored to 'status' is never read status = cw1200_sdio_irq_subscribe(self); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 77 warnings (77 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 119 warnings generated. drivers/net/wireless/ti/wlcore/main.c:729:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(data, 0, sizeof(*data)); vim +/hard_ack +258 net/rxrpc/call_event.c 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 251 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 252 /* 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 253 * Shrink the transmit queue. 2ad6691d988c0c net/rxrpc/call_event.c David Howells 2020-06-11 254 */ 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 255 void rxrpc_shrink_call_tx_queue(struct rxrpc_call *call) 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 256 { 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 257 struct rxrpc_txbuf *txb; 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 @258 rxrpc_seq_t hard_ack = smp_load_acquire(&call->acks_hard_ack); 2ad6691d988c0c net/rxrpc/call_event.c David Howells 2020-06-11 259 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 260 _enter("%x/%x/%x", call->tx_bottom, call->acks_hard_ack, call->tx_top); 2ad6691d988c0c net/rxrpc/call_event.c David Howells 2020-06-11 261 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 262 for (;;) { 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 263 spin_lock(&call->tx_lock); 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 264 txb = list_first_entry_or_null(&call->tx_queue, 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 265 struct rxrpc_txbuf, call_link); 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 266 if (!txb) 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 267 break; 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 268 hard_ack = smp_load_acquire(&call->acks_hard_ack); 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 269 if (before(hard_ack, txb->seq)) 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 270 break; 17926a79320afa net/rxrpc/ar-ack.c David Howells 2007-04-26 271 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 272 ASSERTCMP(txb->seq, ==, call->tx_bottom + 1); 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 273 call->tx_bottom++; 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 274 list_del_rcu(&txb->call_link); 224711df5c00f7 net/rxrpc/ar-ack.c David Howells 2007-05-04 275 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 276 trace_rxrpc_txqueue(call, rxrpc_txqueue_dequeue); 17926a79320afa net/rxrpc/ar-ack.c David Howells 2007-04-26 277 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 278 spin_unlock(&call->tx_lock); 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 279 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 280 rxrpc_put_txbuf(txb, rxrpc_txbuf_put_rotated); dfa7d9204054b0 net/rxrpc/call_event.c David Howells 2016-09-17 281 } 17926a79320afa net/rxrpc/ar-ack.c David Howells 2007-04-26 282 87c13f9a6f1a63 net/rxrpc/call_event.c David Howells 2022-03-31 283 spin_unlock(&call->tx_lock); 17926a79320afa net/rxrpc/ar-ack.c David Howells 2007-04-26 284 } 17926a79320afa net/rxrpc/ar-ack.c David Howells 2007-04-26 285 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
