CC: llvm(a)lists.linux.dev CC: kbuild-all(a)lists.01.org BCC: lkp(a)intel.com In-Reply-To: <20220227215408.3180023-1-arnd@kernel.org> References: <20220227215408.3180023-1-arnd@kernel.org> TO: Arnd Bergmann TO: linux-kbuild(a)vger.kernel.org CC: Arnd Bergmann CC: Masahiro Yamada CC: llvm(a)lists.linux.dev CC: Jonathan Corbet CC: Federico Vaga CC: Alex Shi CC: Hu Haowen CC: Michal Marek CC: Nick Desaulniers CC: linux-doc(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org CC: linux-doc-tw-discuss(a)lists.sourceforge.net CC: linux-arm-kernel(a)lists.infradead.org CC: intel-gfx(a)lists.freedesktop.org CC: dri-devel(a)lists.freedesktop.org CC: greybus-dev(a)lists.linaro.org CC: linux-staging(a)lists.linux.dev CC: linux-btrfs(a)vger.kernel.org Hi Arnd, I love your patch! Perhaps something to improve: [auto build test WARNING on arm64/for-next/core] [also build test WARNING on drm-intel/for-linux-next staging/staging-testing kdave/for-next soc/for-next linus/master v5.17-rc6] [cannot apply to masahiroy-kbuild/for-next srcres258-doc/doc-zh-tw next-20220225] [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/Arnd-Bergmann/Kbuild-remove-std-gnu89-from-compiler-arguments/20220228-055556 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core :::::: branch date: 17 hours ago :::::: commit date: 17 hours ago config: riscv-randconfig-c006-20220227 (https://download.01.org/0day-ci/archive/20220228/202202282249.aKeM5wOk-lkp(a)intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) 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 # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/0day-ci/linux/commit/c34e5f15d634547ada0607723cd7242fb8e527d5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Arnd-Bergmann/Kbuild-remove-std-gnu89-from-compiler-arguments/20220228-055556 git checkout c34e5f15d634547ada0607723cd7242fb8e527d5 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) include/linux/blkdev.h:500:3: note: Returning without writing to 'q->limits.zoned', which participates in a condition later return true; ^ include/linux/blkdev.h:508:9: note: Returning from 'blk_queue_is_zoned' return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0; ^~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:508:9: note: '?' condition is true include/linux/blkdev.h:508:2: note: Returning without writing to 'q->limits.zoned', which participates in a condition later return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0; ^ block/blk-zoned.c:195:26: note: Returning from 'blk_queue_zone_sectors' sector_t zone_sectors = blk_queue_zone_sectors(q); ^~~~~~~~~~~~~~~~~~~~~~~~~ block/blk-zoned.c:202:6: note: Assuming 'need_reset' is non-null if (!need_reset) ^~~~~~~~~~~ block/blk-zoned.c:202:2: note: Taking false branch if (!need_reset) ^ block/blk-zoned.c:208:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ block/blk-zoned.c:208:2: note: Taking false branch if (ret < 0) ^ block/blk-zoned.c:212:9: note: 'sector' is < 'capacity' while (sector < capacity) { ^~~~~~ block/blk-zoned.c:212:2: note: Loop condition is true. Entering loop body while (sector < capacity) { ^ block/blk-zoned.c:213:17: note: Calling 'blk_queue_zone_no' if (!test_bit(blk_queue_zone_no(q, sector), need_reset)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:520:7: note: Calling 'blk_queue_is_zoned' if (!blk_queue_is_zoned(q)) ^~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:497:10: note: Calling 'blk_queue_zoned_model' switch (blk_queue_zoned_model(q)) { ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:490:2: note: Taking true branch if (IS_ENABLED(CONFIG_BLK_DEV_ZONED)) ^ include/linux/blkdev.h:491:3: note: Returning without writing to 'q->limits.zoned', which participates in a condition later return q->limits.zoned; ^ include/linux/blkdev.h:491:3: note: Returning the value 2, which participates in a condition later return q->limits.zoned; ^~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:497:10: note: Returning from 'blk_queue_zoned_model' switch (blk_queue_zoned_model(q)) { ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:497:2: note: Control jumps to 'case BLK_ZONED_HM:' at line 499 switch (blk_queue_zoned_model(q)) { ^ include/linux/blkdev.h:500:3: note: Returning the value 1, which participates in a condition later return true; ^~~~~~~~~~~ include/linux/blkdev.h:520:7: note: Returning from 'blk_queue_is_zoned' if (!blk_queue_is_zoned(q)) ^~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:520:2: note: Taking false branch if (!blk_queue_is_zoned(q)) ^ include/linux/blkdev.h:522:19: note: '?' condition is false return sector >> ilog2(q->limits.chunk_sectors); ^ include/linux/log2.h:158:2: note: expanded from macro 'ilog2' __builtin_constant_p(n) ? \ ^ include/linux/blkdev.h:522:19: note: '?' condition is true return sector >> ilog2(q->limits.chunk_sectors); ^ include/linux/log2.h:161:2: note: expanded from macro 'ilog2' (sizeof(n) <= 4) ? \ ^ include/linux/blkdev.h:522:19: note: Calling '__ilog2_u32' return sector >> ilog2(q->limits.chunk_sectors); ^ include/linux/log2.h:162:2: note: expanded from macro 'ilog2' __ilog2_u32(n) : \ ^~~~~~~~~~~~~~ include/linux/log2.h:24:2: note: Returning the value -1 return fls(n) - 1; ^~~~~~~~~~~~~~~~~ include/linux/blkdev.h:522:19: note: Returning from '__ilog2_u32' return sector >> ilog2(q->limits.chunk_sectors); ^ include/linux/log2.h:162:2: note: expanded from macro 'ilog2' __ilog2_u32(n) : \ ^~~~~~~~~~~~~~ include/linux/blkdev.h:522:16: note: The result of the right shift is undefined because the right operand is negative return sector >> ilog2(q->limits.chunk_sectors); ^ Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. 20 warnings generated. >> fs/pstore/platform.c:360:3: 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(psinfo->buf, big_oops_buf, hsize); ^~~~~~ fs/pstore/platform.c:360:3: 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(psinfo->buf, big_oops_buf, hsize); ^~~~~~ fs/pstore/platform.c:361:3: 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(psinfo->buf + hsize, big_oops_buf + diff, ^~~~~~ fs/pstore/platform.c:361:3: 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(psinfo->buf + hsize, big_oops_buf + diff, ^~~~~~ fs/pstore/platform.c:365:3: 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(psinfo->buf, big_oops_buf, total_len); ^~~~~~ fs/pstore/platform.c:365:3: 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(psinfo->buf, big_oops_buf, total_len); ^~~~~~ >> fs/pstore/platform.c:373: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(record, 0, sizeof(*record)); ^~~~~~ fs/pstore/platform.c:373: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(record, 0, sizeof(*record)); ^~~~~~ >> fs/pstore/platform.c:436:17: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] header_size = snprintf(dst, dst_size, "%s#%d Part%u\n", why, ^~~~~~~~ fs/pstore/platform.c:436:17: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 header_size = snprintf(dst, dst_size, "%s#%d Part%u\n", why, ^~~~~~~~ fs/pstore/platform.c:709: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(workspace + unzipped_len, record->buf + record->size, ^~~~~~ fs/pstore/platform.c:709: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(workspace + unzipped_len, record->buf + record->size, ^~~~~~ Suppressed 14 warnings (14 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. 34 warnings generated. crypto/crypto_null.c:32: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(dst, src, slen); ^~~~~~ crypto/crypto_null.c:32: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, slen); ^~~~~~ crypto/crypto_null.c:73: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(dst, src, NULL_BLOCK_SIZE); ^~~~~~ crypto/crypto_null.c:73: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, NULL_BLOCK_SIZE); ^~~~~~ crypto/crypto_null.c:85:4: 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(walk.dst.virt.addr, walk.src.virt.addr, ^~~~~~ crypto/crypto_null.c:85:4: 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(walk.dst.virt.addr, walk.src.virt.addr, ^~~~~~ Suppressed 31 warnings (31 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. 20 warnings generated. crypto/md4.c:160:3: 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((char *)mctx->block + (sizeof(mctx->block) - avail), ^~~~~~ crypto/md4.c:160:3: 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((char *)mctx->block + (sizeof(mctx->block) - avail), ^~~~~~ crypto/md4.c:165: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((char *)mctx->block + (sizeof(mctx->block) - avail), ^~~~~~ crypto/md4.c:165: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((char *)mctx->block + (sizeof(mctx->block) - avail), ^~~~~~ crypto/md4.c:173:3: 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(mctx->block, data, sizeof(mctx->block)); ^~~~~~ crypto/md4.c:173:3: 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(mctx->block, data, sizeof(mctx->block)); ^~~~~~ crypto/md4.c:179: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(mctx->block, data, len); ^~~~~~ crypto/md4.c:179: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(mctx->block, data, len); ^~~~~~ crypto/md4.c:193: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(p, 0x00, padding + sizeof (u64)); ^~~~~~ crypto/md4.c:193: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(p, 0x00, padding + sizeof (u64)); ^~~~~~ crypto/md4.c:199: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(p, 0, padding); ^~~~~~ crypto/md4.c:199: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(p, 0, padding); ^~~~~~ crypto/md4.c:206: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(out, mctx->hash, sizeof(mctx->hash)); ^~~~~~ crypto/md4.c:206: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(out, mctx->hash, sizeof(mctx->hash)); ^~~~~~ crypto/md4.c:207: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(mctx, 0, sizeof(*mctx)); ^~~~~~ crypto/md4.c:207: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(mctx, 0, sizeof(*mctx)); ^~~~~~ Suppressed 12 warnings (12 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. 29 warnings generated. kernel/futex/waitwake.c:218:17: warning: The left operand of '==' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] return oldval == cmparg; ^ kernel/futex/waitwake.c:249:15: note: Assuming 'ret' is equal to 0 if (unlikely(ret != 0)) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ kernel/futex/waitwake.c:249:2: note: Taking false branch if (unlikely(ret != 0)) ^ kernel/futex/waitwake.c:252:15: note: Assuming 'ret' is equal to 0 if (unlikely(ret != 0)) -- ^ include/linux/bitops.h:155:10: note: Calling 'fls' return fls(l); ^~~~~~ include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32 int r = 32; ^~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking false branch if (!x) ^ include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false if (!(x & 0xffff0000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:19:2: note: Taking false branch if (!(x & 0xffff0000u)) { ^ include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false if (!(x & 0xff000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:23:2: note: Taking false branch if (!(x & 0xff000000u)) { ^ include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false if (!(x & 0xf0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:27:2: note: Taking false branch if (!(x & 0xf0000000u)) { ^ include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false if (!(x & 0xc0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:31:2: note: Taking false branch if (!(x & 0xc0000000u)) { ^ include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false if (!(x & 0x80000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:35:2: note: Taking false branch if (!(x & 0x80000000u)) { ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r'), which participates in a condition later return r; ^~~~~~~~ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ include/linux/bitops.h:155:10: note: Returning from 'fls' return fls(l); ^~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32, which participates in a condition later return fls(l); ^~~~~~~~~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32 return fls(l); ^~~~~~~~~~~~~ arch/riscv/mm/context.c:225:14: note: Returning from 'fls_long' asid_bits = fls_long(asid_bits); ^~~~~~~~~~~~~~~~~~~ arch/riscv/mm/context.c:225:2: note: The value 32 is assigned to 'asid_bits' asid_bits = fls_long(asid_bits); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/mm/context.c:236:6: note: 'asid_bits' is 32 if (asid_bits) { ^~~~~~~~~ arch/riscv/mm/context.c:236:2: note: Taking true branch if (asid_bits) { ^ arch/riscv/mm/context.c:237:17: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int' num_asids = 1 << asid_bits; ^ ~~~~~~~~~ Suppressed 31 warnings (31 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 53 warnings generated. >> lib/test_printf.c:49: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(alloced_buffer, FILL_CHAR, BUF_SIZE + 2*PAD_SIZE); ^~~~~~ lib/test_printf.c:49: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(alloced_buffer, FILL_CHAR, BUF_SIZE + 2*PAD_SIZE); ^~~~~~ >> lib/test_printf.c:51:8: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = vsnprintf(test_buffer, bufsize, fmt, aq); ^~~~~~~~~ lib/test_printf.c:51:8: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 ret = vsnprintf(test_buffer, bufsize, fmt, aq); ^~~~~~~~~ >> lib/test_printf.c:267:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] nchars = snprintf(buf, len, "%p", p); ^~~~~~~~ lib/test_printf.c:267:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 nchars = snprintf(buf, len, "%p", p); ^~~~~~~~ lib/test_printf.c:639:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(cmp_buf + size, BUF_SIZE - size, ")"); ^~~~~~~~ lib/test_printf.c:639:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(cmp_buf + size, BUF_SIZE - size, ")"); ^~~~~~~~ lib/test_printf.c:681:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp); ^~~~~~~~ lib/test_printf.c:681:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp); ^~~~~~~~ lib/test_printf.c:684:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(cmp_buffer, BUF_SIZE, "__GFP_ATOMIC|%#lx", ^~~~~~~~ lib/test_printf.c:684:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(cmp_buffer, BUF_SIZE, "__GFP_ATOMIC|%#lx", ^~~~~~~~ Suppressed 47 warnings (34 in non-user code, 13 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 56 warnings generated. fs/pipe.c:490:24: warning: Value stored to 'buf' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct pipe_buffer *buf = &pipe->bufs[head & mask]; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c:490:24: note: Value stored to 'buf' during its initialization is never read struct pipe_buffer *buf = &pipe->bufs[head & mask]; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c:1277:4: 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(bufs, pipe->bufs + t, ^~~~~~ fs/pipe.c:1277:4: 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(bufs, pipe->bufs + t, ^~~~~~ fs/pipe.c:1282:5: 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(bufs + tsize, pipe->bufs, ^~~~~~ fs/pipe.c:1282:5: 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(bufs + tsize, pipe->bufs, ^~~~~~ fs/pipe.c:1284:4: 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(bufs, pipe->bufs + t, ^~~~~~ fs/pipe.c:1284:4: 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(bufs, pipe->bufs + t, ^~~~~~ include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << fls_long(n - 1); ^ fs/pipe.c:1383:7: note: 'pipe' is non-null if (!pipe) ^~~~ fs/pipe.c:1383:2: note: Taking false branch if (!pipe) ^ fs/pipe.c:1388:2: note: Control jumps to 'case 1031:' @line 1389 switch (cmd) { ^ fs/pipe.c:1390:9: note: Calling 'pipe_set_size' ret = pipe_set_size(pipe, arg); ^~~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c:1320:9: note: Calling 'round_pipe_size' size = round_pipe_size(arg); ^~~~~~~~~~~~~~~~~~~~ fs/pipe.c:1233:6: note: Assuming the condition is false if (size > (1U << 31)) ^~~~~~~~~~~~~~~~~ fs/pipe.c:1233:2: note: Taking false branch if (size > (1U << 31)) ^ fs/pipe.c:1237:6: note: Assuming the condition is false if (size < PAGE_SIZE) ^~~~~~~~~~~~~~~~ fs/pipe.c:1237:2: note: Taking false branch if (size < PAGE_SIZE) ^ fs/pipe.c:1240:9: note: '?' condition is false return roundup_pow_of_two(size); ^ include/linux/log2.h:176:2: note: expanded from macro 'roundup_pow_of_two' __builtin_constant_p(n) ? ( \ ^ fs/pipe.c:1240:9: note: Calling '__roundup_pow_of_two' return roundup_pow_of_two(size); ^ include/linux/log2.h:180:2: note: expanded from macro 'roundup_pow_of_two' __roundup_pow_of_two(n) \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Calling 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/bitops.h:154:2: note: Taking true branch if (sizeof(l) == 4) ^ include/linux/bitops.h:155:10: note: Calling 'fls' return fls(l); -- ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ include/linux/bitops.h:155:10: note: Returning from 'fls' return fls(l); ^~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32 return fls(l); ^~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Returning from 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' return 1UL << fls_long(n - 1); ^ ~~~~~~~~~~~~~~~ Suppressed 51 warnings (46 in non-user code, 5 with check filters). 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. crypto/drbg.c:246:17: warning: Value stored to 'entropylen' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned short entropylen = drbg_sec_strength(drbg->core->flags); ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/drbg.c:246:17: note: Value stored to 'entropylen' during its initialization is never read unsigned short entropylen = drbg_sec_strength(drbg->core->flags); ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/drbg.c:261:3: 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(drbg->prev, entropy, entropylen); ^~~~~~ crypto/drbg.c:261:3: 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(drbg->prev, entropy, entropylen); ^~~~~~ crypto/drbg.c:269: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(drbg->prev, entropy, entropylen); ^~~~~~ crypto/drbg.c:269: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(drbg->prev, entropy, entropylen); ^~~~~~ crypto/drbg.c:666: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(drbg->V, 1, drbg_statelen(drbg)); ^~~~~~ crypto/drbg.c:666: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(drbg->V, 1, drbg_statelen(drbg)); ^~~~~~ crypto/drbg.c:736:3: 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(buf + len, drbg->V, outlen); ^~~~~~ crypto/drbg.c:736:3: 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(buf + len, drbg->V, outlen); ^~~~~~ crypto/drbg.c:1200:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = crypto_rng_get_bytes(drbg->jent, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/drbg.c:1200:4: note: Value stored to 'ret' is never read ret = crypto_rng_get_bytes(drbg->jent, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/drbg.c:1242: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(drbg->V, 0, drbg_statelen(drbg)); ^~~~~~ crypto/drbg.c:1242: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(drbg->V, 0, drbg_statelen(drbg)); ^~~~~~ crypto/drbg.c:1243: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(drbg->C, 0, drbg_statelen(drbg)); ^~~~~~ crypto/drbg.c:1243: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(drbg->C, 0, drbg_statelen(drbg)); ^~~~~~ crypto/drbg.c:2081: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(alg->base.cra_name, "stdrng", 6); ^~~~~~ crypto/drbg.c:2081: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(alg->base.cra_name, "stdrng", 6); ^~~~~~ crypto/drbg.c:2083:3: 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(alg->base.cra_driver_name, "drbg_pr_", 8); ^~~~~~ crypto/drbg.c:2083:3: 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(alg->base.cra_driver_name, "drbg_pr_", 8); ^~~~~~ crypto/drbg.c:2086:3: 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(alg->base.cra_driver_name, "drbg_nopr_", 10); ^~~~~~ crypto/drbg.c:2086:3: 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(alg->base.cra_driver_name, "drbg_nopr_", 10); ^~~~~~ crypto/drbg.c:2089: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(alg->base.cra_driver_name + pos, core->cra_name, ^~~~~~ crypto/drbg.c:2089: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(alg->base.cra_driver_name + pos, core->cra_name, ^~~~~~ Suppressed 34 warnings (34 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. 49 warnings generated. Suppressed 49 warnings (49 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. 49 warnings generated. Suppressed 49 warnings (49 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. 51 warnings generated. >> block/partitions/sysv68.c:77:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tmp, sizeof(tmp), "sysV68: %s(s%u)", state->name, slices); ^~~~~~~~ block/partitions/sysv68.c:77:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tmp, sizeof(tmp), "sysV68: %s(s%u)", state->name, slices); ^~~~~~~~ block/partitions/sysv68.c:87:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tmp, sizeof(tmp), "(s%u)", i); ^~~~~~~~ block/partitions/sysv68.c:87:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tmp, sizeof(tmp), "(s%u)", i); ^~~~~~~~ Suppressed 49 warnings (49 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. 47 warnings generated. Suppressed 47 warnings (47 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. 53 warnings generated. block/disk-events.c:347:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] pos += sprintf(buf + pos, "%s%s", ^~~~~~~ block/disk-events.c:347:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 pos += sprintf(buf + pos, "%s%s", ^~~~~~~ block/disk-events.c:352:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] pos += sprintf(buf + pos, "\n"); ^~~~~~~ block/disk-events.c:352:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 pos += sprintf(buf + pos, "\n"); ^~~~~~~ block/disk-events.c:379:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "-1\n"); ^~~~~~~ block/disk-events.c:379:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "-1\n"); ^~~~~~~ block/disk-events.c:380:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", disk->ev->poll_msecs); ^~~~~~~ block/disk-events.c:380:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", disk->ev->poll_msecs); ^~~~~~~ block/disk-events.c:390:17: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (!count || !sscanf(buf, "%ld", &intv)) ^~~~~~ block/disk-events.c:390:17: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (!count || !sscanf(buf, "%ld", &intv)) ^~~~~~ Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. 48 warnings generated. include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << fls_long(n - 1); ^ mm/readahead.c:587:6: note: Assuming field 'ra_pages' is not equal to 0 if (!ractl->ra->ra_pages) ^~~~~~~~~~~~~~~~~~~~ mm/readahead.c:587:2: note: Taking false branch if (!ractl->ra->ra_pages) ^ mm/readahead.c:593:6: note: Assuming the condition is false if (folio_test_writeback(folio)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/readahead.c:593:2: note: Taking false branch if (folio_test_writeback(folio)) ^ mm/readahead.c:601:6: note: Assuming the condition is false if (inode_read_congested(ractl->mapping->host)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/readahead.c:601:2: note: Taking false branch if (inode_read_congested(ractl->mapping->host)) ^ mm/readahead.c:604:2: note: Taking false branch if (blk_cgroup_congested()) ^ mm/readahead.c:608:2: note: Calling 'ondemand_readahead' ondemand_readahead(ractl, true, req_count); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/readahead.c:451:6: note: Assuming 'req_size' is <= 'max_pages' if (req_size > max_pages && bdi->io_pages > max_pages) ^~~~~~~~~~~~~~~~~~~~ mm/readahead.c:451:27: note: Left side of '&&' is false if (req_size > max_pages && bdi->io_pages > max_pages) ^ mm/readahead.c:457:6: note: Assuming 'index' is 0 if (!index) ^~~~~~ mm/readahead.c:457:2: note: Taking true branch if (!index) ^ mm/readahead.c:458:3: note: Control jumps to line 528 goto initial_readahead; ^ mm/readahead.c:529:13: note: Calling 'get_init_ra_size' ra->size = get_init_ra_size(req_size, max_pages); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/readahead.c:315:26: note: '?' condition is false unsigned long newsize = roundup_pow_of_two(size); -- crypto/ecc.c:1303:2: note: Calling 'xycz_initial_double' xycz_initial_double(rx[1], ry[1], rx[0], ry[0], initial_z, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:1168:6: note: 'p_initial_z' is non-null if (p_initial_z) ^~~~~~~~~~~ crypto/ecc.c:1168:2: note: Taking true branch if (p_initial_z) ^ crypto/ecc.c:1173:2: note: Calling 'ecc_point_double_jacobian' ecc_point_double_jacobian(x1, y1, z, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:1089:6: note: Assuming the condition is false if (vli_is_zero(z1, ndigits)) ^~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:1089:2: note: Taking false branch if (vli_is_zero(z1, ndigits)) ^ crypto/ecc.c:1093:2: note: Calling 'vli_mod_square_fast' vli_mod_square_fast(t4, y1, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:982:2: note: Calling 'vli_mmod_fast' vli_mmod_fast(result, product, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:918:2: note: Taking false branch if (strncmp(curve->name, "nist_", 5) != 0) { ^ crypto/ecc.c:934:2: note: Control jumps to the 'default' case at line 944 switch (ndigits) { ^ crypto/ecc.c:945:3: note: Assuming the condition is false pr_err_ratelimited("ecc: unsupported digits size!\n"); ^ include/linux/printk.h:654:2: note: expanded from macro 'pr_err_ratelimited' printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:639:6: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:41:28: note: expanded from macro '__ratelimit' #define __ratelimit(state) ___ratelimit(state, __func__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:945:3: note: Taking false branch pr_err_ratelimited("ecc: unsupported digits size!\n"); ^ include/linux/printk.h:654:2: note: expanded from macro 'pr_err_ratelimited' printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:639:2: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^ crypto/ecc.c:946:3: note: Returning without writing to '*result' return false; ^ crypto/ecc.c:982:2: note: Returning from 'vli_mmod_fast' vli_mmod_fast(result, product, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:983:1: note: Returning without writing to '*result' } ^ crypto/ecc.c:1093:2: note: Returning from 'vli_mod_square_fast' vli_mod_square_fast(t4, y1, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:1097:2: note: Calling 'vli_mod_square_fast' vli_mod_square_fast(t4, t4, curve); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:981:2: note: Calling 'vli_square' vli_square(product, left, curve->g.ndigits); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/ecc.c:455:14: note: Assuming the condition is true for (k = 0; k < ndigits * 2 - 1; k++) { ^~~~~~~~~~~~~~~~~~~ crypto/ecc.c:455:2: note: Loop condition is true. Entering loop body for (k = 0; k < ndigits * 2 - 1; k++) { ^ crypto/ecc.c:458:7: note: Assuming 'k' is < 'ndigits' if (k < ndigits) ^~~~~~~~~~~ crypto/ecc.c:458:3: note: Taking true branch if (k < ndigits) ^ crypto/ecc.c:459:4: note: The value 0 is assigned to 'min' min = 0; ^~~~~~~ crypto/ecc.c:463:8: note: The value 0 is assigned to 'i' for (i = min; i <= k && i <= k - i; i++) { ^~~~~~~ crypto/ecc.c:463:17: note: 'i' is <= 'k' for (i = min; i <= k && i <= k - i; i++) { ^ crypto/ecc.c:463:17: note: Left side of '&&' is true crypto/ecc.c:463:3: note: Loop condition is true. Entering loop body for (i = min; i <= k && i <= k - i; i++) { ^ crypto/ecc.c:466:14: note: 1st function call argument is an uninitialized value product = mul_64_64(left[i], left[k - i]); ^ ~~~~~~~ Suppressed 13 warnings (13 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. 53 warnings generated. >> fs/erofs/super.c:93: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(vi, 0, offsetof(struct erofs_inode, vfs_inode)); ^~~~~~ fs/erofs/super.c:93: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(vi, 0, offsetof(struct erofs_inode, vfs_inode)); ^~~~~~ >> fs/erofs/super.c:156:3: 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(buffer + i, ptr + erofs_blkoff(*offset), cnt); ^~~~~~ fs/erofs/super.c:156:3: 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(buffer + i, ptr + erofs_blkoff(*offset), cnt); ^~~~~~ fs/erofs/super.c:344: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(&sb->s_uuid, dsb->uuid, sizeof(dsb->uuid)); ^~~~~~ fs/erofs/super.c:344: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(&sb->s_uuid, dsb->uuid, sizeof(dsb->uuid)); ^~~~~~ include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << fls_long(n - 1); ^ fs/erofs/super.c:589:6: note: Assuming the condition is false if (!sb_set_blocksize(sb, EROFS_BLKSIZ)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:589:2: note: Taking false branch if (!sb_set_blocksize(sb, EROFS_BLKSIZ)) { ^ fs/erofs/super.c:595:6: note: Assuming 'sbi' is non-null if (!sbi) ^~~~ fs/erofs/super.c:595:2: note: Taking false branch if (!sbi) ^ fs/erofs/super.c:604:8: note: Calling 'erofs_read_superblock' err = erofs_read_superblock(sb); ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:291:2: note: Taking false branch if (IS_ERR(page)) { ^ fs/erofs/super.c:302:6: note: Assuming field 'magic' is equal to EROFS_SUPER_MAGIC_V1 if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) { ^ include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu' #define le32_to_cpu __le32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ fs/erofs/super.c:302:2: note: Taking false branch if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) { ^ fs/erofs/super.c:308:6: note: Assuming the condition is false if (erofs_sb_has_sb_chksum(sbi)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:308:2: note: Taking false branch if (erofs_sb_has_sb_chksum(sbi)) { ^ fs/erofs/super.c:317:6: note: Assuming 'blkszbits' is equal to LOG_BLOCK_SIZE if (blkszbits != LOG_BLOCK_SIZE) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:317:2: note: Taking false branch if (blkszbits != LOG_BLOCK_SIZE) { ^ fs/erofs/super.c:323:2: note: Taking false branch if (!check_layout_compatibility(sb, dsb)) ^ fs/erofs/super.c:327:6: note: Assuming the condition is false if (sbi->sb_size > EROFS_BLKSIZ) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:327:2: note: Taking false branch if (sbi->sb_size > EROFS_BLKSIZ) { ^ fs/erofs/super.c:337:19: note: '?' condition is true sbi->islotbits = ilog2(sizeof(struct erofs_inode_compact)); ^ include/linux/log2.h:158:2: note: expanded from macro 'ilog2' __builtin_constant_p(n) ? \ ^ fs/erofs/super.c:337:19: note: '?' condition is false sbi->islotbits = ilog2(sizeof(struct erofs_inode_compact)); ^ include/linux/log2.h:159:3: note: expanded from macro 'ilog2' ((n) < 2 ? 0 : \ ^ fs/erofs/super.c:348:6: note: Assuming 'ret' is >= 0 if (ret < 0) { /* -E2BIG */ ^~~~~~~ fs/erofs/super.c:348:2: note: Taking false branch if (ret < 0) { /* -E2BIG */ ^ fs/erofs/super.c:355:6: note: Assuming the condition is false if (erofs_sb_has_compr_cfgs(sbi)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:355:2: note: Taking false branch if (erofs_sb_has_compr_cfgs(sbi)) ^ fs/erofs/super.c:359:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ fs/erofs/super.c:359:2: note: Taking false branch if (ret < 0) ^ fs/erofs/super.c:363:8: note: Calling 'erofs_init_devices' ret = erofs_init_devices(sb, dsb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/super.c:235:6: note: Assuming the condition is false if (!erofs_sb_has_device_table(sbi)) -- ^ kernel/sched/topology.c:2251:4: note: Calling 'claim_allocations' claim_allocations(i, sd); ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:1473:16: note: Loop condition is false. Exiting loop WARN_ON_ONCE(*per_cpu_ptr(sdd->sd, cpu) != sd); ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ kernel/sched/topology.c:1473:2: note: Assuming '__ret_warn_on' is not equal to 0 WARN_ON_ONCE(*per_cpu_ptr(sdd->sd, cpu) != sd); ^ include/asm-generic/bug.h:179:33: note: expanded from macro 'WARN_ON_ONCE' #define WARN_ON_ONCE(condition) WARN_ON(condition) ^~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:167:2: note: expanded from macro 'WARN_ON' unlikely(__ret_warn_on); \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ kernel/sched/topology.c:1474:3: note: Loop condition is false. Exiting loop *per_cpu_ptr(sdd->sd, cpu) = NULL; ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ kernel/sched/topology.c:1476:21: note: Loop condition is false. Exiting loop if (atomic_read(&(*per_cpu_ptr(sdd->sds, cpu))->ref)) ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ kernel/sched/topology.c:1476:6: note: Assuming the condition is false if (atomic_read(&(*per_cpu_ptr(sdd->sds, cpu))->ref)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:1476:2: note: Taking false branch if (atomic_read(&(*per_cpu_ptr(sdd->sds, cpu))->ref)) ^ kernel/sched/topology.c:1479:21: note: Loop condition is false. Exiting loop if (atomic_read(&(*per_cpu_ptr(sdd->sg, cpu))->ref)) ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ kernel/sched/topology.c:1479:6: note: Assuming the condition is false if (atomic_read(&(*per_cpu_ptr(sdd->sg, cpu))->ref)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:1479:2: note: Taking false branch if (atomic_read(&(*per_cpu_ptr(sdd->sg, cpu))->ref)) ^ kernel/sched/topology.c:1482:21: note: Loop condition is false. Exiting loop if (atomic_read(&(*per_cpu_ptr(sdd->sgc, cpu))->ref)) ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ kernel/sched/topology.c:1482:6: note: Assuming the condition is false if (atomic_read(&(*per_cpu_ptr(sdd->sgc, cpu))->ref)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:1482:2: note: Taking false branch if (atomic_read(&(*per_cpu_ptr(sdd->sgc, cpu))->ref)) ^ kernel/sched/topology.c:1484:1: note: Returning without writing to 'sd->groups' } ^ kernel/sched/topology.c:2251:4: note: Returning from 'claim_allocations' claim_allocations(i, sd); ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:2252:4: note: Calling 'init_sched_groups_capacity' init_sched_groups_capacity(i, sd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:1250:2: note: 'sg' initialized here struct sched_group *sg = sd->groups; ^~~~~~~~~~~~~~~~~~~~~~ kernel/sched/topology.c:1252:10: note: Assuming 'sg' is null WARN_ON(!sg); ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ kernel/sched/topology.c:1257:20: note: Access to field 'group_weight' results in a dereference of a null pointer (loaded from variable 'sg') sg->group_weight = cpumask_weight(sched_group_span(sg)); ~~ ^ >> kernel/sched/topology.c:1450: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(d, 0, sizeof(*d)); ^~~~~~ kernel/sched/topology.c:1450: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(d, 0, sizeof(*d)); ^~~~~~ Suppressed 69 warnings (68 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 67 warnings generated. Suppressed 67 warnings (67 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. 67 warnings generated. Suppressed 67 warnings (67 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. 33 warnings generated. crypto/asymmetric_keys/asymmetric_type.c:74:9: warning: Access to field 'len' results in a dereference of a null pointer (loaded from variable 'id_2') [clang-analyzer-core.NullDereference] len = id_2->len; ^~~~ crypto/asymmetric_keys/asymmetric_type.c:64:10: note: Assuming 'id_0' is null WARN_ON(!id_0 && !id_1 && !id_2); ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ crypto/asymmetric_keys/asymmetric_type.c:64:10: note: Left side of '&&' is true WARN_ON(!id_0 && !id_1 && !id_2); ^ crypto/asymmetric_keys/asymmetric_type.c:64:19: note: Assuming 'id_1' is null WARN_ON(!id_0 && !id_1 && !id_2); ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ crypto/asymmetric_keys/asymmetric_type.c:64:10: note: Left side of '&&' is true WARN_ON(!id_0 && !id_1 && !id_2); ^ crypto/asymmetric_keys/asymmetric_type.c:64:28: note: Assuming 'id_2' is null WARN_ON(!id_0 && !id_1 && !id_2); ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ crypto/asymmetric_keys/asymmetric_type.c:66:6: note: 'id_0' is null if (id_0) { ^~~~ crypto/asymmetric_keys/asymmetric_type.c:66:2: note: Taking false branch if (id_0) { ^ crypto/asymmetric_keys/asymmetric_type.c:69:13: note: 'id_1' is null } else if (id_1) { ^~~~ crypto/asymmetric_keys/asymmetric_type.c:69:9: note: Taking false branch } else if (id_1) { ^ crypto/asymmetric_keys/asymmetric_type.c:74:9: note: Access to field 'len' results in a dereference of a null pointer (loaded from variable 'id_2') len = id_2->len; ^~~~ crypto/asymmetric_keys/asymmetric_type.c:160: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(kid->data, val_1, len_1); ^~~~~~ crypto/asymmetric_keys/asymmetric_type.c:160: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(kid->data, val_1, len_1); ^~~~~~ crypto/asymmetric_keys/asymmetric_type.c:161: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(kid->data + len_1, val_2, len_2); ^~~~~~ crypto/asymmetric_keys/asymmetric_type.c:161: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(kid->data + len_1, val_2, len_2); ^~~~~~ Suppressed 30 warnings (30 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. 9 warnings generated. Suppressed 9 warnings (9 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. 96 warnings generated. init/do_mounts.c:117:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(slash + 1, "PARTNROFF=%d%c", &offset, &c) != 1) ^~~~~~ init/do_mounts.c:117:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(slash + 1, "PARTNROFF=%d%c", &offset, &c) != 1) ^~~~~~ init/do_mounts.c:194:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(s, name); ^~~~~~ init/do_mounts.c:194:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(s, name); ^~~~~~ init/do_mounts.c:234:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2 || ^~~~~~ init/do_mounts.c:234:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2 || ^~~~~~ init/do_mounts.c:235:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset, &dummy) == 3) { ^~~~~~ init/do_mounts.c:235:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset, &dummy) == 3) { ^~~~~~ init/do_mounts.c:373:3: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(data_page, data, PAGE_SIZE); ^~~~~~~ init/do_mounts.c:373:3: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(data_page, data, PAGE_SIZE); ^~~~~~~ Suppressed 91 warnings (91 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 50 warnings generated. >> fs/erofs/xattr.c:329: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(it->buffer + processed, buf, len); ^~~~~~ fs/erofs/xattr.c:329: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(it->buffer + processed, buf, len); ^~~~~~ fs/erofs/xattr.c:517: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(it->buffer + it->buffer_ofs, prefix, prefix_len); ^~~~~~ fs/erofs/xattr.c:517: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(it->buffer + it->buffer_ofs, prefix, prefix_len); ^~~~~~ fs/erofs/xattr.c:528: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(it->buffer + it->buffer_ofs, buf, len); ^~~~~~ fs/erofs/xattr.c:528: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(it->buffer + it->buffer_ofs, buf, len); ^~~~~~ Suppressed 47 warnings (47 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. 52 warnings generated. >> fs/erofs/decompressor.c:175:3: 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(tmp, inpage + *inputmargin, page_copycnt); ^~~~~~ fs/erofs/decompressor.c:175:3: 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(tmp, inpage + *inputmargin, page_copycnt); ^~~~~~ >> fs/erofs/decompressor.c:255:4: 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(out + ret, 0, rq->outputsize - ret); ^~~~~~ fs/erofs/decompressor.c:255:4: 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(out + ret, 0, rq->outputsize - ret); ^~~~~~ fs/erofs/decompressor.c:340:3: 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(dst + rq->pageofs_out, src, righthalf); ^~~~~~ fs/erofs/decompressor.c:340:3: 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 + rq->pageofs_out, src, righthalf); ^~~~~~ >> fs/erofs/decompressor.c:347:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(src, src + righthalf, rq->pageofs_out); ^~~~~~~ fs/erofs/decompressor.c:347:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(src, src + righthalf, rq->pageofs_out); ^~~~~~~ fs/erofs/decompressor.c:350:4: 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(dst, src + righthalf, rq->pageofs_out); ^~~~~~ fs/erofs/decompressor.c:350:4: 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 + righthalf, rq->pageofs_out); ^~~~~~ Suppressed 47 warnings (47 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. 50 warnings generated. fs/udf/misc.c:73:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&ad[size], ad, iinfo->i_lenAlloc); ^~~~~~~ fs/udf/misc.c:73:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&ad[size], ad, iinfo->i_lenAlloc); ^~~~~~~ fs/udf/misc.c:107:5: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&ea[offset - aal + size], ^~~~~~~ fs/udf/misc.c:107:5: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&ea[offset - aal + size], ^~~~~~~ fs/udf/misc.c:117:5: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&ea[offset - ial + size], ^~~~~~~ fs/udf/misc.c:117:5: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&ea[offset - ial + size], ^~~~~~~ fs/udf/misc.c:128:5: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&ea[offset - aal + size], ^~~~~~~ fs/udf/misc.c:128:5: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&ea[offset - aal + size], ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 51 warnings generated. fs/udf/unicode.c:176: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(str_o, 0, str_max_len); ^~~~~~ fs/udf/unicode.c:176: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(str_o, 0, str_max_len); ^~~~~~ fs/udf/unicode.c:187: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(str_o, 0, str_max_len); ^~~~~~ fs/udf/unicode.c:187: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(str_o, 0, str_max_len); ^~~~~~ fs/udf/unicode.c:262:4: 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(&str_o[str_o_len], crc, len); ^~~~~~ fs/udf/unicode.c:262:4: 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(&str_o[str_o_len], crc, len); ^~~~~~ fs/udf/unicode.c:267:4: 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(&str_o[str_o_len], ext, ext_o_len); ^~~~~~ fs/udf/unicode.c:267:4: 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(&str_o[str_o_len], ext, ext_o_len); ^~~~~~ fs/udf/unicode.c:293: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(ocu, 0, ocu_max_len); ^~~~~~ fs/udf/unicode.c:293: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(ocu, 0, ocu_max_len); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 21 warnings generated. block/badblocks.c:68:3: warning: Value stored to 'sectors' is never read [clang-analyzer-deadcode.DeadStores] sectors = target - s; ^ ~~~~~~~~~~ block/badblocks.c:68:3: note: Value stored to 'sectors' is never read sectors = target - s; ^ ~~~~~~~~~~ block/badblocks.c:278:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(p + hi, p + hi + 1, ^~~~~~~ block/badblocks.c:278:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(p + hi, p + hi + 1, ^~~~~~~ block/badblocks.c:294:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(p + hi + 1, p + hi, ^~~~~~~ block/badblocks.c:294:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(p + hi + 1, p + hi, ^~~~~~~ block/badblocks.c:348:3: warning: Value stored to 'sectors' is never read [clang-analyzer-deadcode.DeadStores] sectors = target - s; -- 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 34 warnings generated. Suppressed 34 warnings (34 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. 36 warnings generated. Suppressed 36 warnings (34 in non-user code, 2 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 24 warnings generated. kernel/time/clockevents.c:680:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] count = snprintf(buf, PAGE_SIZE, "%s\n", td->evtdev->name); ^~~~~~~~ kernel/time/clockevents.c:680:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 count = snprintf(buf, PAGE_SIZE, "%s\n", td->evtdev->name); ^~~~~~~~ Suppressed 23 warnings (23 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 14 warnings generated. lib/zstd/compress/zstd_compress_literals.c:38:5: 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] ZSTD_memcpy(ostart + flSize, src, srcSize); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:38:5: 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 ZSTD_memcpy(ostart + flSize, src, srcSize); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:89:5: 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] ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:89:5: 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 ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:121:9: 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] ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:121:9: 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 ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:125:9: 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] ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_compress_literals.c:125:9: 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 ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ Suppressed 10 warnings (10 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. 56 warnings generated. fs/erofs/inode.c:50:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:50:3: note: Value stored to 'err' is never read err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:58:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:58:3: note: Value stored to 'err' is never read err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:74:5: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = -ENOMEM; ^ ~~~~~~~ fs/erofs/inode.c:74:5: note: Value stored to 'err' is never read err = -ENOMEM; ^ ~~~~~~~ >> fs/erofs/inode.c:77:4: 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(copied, dic, gotten); ^~~~~~ fs/erofs/inode.c:77:4: 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(copied, dic, gotten); ^~~~~~ fs/erofs/inode.c:87:4: 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((u8 *)copied + gotten, kaddr, *ofs); ^~~~~~ fs/erofs/inode.c:87:4: 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((u8 *)copied + gotten, kaddr, *ofs); ^~~~~~ fs/erofs/inode.c:172:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:172:3: note: Value stored to 'err' is never read err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:181:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:181:4: note: Value stored to 'err' is never read err = -EOPNOTSUPP; ^ ~~~~~~~~~~~ fs/erofs/inode.c:206:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = -EFSCORRUPTED; ^ ~~~~~~~~~~~~~ fs/erofs/inode.c:206:2: note: Value stored to 'err' is never read err = -EFSCORRUPTED; ^ ~~~~~~~~~~~~~ fs/erofs/inode.c:241: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(lnk, kaddr + m_pofs, inode->i_size); ^~~~~~ fs/erofs/inode.c:241: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(lnk, kaddr + m_pofs, inode->i_size); ^~~~~~ Suppressed 47 warnings (47 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. 8 warnings generated. lib/crypto/chacha.c:81: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(x, state, 64); ^~~~~~ lib/crypto/chacha.c:81: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(x, state, 64); ^~~~~~ lib/crypto/chacha.c:107: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(x, state, 64); ^~~~~~ lib/crypto/chacha.c:107: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(x, state, 64); ^~~~~~ lib/crypto/chacha.c:111: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(&stream[0], &x[0], 16); ^~~~~~ lib/crypto/chacha.c:111: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(&stream[0], &x[0], 16); ^~~~~~ lib/crypto/chacha.c:112: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(&stream[4], &x[12], 16); ^~~~~~ lib/crypto/chacha.c:112: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(&stream[4], &x[12], 16); ^~~~~~ Suppressed 4 warnings (4 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 19 warnings generated. Suppressed 19 warnings (19 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. 57 warnings generated. crypto/aegis128-core.c:189:4: 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(dst, tmp.bytes, AEGIS_BLOCK_SIZE); ^~~~~~ crypto/aegis128-core.c:189:4: 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, tmp.bytes, AEGIS_BLOCK_SIZE); ^~~~~~ crypto/aegis128-core.c:199:3: 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(msg.bytes, src, size); ^~~~~~ crypto/aegis128-core.c:199:3: 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(msg.bytes, src, size); ^~~~~~ crypto/aegis128-core.c:210:3: 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(dst, msg.bytes, size); ^~~~~~ crypto/aegis128-core.c:210:3: 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, msg.bytes, size); ^~~~~~ crypto/aegis128-core.c:250:4: 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(dst, tmp.bytes, AEGIS_BLOCK_SIZE); ^~~~~~ crypto/aegis128-core.c:250:4: 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, tmp.bytes, AEGIS_BLOCK_SIZE); ^~~~~~ crypto/aegis128-core.c:260:3: 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(msg.bytes, src, size); ^~~~~~ crypto/aegis128-core.c:260:3: 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(msg.bytes, src, size); ^~~~~~ crypto/aegis128-core.c:268: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(msg.bytes + size, 0, AEGIS_BLOCK_SIZE - size); ^~~~~~ crypto/aegis128-core.c:268: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(msg.bytes + size, 0, AEGIS_BLOCK_SIZE - size); ^~~~~~ crypto/aegis128-core.c:272:3: 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(dst, msg.bytes, size); ^~~~~~ crypto/aegis128-core.c:272:3: 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, msg.bytes, size); ^~~~~~ crypto/aegis128-core.c:295:5: 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(buf.bytes + pos, src, fill); ^~~~~~ crypto/aegis128-core.c:295:5: 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(buf.bytes + pos, src, fill); ^~~~~~ crypto/aegis128-core.c:307:3: 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(buf.bytes + pos, src, left); ^~~~~~ crypto/aegis128-core.c:307:3: 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(buf.bytes + pos, src, left); ^~~~~~ crypto/aegis128-core.c:317: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(buf.bytes + pos, 0, AEGIS_BLOCK_SIZE - pos); ^~~~~~ crypto/aegis128-core.c:317: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(buf.bytes + pos, 0, AEGIS_BLOCK_SIZE - pos); ^~~~~~ crypto/aegis128-core.c:374: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(ctx->key.bytes, key, AEGIS128_KEY_SIZE); ^~~~~~ crypto/aegis128-core.c:374: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(ctx->key.bytes, key, AEGIS128_KEY_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 20 warnings generated. >> arch/riscv/kernel/cpufeature.c:135: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(print_str, 0, sizeof(print_str)); ^~~~~~ arch/riscv/kernel/cpufeature.c:135: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(print_str, 0, sizeof(print_str)); ^~~~~~ arch/riscv/kernel/cpufeature.c:141: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(print_str, 0, sizeof(print_str)); ^~~~~~ arch/riscv/kernel/cpufeature.c:141: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(print_str, 0, sizeof(print_str)); ^~~~~~ Suppressed 18 warnings (18 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. 34 warnings generated. Suppressed 34 warnings (34 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. 36 warnings generated. >> arch/riscv/kernel/process.c:130: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(childregs, 0, sizeof(struct pt_regs)); ^~~~~~ arch/riscv/kernel/process.c:130: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(childregs, 0, sizeof(struct pt_regs)); ^~~~~~ Suppressed 35 warnings (35 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. 51 warnings generated. Suppressed 51 warnings (51 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. 10 warnings generated. Suppressed 10 warnings (10 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. 35 warnings generated. Suppressed 35 warnings (35 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. 12 warnings generated. Suppressed 12 warnings (12 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. 30 warnings generated. Suppressed 30 warnings (30 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. 48 warnings generated. crypto/asymmetric_keys/public_key.c:79:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/asymmetric_keys/public_key.c:79:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/asymmetric_keys/public_key.c:83:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/asymmetric_keys/public_key.c:83:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/asymmetric_keys/public_key.c:91:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(alg_name, pkey->pkey_algo); ^~~~~~ crypto/asymmetric_keys/public_key.c:91:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(alg_name, pkey->pkey_algo); ^~~~~~ crypto/asymmetric_keys/public_key.c:100: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(dst, &val, sizeof(val)); ^~~~~~ crypto/asymmetric_keys/public_key.c:100: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, &val, sizeof(val)); ^~~~~~ crypto/asymmetric_keys/public_key.c:131: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(key, pkey->key, pkey->keylen); ^~~~~~ crypto/asymmetric_keys/public_key.c:131: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(key, pkey->key, pkey->keylen); ^~~~~~ crypto/asymmetric_keys/public_key.c:135: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(ptr, pkey->params, pkey->paramlen); ^~~~~~ crypto/asymmetric_keys/public_key.c:135: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(ptr, pkey->params, pkey->paramlen); ^~~~~~ crypto/asymmetric_keys/public_key.c:202: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(key, pkey->key, pkey->keylen); ^~~~~~ crypto/asymmetric_keys/public_key.c:202: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(key, pkey->key, pkey->keylen); ^~~~~~ crypto/asymmetric_keys/public_key.c:206: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(ptr, pkey->params, pkey->paramlen); ^~~~~~ crypto/asymmetric_keys/public_key.c:206: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(ptr, pkey->params, pkey->paramlen); ^~~~~~ crypto/asymmetric_keys/public_key.c:348: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(key, pkey->key, pkey->keylen); ^~~~~~ crypto/asymmetric_keys/public_key.c:348: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(key, pkey->key, pkey->keylen); ^~~~~~ crypto/asymmetric_keys/public_key.c:352: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(ptr, pkey->params, pkey->paramlen); ^~~~~~ crypto/asymmetric_keys/public_key.c:352: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(ptr, pkey->params, pkey->paramlen); ^~~~~~ Suppressed 38 warnings (38 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. 72 warnings generated. crypto/authencesn.c:424:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/authencesn.c:424:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/authencesn.c:429:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/authencesn.c:429:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ Suppressed 70 warnings (70 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 15 warnings generated. crypto/crypto_engine.c:534:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(engine->name, sizeof(engine->name), ^~~~~~~~ crypto/crypto_engine.c:534:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(engine->name, sizeof(engine->name), ^~~~~~~~ crypto/crypto_engine.c:545: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] kthread_init_work(&engine->pump_requests, crypto_pump_work); ^ include/linux/kthread.h:195:3: note: expanded from macro 'kthread_init_work' memset((work), 0, sizeof(struct kthread_work)); \ ^~~~~~ crypto/crypto_engine.c:545: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 kthread_init_work(&engine->pump_requests, crypto_pump_work); ^ include/linux/kthread.h:195:3: note: expanded from macro 'kthread_init_work' memset((work), 0, sizeof(struct kthread_work)); \ ^~~~~~ Suppressed 13 warnings (13 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. 34 warnings generated. >> mm/kmemleak.c:610:3: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(object->comm, "hardirq", sizeof(object->comm)); ^~~~~~~ mm/kmemleak.c:610:3: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(object->comm, "hardirq", sizeof(object->comm)); ^~~~~~~ mm/kmemleak.c:613:3: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(object->comm, "softirq", sizeof(object->comm)); ^~~~~~~ mm/kmemleak.c:613:3: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(object->comm, "softirq", sizeof(object->comm)); ^~~~~~~ mm/kmemleak.c:622:3: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(object->comm, current->comm, sizeof(object->comm)); ^~~~~~~ mm/kmemleak.c:622:3: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(object->comm, current->comm, sizeof(object->comm)); ^~~~~~~ Suppressed 31 warnings (31 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. 34 warnings generated. >> lib/test_meminit.c:55: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(&p[i], GARBAGE_BYTE, size); ^~~~~~ lib/test_meminit.c:55: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(&p[i], GARBAGE_BYTE, size); ^~~~~~ >> lib/test_meminit.c:245:4: 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(buf_copy, buf, size); ^~~~~~ lib/test_meminit.c:245:4: 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(buf_copy, buf, size); ^~~~~~ lib/test_meminit.c:292: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(buf_contents, buf, size); ^~~~~~ lib/test_meminit.c:292: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(buf_contents, buf, size); ^~~~~~ Suppressed 31 warnings (31 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. 12 warnings generated. Suppressed 12 warnings (12 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. 2 warnings generated. Suppressed 2 warnings (2 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. 2 warnings generated. Suppressed 2 warnings (2 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. 2 warnings generated. Suppressed 2 warnings (2 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. 34 warnings generated. Suppressed 34 warnings (34 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. 10 warnings generated. Suppressed 10 warnings (10 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. 31 warnings generated. Suppressed 31 warnings (31 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. >> arch/riscv/kernel/crash_dump.c:42:3: 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(buf, vaddr + offset, csize); ^~~~~~ arch/riscv/kernel/crash_dump.c:42:3: 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(buf, vaddr + offset, csize); ^~~~~~ Suppressed 34 warnings (34 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. 36 warnings generated. arch/riscv/kernel/efi.c:67:3: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores] val = pte_val(pte) & ~_PAGE_WRITE; ^ arch/riscv/kernel/efi.c:67:3: note: Value stored to 'val' is never read Suppressed 35 warnings (35 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. 50 warnings generated. >> arch/riscv/mm/init.c:506: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(nextp, 0, PAGE_SIZE); ^~~~~~ arch/riscv/mm/init.c:506: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(nextp, 0, PAGE_SIZE); ^~~~~~ Suppressed 49 warnings (46 in non-user code, 3 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 14 warnings generated. Suppressed 14 warnings (14 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 2 warnings generated. Suppressed 2 warnings (2 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. 31 warnings generated. Suppressed 31 warnings (31 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. 12 warnings generated. Suppressed 12 warnings (12 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. 38 warnings generated. lib/string_helpers.c:112:12: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] remainder += rounding[j]; ^ ~~~~~~~~~~~ lib/string_helpers.c:60:6: note: Assuming 'blk_size' is not equal to 0 if (blk_size == 0) ^~~~~~~~~~~~~ lib/string_helpers.c:60:2: note: Taking false branch if (blk_size == 0) ^ lib/string_helpers.c:62:6: note: Assuming 'size' is not equal to 0 if (size == 0) ^~~~~~~~~ lib/string_helpers.c:62:2: note: Taking false branch if (size == 0) ^ lib/string_helpers.c:76:2: note: Loop condition is false. Execution continues on line 81 while (blk_size >> 32) { ^ lib/string_helpers.c:81:2: note: Loop condition is false. Execution continues on line 88 while (size >> 32) { ^ lib/string_helpers.c:91:2: note: Loop condition is false. Execution continues on line 98 while (size >= divisor[units]) { ^ lib/string_helpers.c:99:14: note: Assuming the condition is true for (j = 0; sf_cap*10 < 1000; j++) ^~~~~~~~~~~~~~~~ lib/string_helpers.c:99:2: note: Loop condition is true. Entering loop body for (j = 0; sf_cap*10 < 1000; j++) ^ lib/string_helpers.c:99:14: note: Assuming the condition is true for (j = 0; sf_cap*10 < 1000; j++) ^~~~~~~~~~~~~~~~ lib/string_helpers.c:99:2: note: Loop condition is true. Entering loop body for (j = 0; sf_cap*10 < 1000; j++) ^ lib/string_helpers.c:99:14: note: Assuming the condition is true for (j = 0; sf_cap*10 < 1000; j++) ^~~~~~~~~~~~~~~~ lib/string_helpers.c:99:2: note: Loop condition is true. Entering loop body for (j = 0; sf_cap*10 < 1000; j++) ^ lib/string_helpers.c:99:32: note: The value 3 is assigned to 'j' for (j = 0; sf_cap*10 < 1000; j++) ^~~ lib/string_helpers.c:99:14: note: Assuming the condition is false for (j = 0; sf_cap*10 < 1000; j++) ^~~~~~~~~~~~~~~~ lib/string_helpers.c:99:2: note: Loop condition is false. Execution continues on line 102 for (j = 0; sf_cap*10 < 1000; j++) ^ lib/string_helpers.c:102:6: note: Assuming 'units' is not equal to STRING_UNITS_2 if (units == STRING_UNITS_2) { ^~~~~~~~~~~~~~~~~~~~~~~ lib/string_helpers.c:102:2: note: Taking false branch if (units == STRING_UNITS_2) { -- 60 warnings generated. block/partitions/core.c:140:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(state->name, BDEVNAME_SIZE, "%s", hd->disk_name); ^~~~~~~~ block/partitions/core.c:140:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(state->name, BDEVNAME_SIZE, "%s", hd->disk_name); ^~~~~~~~ block/partitions/core.c:141:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name); ^~~~~~~~ block/partitions/core.c:141:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name); ^~~~~~~~ block/partitions/core.c:143:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(state->name, "p"); ^~~~~~~ block/partitions/core.c:143:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(state->name, "p"); ^~~~~~~ block/partitions/core.c:147: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(state->parts, 0, state->limit * sizeof(state->parts[0])); ^~~~~~ block/partitions/core.c:147: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(state->parts, 0, state->limit * sizeof(state->parts[0])); ^~~~~~ block/partitions/core.c:186:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", dev_to_bdev(dev)->bd_partno); ^~~~~~~ block/partitions/core.c:186:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", dev_to_bdev(dev)->bd_partno); ^~~~~~~ block/partitions/core.c:192:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%llu\n", dev_to_bdev(dev)->bd_start_sect); ^~~~~~~ block/partitions/core.c:192:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%llu\n", dev_to_bdev(dev)->bd_start_sect); ^~~~~~~ block/partitions/core.c:198:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", bdev_read_only(dev_to_bdev(dev))); ^~~~~~~ block/partitions/core.c:198:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", bdev_read_only(dev_to_bdev(dev))); ^~~~~~~ block/partitions/core.c:206:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ block/partitions/core.c:206:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ block/partitions/core.c:216:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ block/partitions/core.c:216:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ Suppressed 51 warnings (51 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. 49 warnings generated. include/asm-generic/unaligned.h:32:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn] return le32_to_cpu(__get_unaligned_t(__le32, p)); ^ lib/crypto/chacha20poly1305.c:183:2: note: Calling 'chacha_init' chacha_init(chacha_state, k, (u8 *)iv); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/crypto/chacha.h:85:2: note: Taking false branch if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA)) ^ include/crypto/chacha.h:88:3: note: Calling 'chacha_init_generic' chacha_init_generic(state, key, iv); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/crypto/chacha.h:78:14: note: Calling 'get_unaligned_le32' state[13] = get_unaligned_le32(iv + 4); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/unaligned.h:32:2: note: Undefined or garbage value returned to caller return le32_to_cpu(__get_unaligned_t(__le32, p)); ^ lib/crypto/chacha20poly1305.c:41: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(iv, 0, 8); ^~~~~~ lib/crypto/chacha20poly1305.c:41: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(iv, 0, 8); ^~~~~~ lib/crypto/chacha20poly1305.c:42: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(iv + 8, nonce + 16, 8); ^~~~~~ lib/crypto/chacha20poly1305.c:42: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(iv + 8, nonce + 16, 8); ^~~~~~ Suppressed 46 warnings (46 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. 13 warnings generated. Suppressed 13 warnings (13 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. 12 warnings generated. Suppressed 12 warnings (12 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. 47 warnings generated. Suppressed 47 warnings (47 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. 50 warnings generated. >> block/blk-mq-debugfs.c:751:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "cpu%u", ctx->cpu); ^~~~~~~~ block/blk-mq-debugfs.c:751:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "cpu%u", ctx->cpu); ^~~~~~~~ block/blk-mq-debugfs.c:764:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); ^~~~~~~~ block/blk-mq-debugfs.c:764:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); ^~~~~~~~ Suppressed 48 warnings (48 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. 47 warnings generated. Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 30 warnings generated. Suppressed 30 warnings (30 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. 86 warnings generated. fs/file.c:61: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(nfdt->open_fds, ofdt->open_fds, cpy); ^~~~~~ fs/file.c:61: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(nfdt->open_fds, ofdt->open_fds, cpy); ^~~~~~ fs/file.c:62: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((char *)nfdt->open_fds + cpy, 0, set); ^~~~~~ fs/file.c:62: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((char *)nfdt->open_fds + cpy, 0, set); ^~~~~~ fs/file.c:63: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(nfdt->close_on_exec, ofdt->close_on_exec, cpy); ^~~~~~ fs/file.c:63: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(nfdt->close_on_exec, ofdt->close_on_exec, cpy); ^~~~~~ fs/file.c:64: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((char *)nfdt->close_on_exec + cpy, 0, set); ^~~~~~ fs/file.c:64: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((char *)nfdt->close_on_exec + cpy, 0, set); ^~~~~~ fs/file.c:68: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(nfdt->full_fds_bits, ofdt->full_fds_bits, cpy); ^~~~~~ fs/file.c:68: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(nfdt->full_fds_bits, ofdt->full_fds_bits, cpy); ^~~~~~ fs/file.c:69: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((char *)nfdt->full_fds_bits + cpy, 0, set); ^~~~~~ fs/file.c:69: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((char *)nfdt->full_fds_bits + cpy, 0, set); ^~~~~~ fs/file.c:84: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(nfdt->fd, ofdt->fd, cpy); ^~~~~~ fs/file.c:84: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(nfdt->fd, ofdt->fd, cpy); ^~~~~~ fs/file.c:85: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((char *)nfdt->fd + cpy, 0, set); ^~~~~~ fs/file.c:85: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((char *)nfdt->fd + cpy, 0, set); ^~~~~~ fs/file.c:371: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(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); ^~~~~~ fs/file.c:371: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(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); ^~~~~~ include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << fls_long(n - 1); ^ fs/file.c:296:6: note: Assuming 'newf' is non-null if (!newf) ^~~~~ fs/file.c:296:2: note: Taking false branch if (!newf) ^ fs/file.c:301:2: note: Loop condition is false. Exiting loop spin_lock_init(&newf->file_lock); ^ include/linux/spinlock.h:329:35: note: expanded from macro 'spin_lock_init' # define spin_lock_init(lock) \ ^ fs/file.c:303:2: note: Loop condition is false. Exiting loop init_waitqueue_head(&newf->resize_wait); ^ include/linux/wait.h:67:2: note: expanded from macro 'init_waitqueue_head' do { \ ^ fs/file.c:313:12: note: Left side of '||' is false old_fdt = files_fdtable(oldf); -- ^~~~~~ lib/bitmap.c:222:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(dst, src, len * sizeof(*dst)); ^~~~~~~ lib/bitmap.c:222:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(dst, src, len * sizeof(*dst)); ^~~~~~~ Suppressed 31 warnings (31 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. 54 warnings generated. include/linux/scatterlist.h:76:9: warning: Access to field 'page_link' results in a dereference of a null pointer (loaded from variable 'sg') [clang-analyzer-core.NullDereference] return sg->page_link & SG_PAGE_LINK_MASK; ^ lib/scatterlist.c:103:27: note: 'ret' initialized to a null pointer value struct scatterlist *sg, *ret = NULL; ^~~ lib/scatterlist.c:106:30: note: Assuming 'i' is >= 'nents' for_each_sg(sgl, sg, nents, i) ^ include/linux/scatterlist.h:169:31: note: expanded from macro 'for_each_sg' for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg)) ^~~~~~~~~~ lib/scatterlist.c:106:2: note: Loop condition is false. Execution continues on line 109 for_each_sg(sgl, sg, nents, i) ^ include/linux/scatterlist.h:169:2: note: expanded from macro 'for_each_sg' for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg)) ^ lib/scatterlist.c:109:21: note: Passing null pointer value via 1st parameter 'sg' BUG_ON(!sg_is_last(ret)); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ lib/scatterlist.c:109:10: note: Calling 'sg_is_last' BUG_ON(!sg_is_last(ret)); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/scatterlist.h:91:20: note: Passing null pointer value via 1st parameter 'sg' return __sg_flags(sg) & SG_END; ^~ include/linux/scatterlist.h:91:9: note: Calling '__sg_flags' return __sg_flags(sg) & SG_END; ^~~~~~~~~~~~~~ include/linux/scatterlist.h:76:9: note: Access to field 'page_link' results in a dereference of a null pointer (loaded from variable 'sg') return sg->page_link & SG_PAGE_LINK_MASK; ^~ lib/scatterlist.c:126: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(sgl, 0, sizeof(*sgl) * nents); ^~~~~~ lib/scatterlist.c:126: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(sgl, 0, sizeof(*sgl) * nents); ^~~~~~ lib/scatterlist.c:292: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(table, 0, sizeof(*table)); ^~~~~~ lib/scatterlist.c:292: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(table, 0, sizeof(*table)); ^~~~~~ lib/scatterlist.c:579: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(sgt, &append.sgt, sizeof(*sgt)); ^~~~~~ lib/scatterlist.c:579: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(sgt, &append.sgt, sizeof(*sgt)); ^~~~~~ lib/scatterlist.c:789: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(miter, 0, sizeof(struct sg_mapping_iter)); ^~~~~~ lib/scatterlist.c:789: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(miter, 0, sizeof(struct sg_mapping_iter)); ^~~~~~ lib/scatterlist.c:971:4: 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(buf + offset, miter.addr, len); ^~~~~~ lib/scatterlist.c:971:4: 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(buf + offset, miter.addr, len); ^~~~~~ lib/scatterlist.c:973:4: 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(miter.addr, buf + offset, len); ^~~~~~ lib/scatterlist.c:973:4: 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(miter.addr, buf + offset, len); ^~~~~~ lib/scatterlist.c:1079: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(miter.addr, 0, len); ^~~~~~ lib/scatterlist.c:1079: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(miter.addr, 0, len); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. >> arch/riscv/kvm/mmu.c:352: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(&pcache, 0, sizeof(pcache)); ^~~~~~ arch/riscv/kvm/mmu.c:352: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(&pcache, 0, sizeof(pcache)); ^~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. >> arch/riscv/kvm/vcpu.c:68: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(csr, reset_csr, sizeof(*csr)); ^~~~~~ arch/riscv/kvm/vcpu.c:68: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(csr, reset_csr, sizeof(*csr)); ^~~~~~ arch/riscv/kvm/vcpu.c:70: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(cntx, reset_cntx, sizeof(*cntx)); ^~~~~~ arch/riscv/kvm/vcpu.c:70: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(cntx, reset_cntx, sizeof(*cntx)); ^~~~~~ Suppressed 34 warnings (34 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. 35 warnings generated. >> arch/riscv/kvm/vcpu_exit.c:287:3: 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(run->mmio.data, data_buf, len); ^~~~~~ arch/riscv/kvm/vcpu_exit.c:287:3: 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(run->mmio.data, data_buf, len); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 49 warnings generated. fs/udf/file.c:53: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(kaddr, iinfo->i_data + iinfo->i_lenEAttr, isize); ^~~~~~ fs/udf/file.c:53: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(kaddr, iinfo->i_data + iinfo->i_lenEAttr, isize); ^~~~~~ fs/udf/file.c:54: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(kaddr + isize, 0, PAGE_SIZE - isize); ^~~~~~ fs/udf/file.c:54: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(kaddr + isize, 0, PAGE_SIZE - isize); ^~~~~~ fs/udf/file.c:79: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(iinfo->i_data + iinfo->i_lenEAttr, kaddr, i_size_read(inode)); ^~~~~~ fs/udf/file.c:79: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(iinfo->i_data + iinfo->i_lenEAttr, kaddr, i_size_read(inode)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. fs/udf/inode.c:103:3: 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(pos, &iinfo->cached_extent.epos, ^~~~~~ fs/udf/inode.c:103:3: 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(pos, &iinfo->cached_extent.epos, ^~~~~~ fs/udf/inode.c:124: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(&iinfo->cached_extent.epos, pos, sizeof(*pos)); ^~~~~~ fs/udf/inode.c:124: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(&iinfo->cached_extent.epos, pos, sizeof(*pos)); ^~~~~~ fs/udf/inode.c:286: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 + iinfo->i_lenAlloc, 0x00, ^~~~~~ fs/udf/inode.c:286: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 + iinfo->i_lenAlloc, 0x00, ^~~~~~ fs/udf/inode.c:288:3: 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(kaddr, iinfo->i_data + iinfo->i_lenEAttr, ^~~~~~ fs/udf/inode.c:288:3: 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(kaddr, iinfo->i_data + iinfo->i_lenEAttr, ^~~~~~ fs/udf/inode.c:295: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(iinfo->i_data + iinfo->i_lenEAttr, 0x00, ^~~~~~ fs/udf/inode.c:295: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(iinfo->i_data + iinfo->i_lenEAttr, 0x00, ^~~~~~ fs/udf/inode.c:313:3: 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(iinfo->i_data + iinfo->i_lenEAttr, kaddr, inode->i_size); ^~~~~~ fs/udf/inode.c:313:3: 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(iinfo->i_data + iinfo->i_lenEAttr, kaddr, inode->i_size); ^~~~~~ fs/udf/inode.c:368: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(dbh->b_data, 0x00, inode->i_sb->s_blocksize); ^~~~~~ fs/udf/inode.c:368: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(dbh->b_data, 0x00, inode->i_sb->s_blocksize); ^~~~~~ fs/udf/inode.c:400: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(iinfo->i_data + iinfo->i_lenEAttr, 0, iinfo->i_lenAlloc); ^~~~~~ fs/udf/inode.c:400: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(iinfo->i_data + iinfo->i_lenEAttr, 0, iinfo->i_lenAlloc); ^~~~~~ fs/udf/inode.c:468:4: 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(bh->b_data, 0x00, inode->i_sb->s_blocksize); ^~~~~~ fs/udf/inode.c:468:4: 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(bh->b_data, 0x00, inode->i_sb->s_blocksize); ^~~~~~ fs/udf/inode.c:790:4: 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(&laarr[0].extLocation, 0x00, ^~~~~~ fs/udf/inode.c:790:4: 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(&laarr[0].extLocation, 0x00, ^~~~~~ fs/udf/inode.c:817:4: 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(&laarr[c].extLocation, 0x00, ^~~~~~ fs/udf/inode.c:817:4: 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(&laarr[c].extLocation, 0x00, -- ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:717:5: 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 ZSTD_memcpy(op, dt+val, 2); ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:726:5: 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] ZSTD_memcpy(op, dt+val, 1); ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:726:5: 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 ZSTD_memcpy(op, dt+val, 1); ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:1113:32: 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] if (cSrcSize == dstSize) { ZSTD_memcpy(dst, cSrc, dstSize); return dstSize; } /* not compressed */ ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:1113:32: 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 if (cSrcSize == dstSize) { ZSTD_memcpy(dst, cSrc, dstSize); return dstSize; } /* not compressed */ ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:1114:26: 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] if (cSrcSize == 1) { ZSTD_memset(dst, *(const BYTE*)cSrc, dstSize); return dstSize; } /* RLE */ ^ lib/zstd/decompress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:1114:26: 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 if (cSrcSize == 1) { ZSTD_memset(dst, *(const BYTE*)cSrc, dstSize); return dstSize; } /* RLE */ ^ lib/zstd/decompress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ Suppressed 1 warnings (1 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. 21 warnings generated. lib/crypto/blake2s-generic.c:56:3: 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(m, block, BLAKE2S_BLOCK_SIZE); ^~~~~~ lib/crypto/blake2s-generic.c:56:3: 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(m, block, BLAKE2S_BLOCK_SIZE); ^~~~~~ lib/crypto/blake2s-generic.c:58:3: 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(v, state->h, 32); ^~~~~~ lib/crypto/blake2s-generic.c:58:3: 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(v, state->h, 32); ^~~~~~ Suppressed 19 warnings (19 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. 40 warnings generated. lib/mpi/mpicoder.c:290:3: 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(p, (u8 *)&alimb + lzeros, BYTES_PER_MPI_LIMB - lzeros); ^~~~~~ lib/mpi/mpicoder.c:290:3: 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(p, (u8 *)&alimb + lzeros, BYTES_PER_MPI_LIMB - lzeros); ^~~~~~ lib/mpi/mpicoder.c:387: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(p2, 0, i); ^~~~~~ lib/mpi/mpicoder.c:387: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(p2, 0, i); ^~~~~~ lib/mpi/mpicoder.c:615:4: 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(s, tmp, n-!!extra); ^~~~~~ lib/mpi/mpicoder.c:615:4: 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(s, tmp, n-!!extra); ^~~~~~ lib/mpi/mpicoder.c:636:4: 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(buffer, tmp, n); ^~~~~~ lib/mpi/mpicoder.c:636:4: 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(buffer, tmp, n); ^~~~~~ lib/mpi/mpicoder.c:661:4: 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(s+2, tmp, n); ^~~~~~ lib/mpi/mpicoder.c:661:4: 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(s+2, tmp, n); ^~~~~~ lib/mpi/mpicoder.c:703:4: 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(s, tmp, n-!!extra); ^~~~~~ lib/mpi/mpicoder.c:703:4: 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(s, tmp, n-!!extra); ^~~~~~ Suppressed 34 warnings (34 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. 47 warnings generated. >> fs/freevxfs/vxfs_inode.c:127: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(&vip->vii_org, &dip->vdi_org, sizeof(vip->vii_org)); ^~~~~~ fs/freevxfs/vxfs_inode.c:127: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(&vip->vii_org, &dip->vdi_org, sizeof(vip->vii_org)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 31 warnings generated. fs/exportfs/expfs.c:260:3: 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(buf->name, name, len); ^~~~~~ fs/exportfs/expfs.c:260:3: 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(buf->name, name, len); ^~~~~~ Suppressed 30 warnings (30 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. 13 warnings generated. fs/nls/nls_base.c:227:10: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] *op++ = (u8) u; ~~~~~~^~~~~~~~ fs/nls/nls_base.c:194:9: note: Assuming 'inlen' is > 0 while (inlen > 0 && maxout > 0) { ^~~~~~~~~ fs/nls/nls_base.c:194:9: note: Left side of '&&' is true fs/nls/nls_base.c:194:22: note: Assuming 'maxout' is > 0 while (inlen > 0 && maxout > 0) { ^~~~~~~~~~ fs/nls/nls_base.c:194:2: note: Loop condition is true. Entering loop body while (inlen > 0 && maxout > 0) { ^ fs/nls/nls_base.c:195:7: note: Calling 'get_utf16' u = get_utf16(*pwcs, endian); ^~~~~~~~~~~~~~~~~~~~~~~~ fs/nls/nls_base.c:176:2: note: Control jumps to the 'default' case at line 177 switch (endian) { ^ fs/nls/nls_base.c:178:3: note: Returning value (loaded from 'c'), which participates in a condition later return c; ^~~~~~~~ fs/nls/nls_base.c:195:7: note: Returning from 'get_utf16' u = get_utf16(*pwcs, endian); ^~~~~~~~~~~~~~~~~~~~~~~~ fs/nls/nls_base.c:196:7: note: Assuming 'u' is not equal to 0 if (!u) ^~ fs/nls/nls_base.c:196:3: note: Taking false branch if (!u) ^ fs/nls/nls_base.c:200:7: note: Assuming 'u' is > 127 if (u > 0x7f) { ^~~~~~~~ fs/nls/nls_base.c:200:3: note: Taking true branch if (u > 0x7f) { ^ fs/nls/nls_base.c:201:8: note: Assuming the condition is false if ((u & SURROGATE_MASK) == SURROGATE_PAIR) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/nls/nls_base.c:201:4: note: Taking false branch if ((u & SURROGATE_MASK) == SURROGATE_PAIR) { ^ fs/nls/nls_base.c:220:4: note: Taking false branch if (size == -1) { ^ fs/nls/nls_base.c:194:9: note: Assuming 'inlen' is > 0 while (inlen > 0 && maxout > 0) { ^~~~~~~~~ fs/nls/nls_base.c:194:9: note: Left side of '&&' is true fs/nls/nls_base.c:194:22: note: 'maxout' is > 0 while (inlen > 0 && maxout > 0) { ^~~~~~ fs/nls/nls_base.c:194:2: note: Loop condition is true. Entering loop body while (inlen > 0 && maxout > 0) { ^ fs/nls/nls_base.c:195:7: note: Calling 'get_utf16' u = get_utf16(*pwcs, endian); ^~~~~~~~~~~~~~~~~~~~~~~~ fs/nls/nls_base.c:176:2: note: Control jumps to the 'default' case at line 177 switch (endian) { ^ fs/nls/nls_base.c:178:3: note: Returning value (loaded from 'c'), which participates in a condition later return c; ^~~~~~~~ fs/nls/nls_base.c:195:7: note: Returning from 'get_utf16' u = get_utf16(*pwcs, endian); ^~~~~~~~~~~~~~~~~~~~~~~~ fs/nls/nls_base.c:196:7: note: Assuming 'u' is not equal to 0 if (!u) ^~ -- 47 warnings generated. crypto/scatterwalk.c:23: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(dst, src, nbytes); ^~~~~~ crypto/scatterwalk.c:23: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, nbytes); ^~~~~~ Suppressed 46 warnings (46 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. 16 warnings generated. lib/xz/xz_dec_bcj.c:404: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(b->out + b->out_pos, s->temp.buf, copy_size); ^~~~~~ lib/xz/xz_dec_bcj.c:404: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(b->out + b->out_pos, s->temp.buf, copy_size); ^~~~~~ lib/xz/xz_dec_bcj.c:409:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size); ^~~~~~~ lib/xz/xz_dec_bcj.c:409:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size); ^~~~~~~ lib/xz/xz_dec_bcj.c:451:3: 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(b->out + b->out_pos, s->temp.buf, s->temp.size); ^~~~~~ lib/xz/xz_dec_bcj.c:451:3: 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(b->out + b->out_pos, s->temp.buf, s->temp.size); ^~~~~~ lib/xz/xz_dec_bcj.c:471:3: 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(s->temp.buf, b->out + b->out_pos, s->temp.size); ^~~~~~ lib/xz/xz_dec_bcj.c:471:3: 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(s->temp.buf, b->out + b->out_pos, s->temp.size); ^~~~~~ Suppressed 12 warnings (12 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. 30 warnings generated. Suppressed 30 warnings (30 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. 13 warnings generated. Suppressed 13 warnings (13 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. 33 warnings generated. lib/seq_buf.c:64:9: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); ^~~~~~~~~ lib/seq_buf.c:64:9: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); ^~~~~~~~~ lib/seq_buf.c:152:3: 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(s->buffer + s->len, str, len); ^~~~~~ lib/seq_buf.c:152:3: 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(s->buffer + s->len, str, len); ^~~~~~ lib/seq_buf.c:199:3: 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(s->buffer + s->len, mem, len); ^~~~~~ lib/seq_buf.c:199:3: 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(s->buffer + s->len, mem, len); ^~~~~~ Suppressed 30 warnings (30 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. 4 warnings generated. Suppressed 4 warnings (4 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. 31 warnings generated. Suppressed 31 warnings (31 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. 2 warnings generated. Suppressed 2 warnings (2 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. 35 warnings generated. lib/dump_stack.c:35:2: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] vsnprintf(dump_stack_arch_desc_str, sizeof(dump_stack_arch_desc_str), ^~~~~~~~~ lib/dump_stack.c:35:2: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 vsnprintf(dump_stack_arch_desc_str, sizeof(dump_stack_arch_desc_str), ^~~~~~~~~ Suppressed 34 warnings (34 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. 4 warnings generated. Suppressed 4 warnings (4 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. 47 warnings generated. Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. >> fs/efs/symlink.c:32: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(link, bh->b_data, (size > EFS_BLOCKSIZE) ? EFS_BLOCKSIZE : size); ^~~~~~ fs/efs/symlink.c:32: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(link, bh->b_data, (size > EFS_BLOCKSIZE) ? EFS_BLOCKSIZE : size); ^~~~~~ fs/efs/symlink.c:38:3: 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(link + EFS_BLOCKSIZE, bh->b_data, size - EFS_BLOCKSIZE); ^~~~~~ fs/efs/symlink.c:38:3: 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(link + EFS_BLOCKSIZE, bh->b_data, size - EFS_BLOCKSIZE); ^~~~~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 47 warnings generated. Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 12 warnings generated. Suppressed 12 warnings (12 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. 34 warnings generated. Suppressed 34 warnings (34 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. 66 warnings generated. kernel/cred.c:267: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(new, old, sizeof(struct cred)); ^~~~~~ kernel/cred.c:267: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(new, old, sizeof(struct cred)); ^~~~~~ Suppressed 65 warnings (65 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. 48 warnings generated. kernel/reboot.c:721:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", val); ^~~~~~~ kernel/reboot.c:721:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", val); ^~~~~~~ kernel/reboot.c:831:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", reboot_cpu); ^~~~~~~ kernel/reboot.c:831:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", reboot_cpu); ^~~~~~~ Suppressed 46 warnings (46 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. 15 warnings generated. kernel/async.c:125:2: warning: Value stored to 'calltime' is never read [clang-analyzer-deadcode.DeadStores] calltime = ktime_get(); ^ ~~~~~~~~~~~ kernel/async.c:125:2: note: Value stored to 'calltime' is never read calltime = ktime_get(); ^ ~~~~~~~~~~~ kernel/async.c:272:2: warning: Value stored to 'starttime' is never read [clang-analyzer-deadcode.DeadStores] starttime = ktime_get(); ^ ~~~~~~~~~~~ kernel/async.c:272:2: note: Value stored to 'starttime' is never read starttime = ktime_get(); ^ ~~~~~~~~~~~ Suppressed 13 warnings (13 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. 62 warnings generated. fs/ext4/resize.c:383:3: warning: Value stored to 'group' is never read [clang-analyzer-deadcode.DeadStores] group = group_data[0].group; ^ ~~~~~~~~~~~~~~~~~~~ fs/ext4/resize.c:383:3: note: Value stored to 'group' is never read group = group_data[0].group; ^ ~~~~~~~~~~~~~~~~~~~ fs/ext4/resize.c:417: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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ext4/resize.c:417: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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ext4/resize.c:449:7: warning: Value stored to 'count2' is never read [clang-analyzer-deadcode.DeadStores] for (count2 = count; count > 0; ^ ~~~~~ fs/ext4/resize.c:449:7: note: Value stored to 'count2' is never read for (count2 = count; count > 0; ^ ~~~~~ fs/ext4/resize.c:580:4: 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(gdb->b_data, sbi_array_rcu_deref(sbi, ^~~~~~ fs/ext4/resize.c:580:4: 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(gdb->b_data, sbi_array_rcu_deref(sbi, ^~~~~~ fs/ext4/resize.c:903: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(gdb_bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ext4/resize.c:903: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(gdb_bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ext4/resize.c:914: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(n_group_desc, o_group_desc, -- ^ lib/rhashtable.c:1031:20: note: '?' condition is false ht->p.min_size = roundup_pow_of_two(params->min_size); ^ include/linux/log2.h:176:2: note: expanded from macro 'roundup_pow_of_two' __builtin_constant_p(n) ? ( \ ^ lib/rhashtable.c:1031:20: note: Calling '__roundup_pow_of_two' ht->p.min_size = roundup_pow_of_two(params->min_size); ^ include/linux/log2.h:180:2: note: expanded from macro 'roundup_pow_of_two' __roundup_pow_of_two(n) \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Calling 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/bitops.h:154:2: note: Taking true branch if (sizeof(l) == 4) ^ include/linux/bitops.h:155:10: note: Calling 'fls' return fls(l); ^~~~~~ include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32 int r = 32; ^~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking false branch if (!x) ^ include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false if (!(x & 0xffff0000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:19:2: note: Taking false branch if (!(x & 0xffff0000u)) { ^ include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false if (!(x & 0xff000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:23:2: note: Taking false branch if (!(x & 0xff000000u)) { ^ include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false if (!(x & 0xf0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:27:2: note: Taking false branch if (!(x & 0xf0000000u)) { ^ include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false if (!(x & 0xc0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:31:2: note: Taking false branch if (!(x & 0xc0000000u)) { ^ include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false if (!(x & 0x80000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:35:2: note: Taking false branch if (!(x & 0x80000000u)) { ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ include/linux/bitops.h:155:10: note: Returning from 'fls' return fls(l); ^~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32 return fls(l); ^~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Returning from 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' return 1UL << fls_long(n - 1); ^ ~~~~~~~~~~~~~~~ lib/rhashtable.c:792:21: warning: Value stored to 'p' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct rhash_head *p = iter->p; ^ ~~~~~~~ lib/rhashtable.c:792:21: note: Value stored to 'p' during its initialization is never read struct rhash_head *p = iter->p; ^ ~~~~~~~ lib/rhashtable.c:1025: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(ht, 0, sizeof(*ht)); ^~~~~~ lib/rhashtable.c:1025: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(ht, 0, sizeof(*ht)); ^~~~~~ lib/rhashtable.c:1028: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(&ht->p, params, sizeof(*params)); ^~~~~~ lib/rhashtable.c:1028: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(&ht->p, params, sizeof(*params)); ^~~~~~ Suppressed 31 warnings (31 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. >> arch/riscv/kvm/vcpu_sbi_v01.c:27: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(&run->system_event, 0, sizeof(run->system_event)); ^~~~~~ arch/riscv/kvm/vcpu_sbi_v01.c:27: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(&run->system_event, 0, sizeof(run->system_event)); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 48 warnings generated. Suppressed 48 warnings (47 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 37 warnings generated. lib/mpi/mpih-div.c:127:18: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] divisor_limb <<= normalization_steps; ^ ~~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:37:6: note: Assuming 'dividend_size' is not equal to 0 if (!dividend_size) ^~~~~~~~~~~~~~ lib/mpi/mpih-div.c:37:2: note: Taking false branch if (!dividend_size) ^ lib/mpi/mpih-div.c:49:4: note: Left side of '&&' is false && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME) { ^ lib/mpi/mpih-div.c:122:3: note: Taking true branch if (UDIV_NEEDS_NORMALIZATION) { ^ lib/mpi/mpih-div.c:125:26: note: Calling 'count_leading_zeros' normalization_steps = count_leading_zeros(divisor_limb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/count_zeros.h:25:2: note: Taking true branch if (sizeof(x) == 4) ^ include/linux/count_zeros.h:26:3: note: Returning the value 32, which participates in a condition later return BITS_PER_LONG - fls(x); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/count_zeros.h:26:3: note: Returning the value 32 return BITS_PER_LONG - fls(x); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:125:26: note: Returning from 'count_leading_zeros' normalization_steps = count_leading_zeros(divisor_limb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:125:4: note: The value 32 is assigned to 'normalization_steps' normalization_steps = count_leading_zeros(divisor_limb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:126:8: note: 'normalization_steps' is 32 if (normalization_steps) { ^~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:126:4: note: Taking true branch if (normalization_steps) { ^ lib/mpi/mpih-div.c:127:18: note: Assigned value is garbage or undefined divisor_limb <<= normalization_steps; ^ ~~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:202:12: warning: Division by zero [clang-analyzer-core.DivideZero] return 1 / dsize; ~~^~~~~~~ lib/mpi/mpih-div.c:194:2: note: Control jumps to 'case 0:' @line 195 switch (dsize) { ^ lib/mpi/mpih-div.c:202:12: note: Division by zero return 1 / dsize; ~~^~~~~~~ lib/mpi/mpih-div.c:475:18: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] divisor_limb <<= normalization_steps; ^ ~~~~~~~~~~~~~~~~~~~ lib/mpi/mpih-div.c:387:6: note: Assuming 'dividend_size' is not equal to 0 if (!dividend_size) ^~~~~~~~~~~~~~ lib/mpi/mpih-div.c:387:2: note: Taking false branch if (!dividend_size) ^ lib/mpi/mpih-div.c:399:4: note: Left side of '&&' is false && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME) { ^ lib/mpi/mpih-div.c:470:3: note: Taking true branch if (UDIV_NEEDS_NORMALIZATION) { ^ lib/mpi/mpih-div.c:473:26: note: Calling 'count_leading_zeros' normalization_steps = count_leading_zeros(divisor_limb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/count_zeros.h:25:2: note: Taking true branch if (sizeof(x) == 4) ^ include/linux/count_zeros.h:26:3: note: Returning the value 32, which participates in a condition later return BITS_PER_LONG - fls(x); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/count_zeros.h:26:3: note: Returning the value 32 return BITS_PER_LONG - fls(x); -- ^ mm/percpu.c:2526:6: note: Taking true branch pr_cont("%s ", empty_str); ^ include/linux/printk.h:531:2: note: expanded from macro 'pr_cont' printk(KERN_CONT fmt, ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ mm/percpu.c:2526:6: note: '?' condition is true pr_cont("%s ", empty_str); ^ include/linux/printk.h:531:2: note: expanded from macro 'pr_cont' printk(KERN_CONT fmt, ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ mm/percpu.c:2526:6: note: '?' condition is true pr_cont("%s ", empty_str); ^ include/linux/printk.h:531:2: note: expanded from macro 'pr_cont' printk(KERN_CONT fmt, ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ mm/percpu.c:2526:6: note: Loop condition is false. Exiting loop pr_cont("%s ", empty_str); ^ include/linux/printk.h:531:2: note: expanded from macro 'pr_cont' printk(KERN_CONT fmt, ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ mm/percpu.c:2521:26: note: Assuming 'unit' is >= 'unit_end' for (unit_end += upa; unit < unit_end; unit++) ^~~~~~~~~~~~~~~ mm/percpu.c:2521:4: note: Loop condition is false. Execution continues on line 2514 for (unit_end += upa; unit < unit_end; unit++) ^ mm/percpu.c:2514:8: note: Assuming 'alloc' is >= 'alloc_end' alloc < alloc_end; alloc++) { ^~~~~~~~~~~~~~~~~ mm/percpu.c:2513:3: note: Loop condition is false. Execution continues on line 2508 for (alloc_end += gi->nr_units / upa; ^ mm/percpu.c:2508:18: note: Assuming 'group' is < field 'nr_groups' for (group = 0; group < ai->nr_groups; group++) { ^~~~~~~~~~~~~~~~~~~~~ mm/percpu.c:2508:2: note: Loop condition is true. Entering loop body for (group = 0; group < ai->nr_groups; group++) { ^ mm/percpu.c:2512:23: note: Division by zero BUG_ON(gi->nr_units % upa); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ mm/percpu.c:2869: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(group_map, 0, sizeof(group_map)); ^~~~~~ mm/percpu.c:2869: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(group_map, 0, sizeof(group_map)); ^~~~~~ mm/percpu.c:2870: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(group_cnt, 0, sizeof(group_cnt)); ^~~~~~ mm/percpu.c:2870: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(group_cnt, 0, sizeof(group_cnt)); ^~~~~~ >> mm/percpu.c:3143:4: 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(ptr, __per_cpu_load, ai->static_size); ^~~~~~ mm/percpu.c:3143:4: 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(ptr, __per_cpu_load, ai->static_size); ^~~~~~ Suppressed 48 warnings (47 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 49 warnings generated. drivers/video/backlight/pwm_bl.c:206:12: warning: Division by zero [clang-analyzer-core.DivideZero] min((int)DIV_ROUND_UP(period, fls(period)), 4096); ^ include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP' #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ include/uapi/linux/const.h:34:54: note: expanded from macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ drivers/video/backlight/pwm_bl.c:465:6: note: Assuming 'data' is non-null if (!data) { ^~~~~ drivers/video/backlight/pwm_bl.c:465:2: note: Taking false branch if (!data) { ^ drivers/video/backlight/pwm_bl.c:475:6: note: Assuming field 'init' is null if (data->init) { ^~~~~~~~~~ drivers/video/backlight/pwm_bl.c:475:2: note: Taking false branch if (data->init) { ^ drivers/video/backlight/pwm_bl.c:482:6: note: Assuming 'pb' is non-null if (!pb) { ^~~ drivers/video/backlight/pwm_bl.c:482:2: note: Taking false branch if (!pb) { ^ drivers/video/backlight/pwm_bl.c:498:6: note: Calling 'IS_ERR' if (IS_ERR(pb->enable_gpio)) { ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pwm_bl.c:498:6: note: Returning from 'IS_ERR' if (IS_ERR(pb->enable_gpio)) { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pwm_bl.c:498:2: note: Taking false branch if (IS_ERR(pb->enable_gpio)) { ^ drivers/video/backlight/pwm_bl.c:504:6: note: Calling 'IS_ERR' if (IS_ERR(pb->power_supply)) { ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pwm_bl.c:504:6: note: Returning from 'IS_ERR' if (IS_ERR(pb->power_supply)) { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pwm_bl.c:504:2: note: Taking false branch if (IS_ERR(pb->power_supply)) { ^ drivers/video/backlight/pwm_bl.c:510:22: note: Left side of '&&' is false if (IS_ERR(pb->pwm) && PTR_ERR(pb->pwm) != -EPROBE_DEFER && !node) { ^ drivers/video/backlight/pwm_bl.c:516:6: note: Calling 'IS_ERR' if (IS_ERR(pb->pwm)) { ^~~~~~~~~~~~~~~ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pwm_bl.c:516:6: note: Returning from 'IS_ERR' if (IS_ERR(pb->pwm)) { ^~~~~~~~~~~~~~~ drivers/video/backlight/pwm_bl.c:516:2: note: Taking false branch if (IS_ERR(pb->pwm)) { ^ drivers/video/backlight/pwm_bl.c:523:2: note: Taking false branch dev_dbg(&pdev->dev, "got pwm for backlight\n"); ^ include/linux/dev_printk.h:162:2: note: expanded from macro 'dev_dbg' if (0) \ ^ drivers/video/backlight/pwm_bl.c:526:2: note: Calling 'pwm_init_state' pwm_init_state(pb->pwm, &state); -- ^ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/video/backlight/pwm_bl.c:206:33: note: Calling 'fls' min((int)DIV_ROUND_UP(period, fls(period)), 4096); ^ include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP' #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ include/uapi/linux/const.h:34:57: note: expanded from macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ include/linux/minmax.h:45:33: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ include/asm-generic/bitops/fls.h:17:7: note: 'x' is 0 if (!x) ^ include/asm-generic/bitops/fls.h:17:2: note: Taking true branch if (!x) ^ include/asm-generic/bitops/fls.h:18:3: note: Returning zero return 0; ^~~~~~~~ drivers/video/backlight/pwm_bl.c:206:33: note: Returning from 'fls' min((int)DIV_ROUND_UP(period, fls(period)), 4096); ^ include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP' #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ include/uapi/linux/const.h:34:57: note: expanded from macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ include/linux/minmax.h:45:33: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/video/backlight/pwm_bl.c:206:12: note: Division by zero min((int)DIV_ROUND_UP(period, fls(period)), 4096); ^ include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP' #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ include/uapi/linux/const.h:34:54: note: expanded from macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ include/linux/minmax.h:45:33: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ~~~~~~~~~~~~~~^~~~~~~~ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/video/backlight/pwm_bl.c:244: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)); ^~~~~~ drivers/video/backlight/pwm_bl.c:244: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)); ^~~~~~ drivers/video/backlight/pwm_bl.c:544: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(&props, 0, sizeof(struct backlight_properties)); ^~~~~~ drivers/video/backlight/pwm_bl.c:544: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(&props, 0, sizeof(struct backlight_properties)); ^~~~~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. 31 warnings generated. Suppressed 31 warnings (31 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. 34 warnings generated. Suppressed 34 warnings (34 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. 47 warnings generated. >> lib/irq_poll.c:181: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(iop, 0, sizeof(*iop)); ^~~~~~ lib/irq_poll.c:181: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(iop, 0, sizeof(*iop)); ^~~~~~ Suppressed 46 warnings (46 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. 32 warnings generated. lib/stackdepot.c:139: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(stack->entries, entries, flex_array_size(stack, entries, size)); ^~~~~~ lib/stackdepot.c:139: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(stack->entries, entries, flex_array_size(stack, entries, size)); ^~~~~~ Suppressed 31 warnings (31 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 33 warnings generated. lib/syscall.c:15: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(info, 0, sizeof(*info)); ^~~~~~ lib/syscall.c:15: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(info, 0, sizeof(*info)); ^~~~~~ Suppressed 32 warnings (32 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. 3 warnings generated. Suppressed 3 warnings (2 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 15 warnings generated. Suppressed 15 warnings (15 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. 9 warnings generated. Suppressed 9 warnings (9 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. 13 warnings generated. lib/glob.c:48:32: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] char const *back_pat = NULL, *back_str = back_str; ^ ~~~~~~~~ lib/glob.c:48:32: note: Assigned value is garbage or undefined char const *back_pat = NULL, *back_str = back_str; ^ ~~~~~~~~ Suppressed 12 warnings (12 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. 36 warnings generated. drivers/char/ipmi/ipmi_si_platform.c:158: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(&io, 0, sizeof(io)); ^~~~~~ drivers/char/ipmi/ipmi_si_platform.c:158: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(&io, 0, sizeof(io)); ^~~~~~ drivers/char/ipmi/ipmi_si_platform.c:271: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(&io, 0, sizeof(io)); ^~~~~~ drivers/char/ipmi/ipmi_si_platform.c:271: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(&io, 0, sizeof(io)); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 44 warnings generated. lib/mpi/ec.c:209: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(n, 0, sizeof(n)); ^~~~~~ lib/mpi/ec.c:209: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(n, 0, sizeof(n)); ^~~~~~ lib/mpi/ec.c:231: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(n, 0, sizeof(n)); ^~~~~~ lib/mpi/ec.c:231: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(n, 0, sizeof(n)); ^~~~~~ lib/mpi/ec.c:260: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(wp, n, wsize * BYTES_PER_MPI_LIMB); ^~~~~~ lib/mpi/ec.c:260: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(wp, n, wsize * BYTES_PER_MPI_LIMB); ^~~~~~ lib/mpi/ec.c:263: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(m, n+LIMB_SIZE_25519-1, (wsize+1) * BYTES_PER_MPI_LIMB); -- #define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (maxSymbolValue + 2 + (1ull << (tableLog - 2))) ^ ~~~~~~~~~~~~~~ lib/zstd/compress/fse_compress.c:75:56: note: Assuming 'tableLog' is 0 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableLog ? tableSize>>1 : 1) ; ^~~~~~~~ lib/zstd/compress/fse_compress.c:75:56: note: '?' condition is false lib/zstd/compress/fse_compress.c:84:9: note: Assuming the condition is false if ((size_t)workSpace & 3) return ERROR(GENERIC); /* Must be 4 byte aligned */ ^~~~~~~~~~~~~~~~~~~~~ lib/zstd/compress/fse_compress.c:84:5: note: Taking false branch if ((size_t)workSpace & 3) return ERROR(GENERIC); /* Must be 4 byte aligned */ ^ lib/zstd/compress/fse_compress.c:85:9: note: The result of the left shift is undefined due to shifting by '4294967294', which is greater or equal to the width of type 'unsigned long long' if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_tooLarge); ^ lib/zstd/compress/../common/fse.h:338:87: note: expanded from macro 'FSE_BUILD_CTABLE_WORKSPACE_SIZE' #define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/zstd/compress/../common/fse.h:337:99: note: expanded from macro 'FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32' #define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (maxSymbolValue + 2 + (1ull << (tableLog - 2))) ^ ~~~~~~~~~~~~~~ lib/zstd/compress/fse_compress.c:95:6: 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] ZSTD_memset(tableSymbol, 0, sizeof(*tableSymbol) * tableSize); /* useless initialization, just to keep scan-build happy */ ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/fse_compress.c:95:6: 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 ZSTD_memset(tableSymbol, 0, sizeof(*tableSymbol) * tableSize); /* useless initialization, just to keep scan-build happy */ ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/fse_compress.c:579:5: warning: Value stored to 'srcSize' is never read [clang-analyzer-deadcode.DeadStores] srcSize -= 2; ^ ~ lib/zstd/compress/fse_compress.c:579:5: note: Value stored to 'srcSize' is never read srcSize -= 2; ^ ~ Suppressed 3 warnings (3 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. 4 warnings generated. lib/zstd/compress/hist.c:37:5: 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] ZSTD_memset(count, 0, (maxSymbolValue+1) * sizeof(*count)); ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:37:5: 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 ZSTD_memset(count, 0, (maxSymbolValue+1) * sizeof(*count)); ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:84:9: 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] ZSTD_memset(count, 0, countSize); ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:84:9: 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 ZSTD_memset(count, 0, countSize); ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:88:5: 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] ZSTD_memset(workSpace, 0, 4*256*sizeof(unsigned)); ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:88:5: 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 ZSTD_memset(workSpace, 0, 4*256*sizeof(unsigned)); ^ lib/zstd/compress/../common/zstd_deps.h:34:28: note: expanded from macro 'ZSTD_memset' #define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:130:9: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ZSTD_memmove(count, Counting1, countSize); /* in case count & Counting1 are overlapping */ ^ lib/zstd/compress/../common/zstd_deps.h:33:29: note: expanded from macro 'ZSTD_memmove' #define ZSTD_memmove(d,s,n) __builtin_memmove((d),(s),(n)) ^~~~~~~~~~~~~~~~~ lib/zstd/compress/hist.c:130:9: note: Call to function 'memmove' 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 'memmove_s' in case of C11 ZSTD_memmove(count, Counting1, countSize); /* in case count & Counting1 are overlapping */ ^ lib/zstd/compress/../common/zstd_deps.h:33:29: note: expanded from macro 'ZSTD_memmove' #define ZSTD_memmove(d,s,n) __builtin_memmove((d),(s),(n)) ^~~~~~~~~~~~~~~~~ 35 warnings generated. kernel/dma/coherent.c:158: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(ret, 0, size); ^~~~~~ kernel/dma/coherent.c:158: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(ret, 0, size); ^~~~~~ Suppressed 34 warnings (34 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. 36 warnings generated. >> kernel/dma/debug.c:599: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(entry, 0, sizeof(*entry)); ^~~~~~ kernel/dma/debug.c:599: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(entry, 0, sizeof(*entry)); ^~~~~~ kernel/dma/debug.c:1062:4: warning: Value stored to 'addr' is never read [clang-analyzer-deadcode.DeadStores] addr = (u8 *)current->stack + i * PAGE_SIZE + offset; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/dma/debug.c:1062:4: note: Value stored to 'addr' is never read addr = (u8 *)current->stack + i * PAGE_SIZE + offset; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 49 warnings generated. >> init/do_mounts_rd.c:80: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(buf, 0xe5, size); ^~~~~~ init/do_mounts_rd.c:80: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(buf, 0xe5, size); ^~~~~~ init/do_mounts_rd.c:252:4: warning: Value stored to 'rotate' is never read [clang-analyzer-deadcode.DeadStores] rotate = 0; ^ ~ init/do_mounts_rd.c:252:4: note: Value stored to 'rotate' is never read rotate = 0; ^ ~ Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 10 warnings generated. Suppressed 10 warnings (9 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 65 warnings generated. Suppressed 65 warnings (65 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. 18 warnings generated. Suppressed 18 warnings (18 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. 38 warnings generated. drivers/pinctrl/pinctrl-single.c:732:41: warning: Division by zero [clang-analyzer-core.DivideZero] nr_pins = (pcs->size * BITS_PER_BYTE) / pcs->bits_per_pin; ^ drivers/pinctrl/pinctrl-single.c:1786:14: note: Assuming 'soc' is non-null if (WARN_ON(!soc)) ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ drivers/pinctrl/pinctrl-single.c:1786:2: note: Taking false branch if (WARN_ON(!soc)) ^ drivers/pinctrl/pinctrl-single.c:1790:6: note: Assuming 'pcs' is non-null if (!pcs) ^~~~ drivers/pinctrl/pinctrl-single.c:1790:2: note: Taking false branch if (!pcs) ^ drivers/pinctrl/pinctrl-single.c:1795:2: note: Loop condition is false. Exiting loop raw_spin_lock_init(&pcs->lock); ^ include/linux/spinlock.h:102:39: note: expanded from macro 'raw_spin_lock_init' # define raw_spin_lock_init(lock) \ ^ drivers/pinctrl/pinctrl-single.c:1796:2: note: Loop condition is false. Exiting loop mutex_init(&pcs->mutex); ^ include/linux/mutex.h:101:32: note: expanded from macro 'mutex_init' #define mutex_init(mutex) \ ^ drivers/pinctrl/pinctrl-single.c:1801:8: note: Calling 'of_property_read_u32' ret = of_property_read_u32(np, "pinctrl-single,register-width", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/of.h:1323:9: note: Calling 'of_property_read_u32_array' return of_property_read_u32_array(np, propname, out_value, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/of.h:1269:6: note: Assuming 'ret' is >= 0 if (ret >= 0) ^~~~~~~~ include/linux/of.h:1269:2: note: Taking true branch if (ret >= 0) ^ include/linux/of.h:1270:3: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ include/linux/of.h:1323:9: note: Returning from 'of_property_read_u32_array' return of_property_read_u32_array(np, propname, out_value, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/of.h:1323:2: note: Returning zero, which participates in a condition later return of_property_read_u32_array(np, propname, out_value, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:1801:8: note: Returning from 'of_property_read_u32' ret = of_property_read_u32(np, "pinctrl-single,register-width", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:1803:6: note: 'ret' is 0 if (ret) { ^~~ drivers/pinctrl/pinctrl-single.c:1803:2: note: Taking false branch if (ret) { ^ drivers/pinctrl/pinctrl-single.c:1811:7: note: 'ret' is not equal to 0 if (!ret) { ^~~ drivers/pinctrl/pinctrl-single.c:1811:2: note: Taking false branch if (!ret) { ^ drivers/pinctrl/pinctrl-single.c:1823:6: note: 'ret' is not equal to 0 if (ret) ^~~ drivers/pinctrl/pinctrl-single.c:1823:2: note: Taking true branch if (ret) ^ drivers/pinctrl/pinctrl-single.c:1826:22: note: Calling 'of_property_read_bool' pcs->bits_per_mux = of_property_read_bool(np, -- include/linux/platform_device.h:243:2: note: Calling 'dev_set_drvdata' dev_set_drvdata(&pdev->dev, data); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:699:1: note: Returning without writing to 'data->bits_per_mux', which participates in a condition later } ^ include/linux/device.h:699:1: note: Returning without writing to 'data->fmask', which participates in a condition later include/linux/device.h:699:1: note: Returning without writing to 'data->bits_per_pin' include/linux/platform_device.h:243:2: note: Returning from 'dev_set_drvdata' dev_set_drvdata(&pdev->dev, data); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/platform_device.h:244:1: note: Returning without writing to 'data->bits_per_mux', which participates in a condition later } ^ include/linux/platform_device.h:244:1: note: Returning without writing to 'data->fmask', which participates in a condition later include/linux/platform_device.h:244:1: note: Returning without writing to 'data->bits_per_pin' drivers/pinctrl/pinctrl-single.c:1856:2: note: Returning from 'platform_set_drvdata' platform_set_drvdata(pdev, pcs); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:1858:2: note: Control jumps to the 'default' case at line 1871 switch (pcs->width) { ^ drivers/pinctrl/pinctrl-single.c:1872:3: note: Execution continues on line 1875 break; ^ drivers/pinctrl/pinctrl-single.c:1878:6: note: Assuming the condition is false if (PCS_HAS_PINCONF) ^ drivers/pinctrl/pinctrl-single.c:212:27: note: expanded from macro 'PCS_HAS_PINCONF' #define PCS_HAS_PINCONF (pcs->flags & PCS_FEAT_PINCONF) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:1878:2: note: Taking false branch if (PCS_HAS_PINCONF) ^ drivers/pinctrl/pinctrl-single.c:1882:8: note: Calling 'pcs_allocate_pin_table' ret = pcs_allocate_pin_table(pcs); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:730:11: note: Field 'bits_per_mux' is true if (pcs->bits_per_mux) { ^ drivers/pinctrl/pinctrl-single.c:730:2: note: Taking true branch if (pcs->bits_per_mux) { ^ drivers/pinctrl/pinctrl-single.c:731:23: note: Calling 'fls' pcs->bits_per_pin = fls(pcs->fmask); ^~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking true branch if (!x) ^ include/asm-generic/bitops/fls.h:18:3: note: Returning zero return 0; ^~~~~~~~ drivers/pinctrl/pinctrl-single.c:731:23: note: Returning from 'fls' pcs->bits_per_pin = fls(pcs->fmask); ^~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:731:3: note: The value 0 is assigned to field 'bits_per_pin' pcs->bits_per_pin = fls(pcs->fmask); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:732:41: note: Division by zero nr_pins = (pcs->size * BITS_PER_BYTE) / pcs->bits_per_pin; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:882:40: warning: The result of the right shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'unsigned int' [clang-analyzer-core.UndefinedBinaryOperatorResult] add_setting(settings, param, value[0] >> shift); ^ ~~~~~ drivers/pinctrl/pinctrl-single.c:874:8: note: Calling 'of_property_read_u32_array' ret = of_property_read_u32_array(np, name, value, 2); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/of.h:1269:6: note: Assuming 'ret' is >= 0 if (ret >= 0) ^~~~~~~~ include/linux/of.h:1269:2: note: Taking true branch if (ret >= 0) ^ include/linux/of.h:1270:3: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ drivers/pinctrl/pinctrl-single.c:874:8: note: Returning from 'of_property_read_u32_array' ret = of_property_read_u32_array(np, name, value, 2); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:875:6: note: 'ret' is 0 if (ret) ^~~ drivers/pinctrl/pinctrl-single.c:875:2: note: Taking false branch if (ret) ^ drivers/pinctrl/pinctrl-single.c:879:2: note: The value 4294967295 is assigned to 'shift' shift = ffs(value[1]) - 1; ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:882:40: note: The result of the right shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'unsigned int' add_setting(settings, param, value[0] >> shift); ^ ~~~~~ drivers/pinctrl/pinctrl-single.c:1417:3: warning: Value stored to 'mask' is never read [clang-analyzer-deadcode.DeadStores] mask = pcs->read(pcswi->reg); ^ ~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-single.c:1417:3: note: Value stored to 'mask' is never read mask = pcs->read(pcswi->reg); ^ ~~~~~~~~~~~~~~~~~~~~~ >> drivers/pinctrl/pinctrl-single.c:1799: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(&pcs->socdata, soc, sizeof(*soc)); ^~~~~~ drivers/pinctrl/pinctrl-single.c:1799: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(&pcs->socdata, soc, sizeof(*soc)); ^~~~~~ Suppressed 34 warnings (34 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. 13 warnings generated. Suppressed 13 warnings (13 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. 9 warnings generated. Suppressed 9 warnings (9 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. 49 warnings generated. mm/filemap.c:2705:4: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] folio_mark_accessed(fbatch.folios[0]); ^ mm/filemap.c:2777:6: note: Assuming 'count' is not equal to 0 if (!count) ^~~~~~ mm/filemap.c:2777:2: note: Taking false branch if (!count) ^ mm/filemap.c:2780:6: note: Assuming the condition is false if (iocb->ki_flags & IOCB_DIRECT) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2780:2: note: Taking false branch if (iocb->ki_flags & IOCB_DIRECT) { ^ mm/filemap.c:2822:9: note: Calling 'filemap_read' return filemap_read(iocb, iter, retval); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2654:15: note: Assuming field 'ki_pos' is < field 's_maxbytes' if (unlikely(iocb->ki_pos >= inode->i_sb->s_maxbytes)) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ mm/filemap.c:2654:2: note: Taking false branch if (unlikely(iocb->ki_pos >= inode->i_sb->s_maxbytes)) ^ mm/filemap.c:2656:2: note: Taking false branch if (unlikely(!iov_iter_count(iter))) ^ mm/filemap.c:2660:2: note: Calling 'folio_batch_init' folio_batch_init(&fbatch); ^~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2660:2: note: Returning from 'folio_batch_init' folio_batch_init(&fbatch); ^~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2670:8: note: Assuming the condition is false if ((iocb->ki_flags & IOCB_WAITQ) && already_read) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2670:37: note: Left side of '&&' is false if ((iocb->ki_flags & IOCB_WAITQ) && already_read) ^ mm/filemap.c:2673:16: note: Assuming the condition is false if (unlikely(iocb->ki_pos >= i_size_read(inode))) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ mm/filemap.c:2673:3: note: Taking false branch if (unlikely(iocb->ki_pos >= i_size_read(inode))) ^ mm/filemap.c:2676:11: note: Calling 'filemap_get_pages' error = filemap_get_pages(iocb, iter, &fbatch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2582:2: note: Taking false branch if (fatal_signal_pending(current)) ^ mm/filemap.c:2585:2: note: Calling 'filemap_get_read_batch' filemap_get_read_batch(mapping, index, last_index, fbatch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2380:2: note: Loop condition is false. Execution continues on line 2404 for (folio = xas_load(&xas); folio; folio = xas_next(&xas)) { ^ mm/filemap.c:2585:2: note: Returning from 'filemap_get_read_batch' filemap_get_read_batch(mapping, index, last_index, fbatch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2586:7: note: Calling 'folio_batch_count' if (!folio_batch_count(fbatch)) { ^~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2586:7: note: Returning from 'folio_batch_count' if (!folio_batch_count(fbatch)) { ^~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2586:2: note: Taking true branch if (!folio_batch_count(fbatch)) { ^ mm/filemap.c:2587:7: note: Assuming the condition is false if (iocb->ki_flags & IOCB_NOIO) ^~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2587:3: note: Taking false branch if (iocb->ki_flags & IOCB_NOIO) ^ mm/filemap.c:2591:3: note: Calling 'filemap_get_read_batch' filemap_get_read_batch(mapping, index, last_index, fbatch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/filemap.c:2380:2: note: Loop condition is false. Execution continues on line 2404 for (folio = xas_load(&xas); folio; folio = xas_next(&xas)) { -- ^~~~~~~~~~~~~~~~ lib/zstd/decompress/zstd_decompress_block.c:1215:13: 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 ZSTD_memcpy(op, litPtr, lastLLSize); ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/zstd_decompress_block.c:1320:13: 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] ZSTD_memcpy(op, litPtr, lastLLSize); ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/decompress/zstd_decompress_block.c:1320:13: 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 ZSTD_memcpy(op, litPtr, lastLLSize); ^ lib/zstd/decompress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ Suppressed 4 warnings (4 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. 15 warnings generated. lib/kobject.c:156:3: 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(path + length, kobject_name(parent), cur); ^~~~~~ lib/kobject.c:156:3: 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(path + length, kobject_name(parent), cur); ^~~~~~ lib/kobject.c:516:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(devpath_string, "DEVPATH_OLD=%s", devpath); ^~~~~~~ lib/kobject.c:516:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(devpath_string, "DEVPATH_OLD=%s", devpath); ^~~~~~~ lib/kobject.c:582:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(devpath_string, "DEVPATH_OLD=%s", devpath); ^~~~~~~ lib/kobject.c:582:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(devpath_string, "DEVPATH_OLD=%s", devpath); ^~~~~~~ Suppressed 12 warnings (12 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. 23 warnings generated. Suppressed 23 warnings (23 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. 36 warnings generated. kernel/locking/mutex-debug.c:30: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(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); ^~~~~~ kernel/locking/mutex-debug.c:30: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(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); ^~~~~~ kernel/locking/mutex-debug.c:47: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(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter)); ^~~~~~ kernel/locking/mutex-debug.c:47: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(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter)); ^~~~~~ Suppressed 34 warnings (34 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. 41 warnings generated. kernel/locking/lockdep.c:5911: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(current->held_locks, 0, MAX_LOCK_DEPTH*sizeof(struct held_lock)); ^~~~~~ kernel/locking/lockdep.c:5911: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(current->held_locks, 0, MAX_LOCK_DEPTH*sizeof(struct held_lock)); ^~~~~~ kernel/locking/lockdep.c:6020: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(p + offset, 0, sizeof(*class) - offset); ^~~~~~ kernel/locking/lockdep.c:6020: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(p + offset, 0, sizeof(*class) - offset); ^~~~~~ Suppressed 39 warnings (38 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 34 warnings generated. lib/842/842_decompress.c:205: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(p->out, &p->ostart[offset], size); ^~~~~~ lib/842/842_decompress.c:205: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(p->out, &p->ostart[offset], size); ^~~~~~ lib/842/842_decompress.c:319:5: 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(p.out, p.out - 8, 8); ^~~~~~ lib/842/842_decompress.c:319:5: 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(p.out, p.out - 8, 8); ^~~~~~ lib/842/842_decompress.c:332:4: 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(p.out, 0, 8); ^~~~~~ lib/842/842_decompress.c:332:4: 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(p.out, 0, 8); ^~~~~~ Suppressed 31 warnings (31 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. 24 warnings generated. Suppressed 24 warnings (24 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. 17 warnings generated. >> lib/reed_solomon/test_rslib.c:169: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(c + dlen, 0, nroots * sizeof(*c)); ^~~~~~ lib/reed_solomon/test_rslib.c:169: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(c + dlen, 0, nroots * sizeof(*c)); ^~~~~~ >> lib/reed_solomon/test_rslib.c:173: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(r, c, len * sizeof(*r)); ^~~~~~ lib/reed_solomon/test_rslib.c:173: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(r, c, len * sizeof(*r)); ^~~~~~ lib/reed_solomon/test_rslib.c:174: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(errlocs, 0, len * sizeof(*errlocs)); ^~~~~~ lib/reed_solomon/test_rslib.c:174: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(errlocs, 0, len * sizeof(*errlocs)); ^~~~~~ lib/reed_solomon/test_rslib.c:175: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(derrlocs, 0, nroots * sizeof(*derrlocs)); ^~~~~~ lib/reed_solomon/test_rslib.c:175: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(derrlocs, 0, nroots * sizeof(*derrlocs)); ^~~~~~ lib/reed_solomon/test_rslib.c:395:4: 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(corr, 0, nroots * sizeof(*corr)); ^~~~~~ lib/reed_solomon/test_rslib.c:395:4: 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(corr, 0, nroots * sizeof(*corr)); ^~~~~~ Suppressed 12 warnings (12 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. 6 warnings generated. Suppressed 6 warnings (4 in non-user code, 2 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 58 warnings generated. >> arch/riscv/kvm/../../../virt/kvm/kvm_main.c:964:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(dir_name, sizeof(dir_name), "%d-%d", task_pid_nr(current), fd); ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:964:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(dir_name, sizeof(dir_name), "%d-%d", task_pid_nr(current), fd); ^~~~~~~~ >> arch/riscv/kvm/../../../virt/kvm/kvm_main.c:2055: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(dirty_bitmap_buffer, 0, n); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:2055: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(dirty_bitmap_buffer, 0, n); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:3687:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "kvm-vcpu:%d", vcpu->vcpu_id); ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:3687:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "kvm-vcpu:%d", vcpu->vcpu_id); ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:3773:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(vcpu->stats_id, sizeof(vcpu->stats_id), "kvm-%d/vcpu-%d", ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:3773:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(vcpu->stats_id, sizeof(vcpu->stats_id), "kvm-%d/vcpu-%d", ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:3845:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "kvm-vcpu-stats:%d", vcpu->vcpu_id); ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:3845:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "kvm-vcpu-stats:%d", vcpu->vcpu_id); ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:4754:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(kvm->stats_id, sizeof(kvm->stats_id), ^~~~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:4754:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(kvm->stats_id, sizeof(kvm->stats_id), ^~~~~~~~ >> arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5150: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(new_bus, bus, sizeof(*bus) + i * sizeof(struct kvm_io_range)); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5150: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(new_bus, bus, sizeof(*bus) + i * sizeof(struct kvm_io_range)); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5153: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(new_bus->range + i + 1, bus->range + i, ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5153: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(new_bus->range + i + 1, bus->range + i, ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5186:3: 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(new_bus, bus, struct_size(bus, range, i)); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5186:3: 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(new_bus, bus, struct_size(bus, range, i)); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5188:3: 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(new_bus->range + i, bus->range + i + 1, ^~~~~~ arch/riscv/kvm/../../../virt/kvm/kvm_main.c:5188:3: 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(new_bus->range + i, bus->range + i + 1, ^~~~~~ Suppressed 48 warnings (48 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. 21 warnings generated. Suppressed 21 warnings (21 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. kernel/time/tick-sched.c:1492: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(ts, 0, sizeof(*ts)); ^~~~~~ kernel/time/tick-sched.c:1492: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(ts, 0, sizeof(*ts)); ^~~~~~ Suppressed 35 warnings (35 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. Suppressed 46 warnings (46 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. 48 warnings generated. Suppressed 48 warnings (48 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. 34 warnings generated. Suppressed 34 warnings (34 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. 16 warnings generated. Suppressed 16 warnings (16 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. 25 warnings generated. Suppressed 25 warnings (25 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. 36 warnings generated. drivers/dma-buf/dma-buf.c:1196:14: warning: Access to field 'resv' results in a dereference of a null pointer (loaded from variable 'dmabuf') [clang-analyzer-core.NullDereference] might_lock(&dmabuf->resv->lock.base); ^ drivers/dma-buf/dma-buf.c:336:2: note: Value assigned to 'dmabuf' dmabuf = file->private_data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/dma-buf.c:338:2: note: Control jumps to 'case 1074291200:' at line 339 switch (cmd) { ^ drivers/dma-buf/dma-buf.c:340:7: note: Calling 'copy_from_user' if (copy_from_user(&sync, (void __user *) arg, sizeof(sync))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/uaccess.h:191:2: note: Taking true branch if (likely(check_copy_size(to, n, false))) ^ include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), which participates in a condition later return n; ^~~~~~~~ drivers/dma-buf/dma-buf.c:340:7: note: Returning from 'copy_from_user' if (copy_from_user(&sync, (void __user *) arg, sizeof(sync))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/dma-buf.c:340:7: note: Assuming the condition is false if (copy_from_user(&sync, (void __user *) arg, sizeof(sync))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/dma-buf.c:340:3: note: Taking false branch if (copy_from_user(&sync, (void __user *) arg, sizeof(sync))) ^ drivers/dma-buf/dma-buf.c:343:7: note: Assuming the condition is false if (sync.flags & ~DMA_BUF_SYNC_VALID_FLAGS_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/dma-buf.c:343:3: note: Taking false branch if (sync.flags & ~DMA_BUF_SYNC_VALID_FLAGS_MASK) ^ drivers/dma-buf/dma-buf.c:346:3: note: Control jumps to 'case 3:' at line 353 switch (sync.flags & DMA_BUF_SYNC_RW) { ^ drivers/dma-buf/dma-buf.c:355:4: note: Execution continues on line 360 break; ^ drivers/dma-buf/dma-buf.c:360:7: note: Assuming the condition is true if (sync.flags & DMA_BUF_SYNC_END) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/dma-buf.c:360:3: note: Taking true branch if (sync.flags & DMA_BUF_SYNC_END) -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/math64.h:92:15: note: '__base' initialized to 0 *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:220:2: note: expanded from macro 'do_div' uint32_t __base = (base); \ ^~~~~~~~~~~~~~~ include/linux/math64.h:92:15: note: Left side of '&&' is false *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:223:35: note: expanded from macro 'do_div' if (__builtin_constant_p(__base) && \ ^ include/linux/math64.h:92:15: note: Left side of '&&' is false *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:227:42: note: expanded from macro 'do_div' } else if (__builtin_constant_p(__base) && \ ^ include/linux/math64.h:92:15: note: Assuming the condition is true *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:234:20: note: expanded from macro 'do_div' } else if (likely(((n) >> 32) == 0)) { \ ~~~~~~~^~~~~~~~~~~~~~~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ include/linux/math64.h:92:15: note: Taking true branch *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:234:9: note: expanded from macro 'do_div' } else if (likely(((n) >> 32) == 0)) { \ ^ include/linux/math64.h:92:15: note: Division by zero *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ~~~~~~~~~~~~~~^~~~~~~~ Suppressed 2 warnings (2 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. 24 warnings generated. drivers/base/cpu.c:364: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(&cpu->dev, 0x00, sizeof(struct device)); ^~~~~~ drivers/base/cpu.c:364: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(&cpu->dev, 0x00, sizeof(struct device)); ^~~~~~ Suppressed 23 warnings (23 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. 13 warnings generated. Suppressed 13 warnings (13 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. 19 warnings generated. Suppressed 19 warnings (19 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. 12 warnings generated. Suppressed 12 warnings (12 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. 37 warnings generated. drivers/base/devres.c:120: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(dr, 0, offsetof(struct devres, data)); ^~~~~~ drivers/base/devres.c:120: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(dr, 0, offsetof(struct devres, data)); ^~~~~~ drivers/base/devres.c:921: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(new_dr->data, old_dr->data, ^~~~~~ drivers/base/devres.c:921: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(new_dr->data, old_dr->data, ^~~~~~ drivers/base/devres.c:955:3: 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(buf, s, size); ^~~~~~ drivers/base/devres.c:955:3: 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(buf, s, size); ^~~~~~ drivers/base/devres.c:1001:8: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = vsnprintf(NULL, 0, fmt, aq); ^~~~~~~~~ drivers/base/devres.c:1001:8: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 len = vsnprintf(NULL, 0, fmt, aq); ^~~~~~~~~ drivers/base/devres.c:1008:2: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] vsnprintf(p, len+1, fmt, ap); ^~~~~~~~~ drivers/base/devres.c:1008:2: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 vsnprintf(p, len+1, fmt, ap); ^~~~~~~~~ drivers/base/devres.c:1077:3: 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(p, src, len); ^~~~~~ drivers/base/devres.c:1077:3: 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(p, src, len); ^~~~~~ Suppressed 31 warnings (31 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. 31 warnings generated. >> drivers/clk/sifive/sifive-prci.c:158: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(&pwd->c, c, sizeof(*c)); ^~~~~~ drivers/clk/sifive/sifive-prci.c:158: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(&pwd->c, c, sizeof(*c)); ^~~~~~ drivers/clk/sifive/sifive-prci.c:199: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(&c, &pwd->c, sizeof(c)); ^~~~~~ drivers/clk/sifive/sifive-prci.c:199: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(&c, &pwd->c, sizeof(c)); ^~~~~~ drivers/clk/sifive/sifive-prci.c:326:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_CORECLKSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:326:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_CORECLKSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:347:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_CORECLKSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:347:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_CORECLKSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:369:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_CORECLKSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:369:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_CORECLKSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:390:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_COREPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:390:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_COREPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:411:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_COREPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:411:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_COREPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:432:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_HFPCLKPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:432:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_HFPCLKPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:453:2: warning: Value stored to 'r' is never read [clang-analyzer-deadcode.DeadStores] r = __prci_readl(pd, PRCI_HFPCLKPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sifive/sifive-prci.c:453:2: note: Value stored to 'r' is never read r = __prci_readl(pd, PRCI_HFPCLKPLLSEL_OFFSET); /* barrier */ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 22 warnings (22 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. 48 warnings generated. fs/fs-writeback.c:148:3: warning: Argument to kfree() is the address of the local variable 'work', which is not memory allocated by malloc() [clang-analyzer-unix.Malloc] kfree(work); ^ fs/fs-writeback.c:2702:6: note: Assuming the condition is false if (bdi == &noop_backing_dev_info) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fs-writeback.c:2702:2: note: Taking false branch if (bdi == &noop_backing_dev_info) ^ fs/fs-writeback.c:2708:2: note: Calling 'bdi_split_work_to_wbs' bdi_split_work_to_wbs(bdi, &work, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fs-writeback.c:1204:2: note: Loop condition is false. Exiting loop might_sleep(); ^ include/linux/kernel.h:180:29: note: expanded from macro 'might_sleep' # define might_sleep() do { might_resched(); } while (0) ^ include/linux/kernel.h:115:26: note: expanded from macro 'might_resched' # define might_resched() do { } while (0) ^ fs/fs-writeback.c:1204:2: note: Loop condition is false. Exiting loop might_sleep(); ^ include/linux/kernel.h:180:24: note: expanded from macro 'might_sleep' # define might_sleep() do { might_resched(); } while (0) ^ fs/fs-writeback.c:1206:7: note: 'skip_if_busy' is false if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) { ^~~~~~~~~~~~ fs/fs-writeback.c:1206:20: note: Left side of '||' is true if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) { ^ fs/fs-writeback.c:1208:3: note: Calling 'wb_queue_work' wb_queue_work(&bdi->wb, base_work); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fs-writeback.c:163:6: note: Assuming field 'done' is null if (work->done) ^~~~~~~~~~ fs/fs-writeback.c:163:2: note: Taking false branch if (work->done) ^ fs/fs-writeback.c:168:6: note: Assuming the condition is false if (test_bit(WB_registered, &wb->state)) { ^ include/asm-generic/bitops/non-atomic.h:120:18: note: expanded from macro 'test_bit' #define test_bit arch_test_bit ^ fs/fs-writeback.c:168:2: note: Taking false branch if (test_bit(WB_registered, &wb->state)) { ^ fs/fs-writeback.c:172:3: note: Calling 'finish_writeback_work' finish_writeback_work(wb, work); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fs-writeback.c:147:6: note: Assuming field 'auto_free' is not equal to 0 if (work->auto_free) ^~~~~~~~~~~~~~~ fs/fs-writeback.c:147:2: note: Taking true branch if (work->auto_free) ^ fs/fs-writeback.c:148:3: note: Argument to kfree() is the address of the local variable 'work', which is not memory allocated by malloc() kfree(work); ^ ~~~~ Suppressed 47 warnings (47 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 31 warnings generated. Suppressed 31 warnings (31 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. 65 warnings generated. Suppressed 65 warnings (65 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. 30 warnings generated. Suppressed 30 warnings (30 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. Suppressed 46 warnings (46 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. 32 warnings generated. fs/configfs/file.c:270:4: 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(tbuf, buffer->bin_buffer, ^~~~~~ fs/configfs/file.c:270:4: 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(tbuf, buffer->bin_buffer, ^~~~~~ fs/configfs/file.c:276: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(tbuf + buffer->bin_buffer_size, 0, ^~~~~~ fs/configfs/file.c:276: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(tbuf + buffer->bin_buffer_size, 0, ^~~~~~ Suppressed 30 warnings (30 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. 32 warnings generated. fs/configfs/dir.c:1315:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, dentry->d_name.len + 1, "%s", dentry->d_name.name); ^~~~~~~~ fs/configfs/dir.c:1315:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, dentry->d_name.len + 1, "%s", dentry->d_name.name); ^~~~~~~~ Suppressed 31 warnings (31 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. 47 warnings generated. Suppressed 47 warnings (47 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. 49 warnings generated. >> fs/erofs/zdata.c:51:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(pcs->name, "erofs_pcluster-%u", pcs->maxpages); ^~~~~~~ fs/erofs/zdata.c:51:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(pcs->name, "erofs_pcluster-%u", pcs->maxpages); ^~~~~~~ fs/erofs/zdata.c:1167:4: warning: Value stored to 'justfound' is never read [clang-analyzer-deadcode.DeadStores] justfound = 0; ^ ~ fs/erofs/zdata.c:1167:4: note: Value stored to 'justfound' is never read justfound = 0; ^ ~ Suppressed 47 warnings (47 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. 51 warnings generated. fs/zonefs/super.c:724:16: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] iocb->ki_pos += size; ^ fs/zonefs/super.c:914:6: note: Assuming the condition is true if (unlikely(IS_IMMUTABLE(inode))) ^ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ fs/zonefs/super.c:914:2: note: Taking false branch if (unlikely(IS_IMMUTABLE(inode))) ^ fs/zonefs/super.c:917:6: note: Assuming the condition is false if (sb_rdonly(inode->i_sb)) ^~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:917:2: note: Taking false branch if (sb_rdonly(inode->i_sb)) ^ fs/zonefs/super.c:921:6: note: Assuming field 'ki_pos' is < field 'i_max_size' if (iocb->ki_pos >= ZONEFS_I(inode)->i_max_size) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:921:2: note: Taking false branch if (iocb->ki_pos >= ZONEFS_I(inode)->i_max_size) ^ fs/zonefs/super.c:924:6: note: Assuming the condition is true if (iocb->ki_flags & IOCB_DIRECT) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:924:2: note: Taking true branch if (iocb->ki_flags & IOCB_DIRECT) { ^ fs/zonefs/super.c:925:17: note: Calling 'zonefs_file_dio_write' ssize_t ret = zonefs_file_dio_write(iocb, from); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:817:6: note: Assuming field 'i_ztype' is not equal to ZONEFS_ZTYPE_SEQ if (zi->i_ztype == ZONEFS_ZTYPE_SEQ && !sync && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:817:38: note: Left side of '&&' is false if (zi->i_ztype == ZONEFS_ZTYPE_SEQ && !sync && ^ fs/zonefs/super.c:821:6: note: Assuming the condition is true if (iocb->ki_flags & IOCB_NOWAIT) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:821:2: note: Taking true branch if (iocb->ki_flags & IOCB_NOWAIT) { ^ fs/zonefs/super.c:822:7: note: Assuming the condition is false if (!inode_trylock(inode)) ^~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:822:3: note: Taking false branch if (!inode_trylock(inode)) ^ fs/zonefs/super.c:829:6: note: 'count' is > 0 if (count <= 0) { ^~~~~ fs/zonefs/super.c:829:2: note: Taking false branch if (count <= 0) { ^ fs/zonefs/super.c:834:6: note: Assuming the condition is false if ((iocb->ki_pos | count) & (sb->s_blocksize - 1)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:834:2: note: Taking false branch if ((iocb->ki_pos | count) & (sb->s_blocksize - 1)) { ^ fs/zonefs/super.c:840:6: note: Assuming field 'i_ztype' is equal to ZONEFS_ZTYPE_SEQ if (zi->i_ztype == ZONEFS_ZTYPE_SEQ) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:840:2: note: Taking true branch if (zi->i_ztype == ZONEFS_ZTYPE_SEQ) { ^ fs/zonefs/super.c:842:7: note: Assuming field 'ki_pos' is equal to field 'i_wpoffset' if (iocb->ki_pos != zi->i_wpoffset) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:842:3: note: Taking false branch if (iocb->ki_pos != zi->i_wpoffset) { ^ fs/zonefs/super.c:851:6: note: 'append' is true if (append) ^~~~~~ fs/zonefs/super.c:851:2: note: Taking true branch if (append) ^ fs/zonefs/super.c:852:9: note: Calling 'zonefs_file_dio_append' ret = zonefs_file_dio_append(iocb, from); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/zonefs/super.c:683:2: note: 'size' declared without an initial value ssize_t size; -- drivers/dma-buf/udmabuf.c:204:3: note: Taking false branch if (!memfd) ^ drivers/dma-buf/udmabuf.c:207:8: note: Calling 'shmem_mapping' if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/shmem_fs.h:79:2: note: Returning zero, which participates in a condition later return false; ^~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:207:8: note: Returning from 'shmem_mapping' if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) ^~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:207:7: note: Left side of '&&' is true if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) ^ drivers/dma-buf/udmabuf.c:207:35: note: Calling 'is_file_hugepages' if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:484:6: note: Assuming the condition is true if (file->f_op == &hugetlbfs_file_operations) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:484:2: note: Taking true branch if (file->f_op == &hugetlbfs_file_operations) ^ include/linux/hugetlb.h:485:3: note: Returning the value 1, which participates in a condition later return true; ^~~~~~~~~~~ drivers/dma-buf/udmabuf.c:207:35: note: Returning from 'is_file_hugepages' if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:207:3: note: Taking false branch if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) ^ drivers/dma-buf/udmabuf.c:210:7: note: Assuming the condition is false if (seals == -EINVAL) ^~~~~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:210:3: note: Taking false branch if (seals == -EINVAL) ^ drivers/dma-buf/udmabuf.c:213:7: note: Assuming the condition is false if ((seals & SEALS_WANTED) != SEALS_WANTED || ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:213:7: note: Left side of '||' is false drivers/dma-buf/udmabuf.c:214:7: note: Assuming the condition is false (seals & SEALS_DENIED) != 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:213:3: note: Taking false branch if ((seals & SEALS_WANTED) != SEALS_WANTED || ^ drivers/dma-buf/udmabuf.c:218:3: note: Taking false branch if (is_file_hugepages(memfd)) { ^ drivers/dma-buf/udmabuf.c:225:19: note: Assuming 'pgidx' is < 'pgcnt' for (pgidx = 0; pgidx < pgcnt; pgidx++) { ^~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:225:3: note: Loop condition is true. Entering loop body for (pgidx = 0; pgidx < pgcnt; pgidx++) { ^ drivers/dma-buf/udmabuf.c:226:8: note: Calling 'is_file_hugepages' if (is_file_hugepages(memfd)) { ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:484:6: note: Assuming the condition is true if (file->f_op == &hugetlbfs_file_operations) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:484:2: note: Taking true branch if (file->f_op == &hugetlbfs_file_operations) ^ include/linux/hugetlb.h:485:3: note: Returning the value 1, which participates in a condition later return true; ^~~~~~~~~~~ drivers/dma-buf/udmabuf.c:226:8: note: Returning from 'is_file_hugepages' if (is_file_hugepages(memfd)) { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma-buf/udmabuf.c:226:4: note: Taking true branch if (is_file_hugepages(memfd)) { ^ drivers/dma-buf/udmabuf.c:227:10: note: 'hpage' is null if (!hpage) { ^~~~~ drivers/dma-buf/udmabuf.c:227:5: note: Taking true branch if (!hpage) { ^ drivers/dma-buf/udmabuf.c:230:10: note: Assuming 'hpage' is non-null if (!hpage) { ^~~~~~ drivers/dma-buf/udmabuf.c:230:6: note: Taking false branch if (!hpage) { ^ drivers/dma-buf/udmabuf.c:235:18: note: The right operand of '+' is a garbage value page = hpage + subpgoff; ^ ~~~~~~~~ Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/freevxfs/vxfs_fshead.c:87:3: 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(fhp, bp->b_data, sizeof(*fhp)); ^~~~~~ fs/freevxfs/vxfs_fshead.c:87:3: 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(fhp, bp->b_data, sizeof(*fhp)); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/freevxfs/vxfs_immed.c:73: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(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE); ^~~~~~ fs/freevxfs/vxfs_immed.c:73: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(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 19 warnings generated. drivers/pps/sysfs.c:26:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld.%09d#%d\n", ^~~~~~~ drivers/pps/sysfs.c:26:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld.%09d#%d\n", ^~~~~~~ drivers/pps/sysfs.c:40:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld.%09d#%d\n", ^~~~~~~ drivers/pps/sysfs.c:40:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld.%09d#%d\n", ^~~~~~~ drivers/pps/sysfs.c:51:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%4x\n", pps->info.mode); ^~~~~~~ drivers/pps/sysfs.c:51:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%4x\n", pps->info.mode); ^~~~~~~ drivers/pps/sysfs.c:60:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !!pps->info.echo); ^~~~~~~ drivers/pps/sysfs.c:60:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !!pps->info.echo); ^~~~~~~ drivers/pps/sysfs.c:69:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", pps->info.name); ^~~~~~~ drivers/pps/sysfs.c:69:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", pps->info.name); ^~~~~~~ drivers/pps/sysfs.c:78:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", pps->info.path); ^~~~~~~ drivers/pps/sysfs.c:78:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", pps->info.path); ^~~~~~~ Suppressed 13 warnings (13 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. 12 warnings generated. Suppressed 12 warnings (12 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. 9 warnings generated. Suppressed 9 warnings (9 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. 15 warnings generated. lib/usercopy.c:19: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(to + (n - res), 0, res); ^~~~~~ lib/usercopy.c:19: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(to + (n - res), 0, res); ^~~~~~ Suppressed 14 warnings (14 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. 47 warnings generated. drivers/regulator/helpers.c:963:6: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] sel <<= ffs(rdev->desc->ramp_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/helpers.c:951:14: note: Assuming field 'n_ramp_values' is not equal to 0 if (WARN_ON(!rdev->desc->n_ramp_values || !rdev->desc->ramp_delay_table)) ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ drivers/regulator/helpers.c:951:14: note: Left side of '||' is false if (WARN_ON(!rdev->desc->n_ramp_values || !rdev->desc->ramp_delay_table)) ^ drivers/regulator/helpers.c:951:44: note: Assuming field 'ramp_delay_table' is non-null if (WARN_ON(!rdev->desc->n_ramp_values || !rdev->desc->ramp_delay_table)) ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ drivers/regulator/helpers.c:951:2: note: Taking false branch if (WARN_ON(!rdev->desc->n_ramp_values || !rdev->desc->ramp_delay_table)) ^ drivers/regulator/helpers.c:957:6: note: 'ret' is 0 if (ret) { ^~~ drivers/regulator/helpers.c:957:2: note: Taking false branch if (ret) { ^ drivers/regulator/helpers.c:963:6: note: Assigned value is garbage or undefined sel <<= ffs(rdev->desc->ramp_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> drivers/leds/trigger/ledtrig-backlight.c:65:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", n->invert); ^~~~~~~ drivers/leds/trigger/ledtrig-backlight.c:65:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", n->invert); ^~~~~~~ Suppressed 46 warnings (46 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. 39 warnings generated. drivers/leds/trigger/ledtrig-gpio.c:53:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", gpio_data->desired_brightness); ^~~~~~~ drivers/leds/trigger/ledtrig-gpio.c:53:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", gpio_data->desired_brightness); ^~~~~~~ drivers/leds/trigger/ledtrig-gpio.c:63:8: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sscanf(buf, "%u", &desired_brightness); ^~~~~~ drivers/leds/trigger/ledtrig-gpio.c:63:8: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 ret = sscanf(buf, "%u", &desired_brightness); ^~~~~~ drivers/leds/trigger/ledtrig-gpio.c:81:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", gpio_data->inverted); ^~~~~~~ drivers/leds/trigger/ledtrig-gpio.c:81:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", gpio_data->inverted); ^~~~~~~ drivers/leds/trigger/ledtrig-gpio.c:115:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", gpio_data->gpio); ^~~~~~~ drivers/leds/trigger/ledtrig-gpio.c:115:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", gpio_data->gpio); ^~~~~~~ drivers/leds/trigger/ledtrig-gpio.c:126:8: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sscanf(buf, "%u", &gpio); ^~~~~~ drivers/leds/trigger/ledtrig-gpio.c:126:8: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 ret = sscanf(buf, "%u", &gpio); ^~~~~~ Suppressed 34 warnings (34 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. 16 warnings generated. lib/lz4/lz4hc_compress.c:63: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((void *)hc4->hashTable, 0, sizeof(hc4->hashTable)); ^~~~~~ lib/lz4/lz4hc_compress.c:63: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((void *)hc4->hashTable, 0, sizeof(hc4->hashTable)); ^~~~~~ lib/lz4/lz4hc_compress.c:64: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(hc4->chainTable, 0xFF, sizeof(hc4->chainTable)); ^~~~~~ lib/lz4/lz4hc_compress.c:64: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(hc4->chainTable, 0xFF, sizeof(hc4->chainTable)); ^~~~~~ lib/lz4/lz4hc_compress.c:573:3: 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] LZ4_memcpy(op, anchor, iend - anchor); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4hc_compress.c:573:3: 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 LZ4_memcpy(op, anchor, iend - anchor); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4hc_compress.c:750:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(safeBuffer, streamPtr->end - dictSize, dictSize); ^~~~~~~ lib/lz4/lz4hc_compress.c:750:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(safeBuffer, streamPtr->end - dictSize, dictSize); ^~~~~~~ Suppressed 12 warnings (12 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. 23 warnings generated. lib/lz4/lz4_decompress.c:156:4: 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] LZ4_memcpy(op, ip, endOnInput ? 16 : 8); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_decompress.c:156:4: 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 LZ4_memcpy(op, ip, endOnInput ? 16 : 8); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_decompress.c:175:5: 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] LZ4_memcpy(op + 0, match + 0, 8); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_decompress.c:175:5: 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 LZ4_memcpy(op + 0, match + 0, 8); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_decompress.c:176:5: 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] LZ4_memcpy(op + 8, match + 8, 8); -- drivers/mfd/wm831x-irq.c:517:7: note: Assuming 'primary' is equal to WM831X_GP_INT if (primary == WM831X_GP_INT && ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:517:7: note: Left side of '&&' is true drivers/mfd/wm831x-irq.c:518:7: note: Assuming the condition is true wm831x->gpio_level_high[i - WM831X_IRQ_GPIO_1]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:517:3: note: Taking true branch if (primary == WM831X_GP_INT && ^ drivers/mfd/wm831x-irq.c:520:19: note: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'int' while (ret & 1 << (i - WM831X_IRQ_GPIO_1)) { ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:531:21: warning: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'int' [clang-analyzer-core.UndefinedBinaryOperatorResult] while (!(ret & 1 << (i - WM831X_IRQ_GPIO_1))) { ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:459:6: note: Assuming 'primary' is >= 0 if (primary < 0) { ^~~~~~~~~~~ drivers/mfd/wm831x-irq.c:459:2: note: Taking false branch if (primary < 0) { ^ drivers/mfd/wm831x-irq.c:470:6: note: Assuming the condition is false if (primary & WM831X_TCHPD_INT) ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:470:2: note: Taking false branch if (primary & WM831X_TCHPD_INT) ^ drivers/mfd/wm831x-irq.c:473:6: note: Assuming the condition is false if (primary & WM831X_TCHDATA_INT) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:473:2: note: Taking false branch if (primary & WM831X_TCHDATA_INT) ^ drivers/mfd/wm831x-irq.c:478:2: note: Loop condition is true. Entering loop body for (i = 0; i < ARRAY_SIZE(wm831x_irqs); i++) { ^ drivers/mfd/wm831x-irq.c:481:7: note: Assuming the condition is false if (!(primary & wm831x_irqs[i].primary)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:481:3: note: Taking false branch if (!(primary & wm831x_irqs[i].primary)) ^ drivers/mfd/wm831x-irq.c:488:7: note: Assuming the condition is false if (!read[offset]) { ^~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:488:3: note: Taking false branch if (!read[offset]) { ^ drivers/mfd/wm831x-irq.c:510:7: note: Assuming the condition is false if (*status & wm831x_irqs[i].mask) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:510:3: note: Taking false branch if (*status & wm831x_irqs[i].mask) ^ drivers/mfd/wm831x-irq.c:517:7: note: Assuming 'primary' is equal to WM831X_GP_INT if (primary == WM831X_GP_INT && ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:517:7: note: Left side of '&&' is true drivers/mfd/wm831x-irq.c:518:7: note: Assuming the condition is false wm831x->gpio_level_high[i - WM831X_IRQ_GPIO_1]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:517:3: note: Taking false branch if (primary == WM831X_GP_INT && ^ drivers/mfd/wm831x-irq.c:528:7: note: 'primary' is equal to WM831X_GP_INT if (primary == WM831X_GP_INT && ^~~~~~~ drivers/mfd/wm831x-irq.c:528:7: note: Left side of '&&' is true drivers/mfd/wm831x-irq.c:529:7: note: Assuming the condition is true wm831x->gpio_level_low[i - WM831X_IRQ_GPIO_1]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/wm831x-irq.c:528:3: note: Taking true branch if (primary == WM831X_GP_INT && ^ drivers/mfd/wm831x-irq.c:531:21: note: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'int' while (!(ret & 1 << (i - WM831X_IRQ_GPIO_1))) { ^ ~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. fs/locks.c:325: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(fl, 0, sizeof(struct file_lock)); ^~~~~~ fs/locks.c:325: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(fl, 0, sizeof(struct file_lock)); ^~~~~~ fs/locks.c:2415:3: warning: Value stored to 'cmd' is never read [clang-analyzer-deadcode.DeadStores] cmd = F_GETLK64; ^ fs/locks.c:2415:3: note: Value stored to 'cmd' is never read Suppressed 34 warnings (34 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. 34 warnings generated. fs/binfmt_flat.c:908: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(&bprm, 0, sizeof(bprm)); ^~~~~~ fs/binfmt_flat.c:908: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(&bprm, 0, sizeof(bprm)); ^~~~~~ >> fs/binfmt_flat.c:911:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf, "/lib/lib%d.so", id); ^~~~~~~ fs/binfmt_flat.c:911:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf, "/lib/lib%d.so", id); ^~~~~~~ fs/binfmt_flat.c:948: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(&libinfo, 0, sizeof(libinfo)); ^~~~~~ fs/binfmt_flat.c:948: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(&libinfo, 0, sizeof(libinfo)); ^~~~~~ Suppressed 31 warnings (31 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. 30 warnings generated. Suppressed 30 warnings (30 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. 25 warnings generated. drivers/pwm/sysfs.c:45:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%llu\n", state.period); ^~~~~~~ drivers/pwm/sysfs.c:45:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%llu\n", state.period); ^~~~~~~ drivers/pwm/sysfs.c:80:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%llu\n", state.duty_cycle); ^~~~~~~ drivers/pwm/sysfs.c:80:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%llu\n", state.duty_cycle); ^~~~~~~ drivers/pwm/sysfs.c:115:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", state.enabled); ^~~~~~~ drivers/pwm/sysfs.c:115:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", state.enabled); ^~~~~~~ drivers/pwm/sysfs.c:174:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", polarity); ^~~~~~~ drivers/pwm/sysfs.c:174:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", polarity); ^~~~~~~ drivers/pwm/sysfs.c:215:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u %u\n", result.period, result.duty_cycle); ^~~~~~~ drivers/pwm/sysfs.c:215:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u %u\n", result.period, result.duty_cycle); ^~~~~~~ drivers/pwm/sysfs.c:364:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", chip->npwm); ^~~~~~~ drivers/pwm/sysfs.c:364:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", chip->npwm); ^~~~~~~ Suppressed 19 warnings (19 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. 48 warnings generated. fs/iomap/direct-io.c:405:4: 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(iomap_inline_data(iomap, size), 0, pos - size); ^~~~~~ fs/iomap/direct-io.c:405:4: 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(iomap_inline_data(iomap, size), 0, pos - size); ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 47 warnings generated. Suppressed 47 warnings (46 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 33 warnings generated. fs/kernfs/symlink.c:76:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(s, "../"); ^~~~~~ fs/kernfs/symlink.c:76:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(s, "../"); ^~~~~~ fs/kernfs/symlink.c:101:3: 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(s + len, kn->name, slen); ^~~~~~ fs/kernfs/symlink.c:101:3: 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(s + len, kn->name, slen); ^~~~~~ Suppressed 31 warnings (31 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. 59 warnings generated. kernel/workqueue.c:1962:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(id_buf, sizeof(id_buf), "%d:%d%s", pool->cpu, id, -- ^~~~~~~~ kernel/trace/trace.c:6129:6: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%s\n", tr->current_trace->name); ^~~~~~~ kernel/trace/trace.c:6129:6: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 r = sprintf(buf, "%s\n", tr->current_trace->name); ^~~~~~~ kernel/trace/trace.c:6470:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = snprintf(buf, sizeof(buf), "%ld\n", ^~~~~~~~ kernel/trace/trace.c:6470:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 r = snprintf(buf, sizeof(buf), "%ld\n", ^~~~~~~~ kernel/trace/trace.c:6958:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%lu (expanded: %lu)\n", ^~~~~~~ kernel/trace/trace.c:6958:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%lu (expanded: %lu)\n", ^~~~~~~ kernel/trace/trace.c:6962:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%lu\n", size >> 10); ^~~~~~~ kernel/trace/trace.c:6962:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%lu\n", size >> 10); ^~~~~~~ kernel/trace/trace.c:6964:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "X\n"); ^~~~~~~ kernel/trace/trace.c:6964:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "X\n"); ^~~~~~~ kernel/trace/trace.c:6966:7: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%lu\n", per_cpu_ptr(tr->array_buffer.data, cpu)->entries >> 10); ^~~~~~~ kernel/trace/trace.c:6966:7: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%lu\n", per_cpu_ptr(tr->array_buffer.data, cpu)->entries >> 10); ^~~~~~~ kernel/trace/trace.c:7018:7: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%lu\n", size); ^~~~~~~ kernel/trace/trace.c:7018:7: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%lu\n", size); ^~~~~~~ kernel/trace/trace.c:7020:7: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%lu (expanded: %lu)\n", size, expanded_size); ^~~~~~~ kernel/trace/trace.c:7020:7: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%lu (expanded: %lu)\n", size, expanded_size); ^~~~~~~ kernel/trace/trace.c:7102:3: 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(&entry->buf, FAULTED_STR, FAULTED_SIZE); ^~~~~~ kernel/trace/trace.c:7102:3: 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(&entry->buf, FAULTED_STR, FAULTED_SIZE); ^~~~~~ kernel/trace/trace.c:7178:3: 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(&entry->buf, FAULTED_STR, FAULTED_SIZE); ^~~~~~ kernel/trace/trace.c:7178:3: 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(&entry->buf, FAULTED_STR, FAULTED_SIZE); ^~~~~~ kernel/trace/trace.c:7703:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, sizeof(buf), "%llu\n", val); ^~~~~~~~ kernel/trace/trace.c:7703:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, sizeof(buf), "%llu\n", val); ^~~~~~~~ kernel/trace/trace.c:7824:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(err->loc, TRACING_LOG_LOC_MAX, "%s: error: ", loc); ^~~~~~~~ kernel/trace/trace.c:7824:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(err->loc, TRACING_LOG_LOC_MAX, "%s: error: ", loc); ^~~~~~~~ kernel/trace/trace.c:7825:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(err->cmd, MAX_FILTER_STR_VAL,"\n" CMD_PREFIX "%s\n", cmd); ^~~~~~~~ kernel/trace/trace.c:7825:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(err->cmd, MAX_FILTER_STR_VAL,"\n" CMD_PREFIX "%s\n", cmd); ^~~~~~~~ kernel/trace/trace.c:8590:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(cpu_dir, 30, "cpu%ld", cpu); ^~~~~~~~ kernel/trace/trace.c:8590:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(cpu_dir, 30, "cpu%ld", cpu); ^~~~~~~~ kernel/trace/trace.c:8931:6: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%d\n", r); ^~~~~~~ kernel/trace/trace.c:8931:6: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%d\n", r); ^~~~~~~ kernel/trace/trace.c:8987:6: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] r = sprintf(buf, "%d\n", r); ^~~~~~~ kernel/trace/trace.c:8987:6: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 r = sprintf(buf, "%d\n", r); ^~~~~~~ Suppressed 48 warnings (47 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 48 warnings generated. >> kernel/module_decompress.c:26: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(new_pages, info->pages, info->max_pages * sizeof(info->pages)); ^~~~~~ kernel/module_decompress.c:26: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(new_pages, info->pages, info->max_pages * sizeof(info->pages)); ^~~~~~ kernel/module_decompress.c:215:2: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores] error = module_extend_max_pages(info, n_pages); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/module_decompress.c:215:2: note: Value stored to 'error' is never read error = module_extend_max_pages(info, n_pages); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 13 warnings generated. >> kernel/module_signing.c:31: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(&ms, mod + (modlen - sizeof(ms)), sizeof(ms)); ^~~~~~ kernel/module_signing.c:31: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(&ms, mod + (modlen - sizeof(ms)), sizeof(ms)); ^~~~~~ Suppressed 12 warnings (12 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. 89 warnings generated. kernel/kallsyms.c:454:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buffer, "0x%lx", address - symbol_offset); ^~~~~~~ kernel/kallsyms.c:454:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buffer, "0x%lx", address - symbol_offset); ^~~~~~~ kernel/kallsyms.c:457:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(buffer, name); ^~~~~~ kernel/kallsyms.c:457:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(buffer, name); ^~~~~~ kernel/kallsyms.c:462:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buffer + len, "+%#lx/%#lx", offset, size); ^~~~~~~ kernel/kallsyms.c:462:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buffer + len, "+%#lx/%#lx", offset, size); ^~~~~~~ kernel/kallsyms.c:465:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buffer + len, " [%s", modname); ^~~~~~~ kernel/kallsyms.c:465:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 len += sprintf(buffer + len, " [%s", modname); ^~~~~~~ kernel/kallsyms.c:475:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buffer + len, "]"); ^~~~~~~ kernel/kallsyms.c:475:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buffer + len, "]"); ^~~~~~~ Suppressed 84 warnings (83 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 36 warnings generated. drivers/char/ipmi/ipmi_plat_data.c:21: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(pr, 0, sizeof(pr)); ^~~~~~ drivers/char/ipmi/ipmi_plat_data.c:21: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(pr, 0, sizeof(pr)); ^~~~~~ drivers/char/ipmi/ipmi_plat_data.c:22: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(r, 0, sizeof(r)); ^~~~~~ drivers/char/ipmi/ipmi_plat_data.c:22: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(r, 0, sizeof(r)); ^~~~~~ Suppressed 34 warnings (34 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. 31 warnings generated. Suppressed 31 warnings (31 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. 13 warnings generated. Suppressed 13 warnings (13 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. 19 warnings generated. Suppressed 19 warnings (19 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. 19 warnings generated. Suppressed 19 warnings (19 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. >> drivers/firmware/efi/efi-pstore.c:60:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(name, "dump-type%u-%u-%d-%llu-%c", ^~~~~~ drivers/firmware/efi/efi-pstore.c:60:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(name, "dump-type%u-%u-%d-%llu-%c", ^~~~~~ drivers/firmware/efi/efi-pstore.c:72:13: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] } else if (sscanf(name, "dump-type%u-%u-%d-%llu", ^~~~~~ drivers/firmware/efi/efi-pstore.c:72:13: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 } else if (sscanf(name, "dump-type%u-%u-%d-%llu", ^~~~~~ drivers/firmware/efi/efi-pstore.c:81:13: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] } else if (sscanf(name, "dump-type%u-%u-%llu", ^~~~~~ drivers/firmware/efi/efi-pstore.c:81:13: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 } else if (sscanf(name, "dump-type%u-%u-%llu", ^~~~~~ >> drivers/firmware/efi/efi-pstore.c:102: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(record->buf, entry->var.Data, ^~~~~~ drivers/firmware/efi/efi-pstore.c:102: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(record->buf, entry->var.Data, ^~~~~~ >> drivers/firmware/efi/efi-pstore.c:258: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(name, 0, sizeof(name)); ^~~~~~ drivers/firmware/efi/efi-pstore.c:258: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(name, 0, sizeof(name)); ^~~~~~ >> drivers/firmware/efi/efi-pstore.c:260:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "dump-type%u-%u-%d-%lld-%c", ^~~~~~~~ drivers/firmware/efi/efi-pstore.c:260:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "dump-type%u-%u-%d-%lld-%c", ^~~~~~~~ drivers/firmware/efi/efi-pstore.c:338:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "dump-type%u-%u-%d-%lld", ^~~~~~~~ drivers/firmware/efi/efi-pstore.c:338:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "dump-type%u-%u-%d-%lld", ^~~~~~~~ drivers/firmware/efi/efi-pstore.c:345:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "dump-type%u-%u-%lld", ^~~~~~~~ drivers/firmware/efi/efi-pstore.c:345:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "dump-type%u-%u-%lld", ^~~~~~~~ drivers/firmware/efi/efi-pstore.c:373: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(entry->var.VariableName, name, name_size); ^~~~~~ drivers/firmware/efi/efi-pstore.c:373: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(entry->var.VariableName, name, name_size); ^~~~~~ drivers/firmware/efi/efi-pstore.c:391: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(entry->var.VariableName, name, name_size); ^~~~~~ drivers/firmware/efi/efi-pstore.c:391: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(entry->var.VariableName, name, name_size); ^~~~~~ drivers/firmware/efi/efi-pstore.c:392: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(&(entry->var.VendorGuid), &vendor, sizeof(efi_guid_t)); ^~~~~~ drivers/firmware/efi/efi-pstore.c:392: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(&(entry->var.VendorGuid), &vendor, sizeof(efi_guid_t)); ^~~~~~ Suppressed 35 warnings (35 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. 50 warnings generated. Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 49 warnings generated. fs/jbd2/transaction.c:951: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(jh->b_frozen_data, source + offset, bh->b_size); ^~~~~~ fs/jbd2/transaction.c:951: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(jh->b_frozen_data, source + offset, bh->b_size); ^~~~~~ fs/jbd2/transaction.c:1409:3: 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(jh->b_committed_data, bh->b_data, bh->b_size); ^~~~~~ fs/jbd2/transaction.c:1409:3: 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(jh->b_committed_data, bh->b_data, bh->b_size); ^~~~~~ Suppressed 47 warnings (47 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. 49 warnings generated. fs/jbd2/commit.c:606:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = 0; ^ ~ fs/jbd2/commit.c:606:2: note: Value stored to 'err' is never read err = 0; ^ ~ fs/jbd2/commit.c:723:4: 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 (tagp, journal->j_uuid, 16); ^~~~~~ fs/jbd2/commit.c:723:4: 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 (tagp, journal->j_uuid, 16); ^~~~~~ Suppressed 47 warnings (47 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. 52 warnings generated. fs/jbd2/recovery.c:209:3: 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(&tag, tagp, sizeof(tag)); ^~~~~~ fs/jbd2/recovery.c:209:3: 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(&tag, tagp, sizeof(tag)); ^~~~~~ fs/jbd2/recovery.c:290: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(&info, 0, sizeof(info)); ^~~~~~ fs/jbd2/recovery.c:290: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(&info, 0, sizeof(info)); ^~~~~~ fs/jbd2/recovery.c:354: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 (&info, 0, sizeof(info)); ^~~~~~ fs/jbd2/recovery.c:354: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 (&info, 0, sizeof(info)); ^~~~~~ fs/jbd2/recovery.c:616:5: 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(&tag, tagp, sizeof(tag)); ^~~~~~ fs/jbd2/recovery.c:616:5: 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(&tag, tagp, sizeof(tag)); ^~~~~~ fs/jbd2/recovery.c:678:6: 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(nbh->b_data, obh->b_data, ^~~~~~ fs/jbd2/recovery.c:678:6: 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(nbh->b_data, obh->b_data, ^~~~~~ Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 48 warnings generated. >> drivers/firmware/efi/efi.c:127:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] str += sprintf(str, "ACPI20=0x%lx\n", efi.acpi20); ^~~~~~~ drivers/firmware/efi/efi.c:127:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 str += sprintf(str, "ACPI20=0x%lx\n", efi.acpi20); ^~~~~~~ drivers/firmware/efi/efi.c:129:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] str += sprintf(str, "ACPI=0x%lx\n", efi.acpi); ^~~~~~~ drivers/firmware/efi/efi.c:129:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 str += sprintf(str, "ACPI=0x%lx\n", efi.acpi); ^~~~~~~ drivers/firmware/efi/efi.c:136:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3); ^~~~~~~ drivers/firmware/efi/efi.c:136:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3); ^~~~~~~ drivers/firmware/efi/efi.c:138:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios); ^~~~~~~ drivers/firmware/efi/efi.c:138:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios); ^~~~~~~ drivers/firmware/efi/efi.c:151:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", efi_enabled(EFI_64BIT) ? 64 : 32); ^~~~~~~ drivers/firmware/efi/efi.c:151:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", efi_enabled(EFI_64BIT) ? 64 : 32); ^~~~~~~ >> drivers/firmware/efi/efi.c:322:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "boot_services_code%d", ^~~~~~~~ drivers/firmware/efi/efi.c:322:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "boot_services_code%d", ^~~~~~~~ drivers/firmware/efi/efi.c:326:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "boot_services_data%d", ^~~~~~~~ drivers/firmware/efi/efi.c:326:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "boot_services_data%d", ^~~~~~~~ >> drivers/firmware/efi/efi.c:468:4: 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(out_md, md, sizeof(*out_md)); ^~~~~~ drivers/firmware/efi/efi.c:468:4: 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(out_md, md, sizeof(*out_md)); ^~~~~~ drivers/firmware/efi/efi.c:761:14: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] type_len = snprintf(pos, size, "[type=%u", md->type); ^~~~~~~~ drivers/firmware/efi/efi.c:761:14: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 type_len = snprintf(pos, size, "[type=%u", md->type); ^~~~~~~~ drivers/firmware/efi/efi.c:763:14: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] type_len = snprintf(pos, size, "[%-*s", ^~~~~~~~ drivers/firmware/efi/efi.c:763:14: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 type_len = snprintf(pos, size, "[%-*s", ^~~~~~~~ drivers/firmware/efi/efi.c:778:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(pos, size, "|attr=0x%016llx]", ^~~~~~~~ drivers/firmware/efi/efi.c:778:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(pos, size, "|attr=0x%016llx]", ^~~~~~~~ drivers/firmware/efi/efi.c:781:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(pos, size, ^~~~~~~~ drivers/firmware/efi/efi.c:781:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(pos, size, ^~~~~~~~ Suppressed 36 warnings (35 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 12 warnings generated. Suppressed 12 warnings (12 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. 15 warnings generated. lib/xz/xz_dec_stream.c:162: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(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size); ^~~~~~ lib/xz/xz_dec_stream.c:162: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(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size); ^~~~~~ lib/xz/xz_dec_stream.c:822: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] memzero(&s->block, sizeof(s->block)); ^ lib/xz/xz_private.h:44:30: note: expanded from macro 'memzero' # define memzero(buf, size) memset(buf, 0, size) ^~~~~~ lib/xz/xz_dec_stream.c:822: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 memzero(&s->block, sizeof(s->block)); ^ lib/xz/xz_private.h:44:30: note: expanded from macro 'memzero' # define memzero(buf, size) memset(buf, 0, size) ^~~~~~ lib/xz/xz_dec_stream.c:823: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] memzero(&s->index, sizeof(s->index)); ^ lib/xz/xz_private.h:44:30: note: expanded from macro 'memzero' # define memzero(buf, size) memset(buf, 0, size) ^~~~~~ lib/xz/xz_dec_stream.c:823: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 memzero(&s->index, sizeof(s->index)); ^ lib/xz/xz_private.h:44:30: note: expanded from macro 'memzero' # define memzero(buf, size) memset(buf, 0, size) ^~~~~~ Suppressed 12 warnings (12 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. 19 warnings generated. lib/xz/xz_dec_lzma2.c:401:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(dict->buf + dict->pos, b->in + b->in_pos, copy_size); ^~~~~~~ lib/xz/xz_dec_lzma2.c:401:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(dict->buf + dict->pos, b->in + b->in_pos, copy_size); ^~~~~~~ lib/xz/xz_dec_lzma2.c:415:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(b->out + b->out_pos, b->in + b->in_pos, ^~~~~~~ lib/xz/xz_dec_lzma2.c:415:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(b->out + b->out_pos, b->in + b->in_pos, ^~~~~~~ lib/xz/xz_dec_lzma2.c:456:4: 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(b->out + b->out_pos, dict->buf + dict->start, ^~~~~~ lib/xz/xz_dec_lzma2.c:456:4: 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(b->out + b->out_pos, dict->buf + dict->start, ^~~~~~ lib/xz/xz_dec_lzma2.c:892:3: 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(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp); ^~~~~~ lib/xz/xz_dec_lzma2.c:892:3: 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(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp); ^~~~~~ lib/xz/xz_dec_lzma2.c:895:4: 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] memzero(s->temp.buf + s->temp.size + tmp, ^ lib/xz/xz_private.h:44:30: note: expanded from macro 'memzero' # define memzero(buf, size) memset(buf, 0, size) ^~~~~~ lib/xz/xz_dec_lzma2.c:895:4: 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 memzero(s->temp.buf + s->temp.size + tmp, -- kernel/time/clocksource.c:1359:9: note: Calling 'clocksource_unbind' ret = clocksource_unbind(cs); ^~~~~~~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:1219:2: note: Taking false branch if (clocksource_is_watchdog(cs)) { ^ kernel/time/clocksource.c:1226:6: note: Assuming 'cs' is equal to 'curr_clocksource' if (cs == curr_clocksource) { ^~~~~~~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:1226:2: note: Taking true branch if (cs == curr_clocksource) { ^ kernel/time/clocksource.c:1229:7: note: Assuming 'curr_clocksource' is not equal to 'cs' if (curr_clocksource == cs) ^~~~~~~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:1229:3: note: Taking false branch if (curr_clocksource == cs) ^ kernel/time/clocksource.c:1233:6: note: Assuming the condition is true if (clocksource_is_suspend(cs)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:1233:2: note: Taking true branch if (clocksource_is_suspend(cs)) { ^ kernel/time/clocksource.c:1239:3: note: Calling 'clocksource_suspend_select' clocksource_suspend_select(true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:713:6: note: 'fallback' is true if (fallback) ^~~~~~~~ kernel/time/clocksource.c:713:2: note: Taking true branch if (fallback) ^ kernel/time/clocksource.c:716:22: note: Null pointer value stored to 'cs' list_for_each_entry(cs, &clocksource_list, list) { ^ include/linux/list.h:638:7: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:716:2: note: Loop condition is true. Entering loop body list_for_each_entry(cs, &clocksource_list, list) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ kernel/time/clocksource.c:718:7: note: 'fallback' is true if (fallback && cs == old_suspend) ^~~~~~~~ kernel/time/clocksource.c:718:7: note: Left side of '&&' is true kernel/time/clocksource.c:718:19: note: Assuming 'cs' is equal to 'old_suspend' if (fallback && cs == old_suspend) ^~~~~~~~~~~~~~~~~ kernel/time/clocksource.c:718:3: note: Taking true branch if (fallback && cs == old_suspend) ^ kernel/time/clocksource.c:719:4: note: Execution continues on line 716 continue; ^ kernel/time/clocksource.c:716:2: note: Dereference of null pointer list_for_each_entry(cs, &clocksource_list, list) { ^ include/linux/list.h:640:13: note: expanded from macro 'list_for_each_entry' pos = list_next_entry(pos, member)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:18:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~~~ kernel/time/clocksource.c:1282:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] count = snprintf(buf, PAGE_SIZE, "%s\n", curr_clocksource->name); ^~~~~~~~ kernel/time/clocksource.c:1282:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 count = snprintf(buf, PAGE_SIZE, "%s\n", curr_clocksource->name); ^~~~~~~~ kernel/time/clocksource.c:1300:3: 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(dst, buf, cnt); ^~~~~~ kernel/time/clocksource.c:1300:3: 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, buf, cnt); ^~~~~~ kernel/time/clocksource.c:1391:13: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] count += snprintf(buf + count, ^~~~~~~~ kernel/time/clocksource.c:1391:13: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 count += snprintf(buf + count, ^~~~~~~~ kernel/time/clocksource.c:1397:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] count += snprintf(buf + count, ^~~~~~~~ kernel/time/clocksource.c:1397:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 count += snprintf(buf + count, ^~~~~~~~ Suppressed 23 warnings (23 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. 58 warnings generated. >> drivers/crypto/ccree/cc_cipher.c:321: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(&hki, key, keylen); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:321: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(&hki, key, keylen); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:472: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(ctx_p->user.key, key, keylen); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:472: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(ctx_p->user.key, key, keylen); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:777:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx_p->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_cipher.c:777:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx_p->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_cipher.c:804:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx_p->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_cipher.c:804:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx_p->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_cipher.c:870:3: 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(req->iv, req_ctx->iv, ivsize); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:870:3: 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(req->iv, req_ctx->iv, ivsize); ^~~~~~ >> drivers/crypto/ccree/cc_cipher.c:994: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(req_ctx, 0, sizeof(*req_ctx)); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:994: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(req_ctx, 0, sizeof(*req_ctx)); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:1003: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(req_ctx, 0, sizeof(*req_ctx)); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:1003: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(req_ctx, 0, sizeof(*req_ctx)); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:1428: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(alg, &tmpl->template_skcipher, sizeof(*alg)); ^~~~~~ drivers/crypto/ccree/cc_cipher.c:1428: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(alg, &tmpl->template_skcipher, sizeof(*alg)); ^~~~~~ >> drivers/crypto/ccree/cc_cipher.c:1430:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name); ^~~~~~~~ drivers/crypto/ccree/cc_cipher.c:1430:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name); ^~~~~~~~ drivers/crypto/ccree/cc_cipher.c:1431:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_cipher.c:1431:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ Suppressed 48 warnings (48 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. 50 warnings generated. >> block/blk-crypto-fallback.c:308: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(curr_dun, bc->bc_dun, sizeof(curr_dun)); ^~~~~~ block/blk-crypto-fallback.c:308: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(curr_dun, bc->bc_dun, sizeof(curr_dun)); ^~~~~~ block/blk-crypto-fallback.c:411: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(curr_dun, bc->bc_dun, sizeof(curr_dun)); ^~~~~~ block/blk-crypto-fallback.c:411: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(curr_dun, bc->bc_dun, sizeof(curr_dun)); ^~~~~~ Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 34 warnings generated. drivers/base/regmap/regmap-mmio.c:52:3: warning: Value stored to 'min_stride' is never read [clang-analyzer-deadcode.DeadStores] min_stride = 0; ^ ~ drivers/base/regmap/regmap-mmio.c:52:3: note: Value stored to 'min_stride' is never read min_stride = 0; ^ ~ Suppressed 33 warnings (33 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. 35 warnings generated. drivers/base/regmap/regmap-irq.c:444: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(data->status_buf, 0, size); ^~~~~~ drivers/base/regmap/regmap-irq.c:444: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(data->status_buf, 0, size); ^~~~~~ Suppressed 34 warnings (34 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. 30 warnings generated. Suppressed 30 warnings (30 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. 40 warnings generated. drivers/virtio/virtio_ring.c:577:2: warning: Array subscript is undefined [clang-analyzer-core.uninitialized.ArraySubscript] desc[prev].flags &= cpu_to_virtio16(_vq->vdev, ~VRING_DESC_F_NEXT); ^ ~~~~ drivers/virtio/virtio_ring.c:490:40: note: 'prev' declared without an initial value unsigned int i, n, avail, descs_used, prev, err_idx; ^~~~ drivers/virtio/virtio_ring.c:496:9: note: Assuming 'data' is not equal to null BUG_ON(data == NULL); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ~~~~~~~~~^~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/virtio/virtio_ring.c:496:2: note: Taking false branch BUG_ON(data == NULL); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ drivers/virtio/virtio_ring.c:496:2: note: Loop condition is false. Exiting loop BUG_ON(data == NULL); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ drivers/virtio/virtio_ring.c:497:9: note: Assuming 'ctx' is null BUG_ON(ctx && vq->indirect); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/virtio/virtio_ring.c:497:13: note: Left side of '&&' is false BUG_ON(ctx && vq->indirect); ^ drivers/virtio/virtio_ring.c:497:2: note: Taking false branch BUG_ON(ctx && vq->indirect); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ drivers/virtio/virtio_ring.c:497:2: note: Loop condition is false. Exiting loop BUG_ON(ctx && vq->indirect); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ drivers/virtio/virtio_ring.c:499:6: note: Assuming field 'broken' is false if (unlikely(vq->broken)) { ^ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ drivers/virtio/virtio_ring.c:499:2: note: Taking false branch if (unlikely(vq->broken)) { -- ^~~~~~ kernel/printk/printk_ringbuffer.c:1729: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(&buf[0], data, data_size); /* LMM(copy_data:A) */ ^~~~~~ kernel/printk/printk_ringbuffer.c:1729: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(&buf[0], data, data_size); /* LMM(copy_data:A) */ ^~~~~~ kernel/printk/printk_ringbuffer.c:1811:3: 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(r->info, info, sizeof(*(r->info))); ^~~~~~ kernel/printk/printk_ringbuffer.c:1811:3: 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(r->info, info, sizeof(*(r->info))); ^~~~~~ kernel/printk/printk_ringbuffer.c:2039: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(descs, 0, _DESCS_COUNT(descbits) * sizeof(descs[0])); ^~~~~~ kernel/printk/printk_ringbuffer.c:2039: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(descs, 0, _DESCS_COUNT(descbits) * sizeof(descs[0])); ^~~~~~ kernel/printk/printk_ringbuffer.c:2040: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(infos, 0, _DESCS_COUNT(descbits) * sizeof(infos[0])); ^~~~~~ kernel/printk/printk_ringbuffer.c:2040: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(infos, 0, _DESCS_COUNT(descbits) * sizeof(infos[0])); ^~~~~~ Suppressed 10 warnings (10 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. 34 warnings generated. Suppressed 34 warnings (34 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. 23 warnings generated. Suppressed 23 warnings (23 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. 22 warnings generated. Suppressed 22 warnings (22 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. 53 warnings generated. drivers/fpga/fpga-mgr.c:447:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", mgr->name); ^~~~~~~ drivers/fpga/fpga-mgr.c:447:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", mgr->name); ^~~~~~~ drivers/fpga/fpga-mgr.c:455:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", state_str[mgr->state]); ^~~~~~~ drivers/fpga/fpga-mgr.c:455:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", state_str[mgr->state]); ^~~~~~~ drivers/fpga/fpga-mgr.c:468:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buf + len, "reconfig operation error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:468:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buf + len, "reconfig operation error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:470:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buf + len, "reconfig CRC error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:470:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buf + len, "reconfig CRC error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:472:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buf + len, "reconfig incompatible image\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:472:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buf + len, "reconfig incompatible image\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:474:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buf + len, "reconfig IP protocol error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:474:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buf + len, "reconfig IP protocol error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:476:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buf + len, "reconfig fifo overflow error\n"); ^~~~~~~ drivers/fpga/fpga-mgr.c:476:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buf + len, "reconfig fifo overflow error\n"); ^~~~~~~ Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 39 warnings generated. kernel/panic.c:408:13: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] s = buf + sprintf(buf, "Tainted: "); ^~~~~~~ kernel/panic.c:408:13: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 s = buf + sprintf(buf, "Tainted: "); ^~~~~~~ kernel/panic.c:416:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "Not tainted"); ^~~~~~~~ kernel/panic.c:416:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "Not tainted"); ^~~~~~~~ Suppressed 37 warnings (34 in non-user code, 3 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 55 warnings generated. >> kernel/cpu.c:2271:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", st->state); ^~~~~~~ kernel/cpu.c:2271:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", st->state); ^~~~~~~ kernel/cpu.c:2319:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", st->target); ^~~~~~~ kernel/cpu.c:2319:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", st->target); ^~~~~~~ kernel/cpu.c:2378:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", st->fail); ^~~~~~~ kernel/cpu.c:2378:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", st->fail); ^~~~~~~ >> kernel/cpu.c:2407:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] cur = sprintf(buf, "%3d: %s\n", i, sp->name); ^~~~~~~ kernel/cpu.c:2407:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 cur = sprintf(buf, "%3d: %s\n", i, sp->name); ^~~~~~~ >> kernel/cpu.c:2493:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE - 2, "%s\n", state); ^~~~~~~~ kernel/cpu.c:2493:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE - 2, "%s\n", state); ^~~~~~~~ kernel/cpu.c:2506:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE - 2, "%d\n", sched_smt_active()); ^~~~~~~~ kernel/cpu.c:2506:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE - 2, "%d\n", sched_smt_active()); ^~~~~~~~ Suppressed 49 warnings (49 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. 66 warnings generated. drivers/bus/mhi/core/init.c:98:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "Serial Number: %u\n", ^~~~~~~~ drivers/bus/mhi/core/init.c:98:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "Serial Number: %u\n", ^~~~~~~~ drivers/bus/mhi/core/init.c:112:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] cnt += snprintf(buf + cnt, PAGE_SIZE - cnt, ^~~~~~~~ drivers/bus/mhi/core/init.c:112:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 cnt += snprintf(buf + cnt, PAGE_SIZE - cnt, ^~~~~~~~ Suppressed 64 warnings (64 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. Suppressed 46 warnings (46 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. 47 warnings generated. fs/debugfs/file.c:1006:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, bufsize, "%u%c", *array++, term); ^~~~~~~~ fs/debugfs/file.c:1006:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, bufsize, "%u%c", *array++, term); ^~~~~~~~ Suppressed 46 warnings (46 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. 32 warnings generated. fs/tracefs/inode.c:65: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(name, dname, len); ^~~~~~ fs/tracefs/inode.c:65: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(name, dname, len); ^~~~~~ Suppressed 31 warnings (31 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. 62 warnings generated. drivers/char/ipmi/ipmi_msghandler.c:98:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buffer, "%s\n", event_str); ^~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:98:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buffer, "%s\n", event_str); ^~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:718:2: warning: Attempt to free released memory [clang-analyzer-unix.Malloc] kfree(intf); ^ drivers/char/ipmi/ipmi_msghandler.c:3479:6: note: Assuming field 'in_shutdown' is false if (!intf->in_shutdown) ^~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:3479:2: note: Taking true branch if (!intf->in_shutdown) ^ drivers/char/ipmi/ipmi_msghandler.c:3480:3: note: Calling 'bmc_get_device_id' bmc_get_device_id(intf, NULL, NULL, NULL, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:2706:9: note: Calling '__bmc_get_device_id' return __bmc_get_device_id(intf, bmc, id, guid_set, guid, -1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:2575:18: note: 'intf' is not equal to NULL bool intf_set = intf != NULL; ^~~~ drivers/char/ipmi/ipmi_msghandler.c:2577:7: note: 'intf' is non-null if (!intf) { ^~~~ drivers/char/ipmi/ipmi_msghandler.c:2577:2: note: Taking false branch if (!intf) { ^ drivers/char/ipmi/ipmi_msghandler.c:2604:6: note: Assuming field 'in_bmc_register' is false if (intf->in_bmc_register || ^~~~~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:2604:6: note: Left side of '||' is false drivers/char/ipmi/ipmi_msghandler.c:2605:7: note: Assuming field 'dyn_id_set' is 0 (bmc->dyn_id_set && time_is_after_jiffies(bmc->dyn_id_expiry))) ^~~~~~~~~~~~~~~ drivers/char/ipmi/ipmi_msghandler.c:2605:23: note: Left side of '&&' is false (bmc->dyn_id_set && time_is_after_jiffies(bmc->dyn_id_expiry))) ^ drivers/char/ipmi/ipmi_msghandler.c:2613:6: note: Assuming 'rv' is not equal to 0 if (rv) ^~ drivers/char/ipmi/ipmi_msghandler.c:2613:2: note: Taking true branch if (rv) ^ drivers/char/ipmi/ipmi_msghandler.c:2614:3: note: Control jumps to line 2668 goto out; ^ drivers/char/ipmi/ipmi_msghandler.c:2668:6: note: 'rv' is not equal to 0 -- ^~~~ lib/iov_iter.c:782:3: 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(addr + off, base, len) ^ lib/iov_iter.c:147:57: note: expanded from macro 'iterate_and_advance' __iterate_and_advance(i, n, base, len, off, I, ((void)(K),0)) ^ lib/iov_iter.c:126:14: note: expanded from macro '__iterate_and_advance' bvec, (K)) \ ^ lib/iov_iter.c:52:11: note: expanded from macro 'iterate_bvec' left = (STEP); \ ^~~~ lib/iov_iter.c:782:3: 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(addr + off, base, len) ^ lib/iov_iter.c:147:57: note: expanded from macro 'iterate_and_advance' __iterate_and_advance(i, n, base, len, off, I, ((void)(K),0)) ^ lib/iov_iter.c:126:14: note: expanded from macro '__iterate_and_advance' bvec, (K)) \ ^ lib/iov_iter.c:52:11: note: expanded from macro 'iterate_bvec' left = (STEP); \ ^~~~ lib/iov_iter.c:929: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(p + off, 0, chunk); ^~~~~~ lib/iov_iter.c:929: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(p + off, 0, chunk); ^~~~~~ lib/iov_iter.c:947: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(base, 0, len) ^ lib/iov_iter.c:147:57: note: expanded from macro 'iterate_and_advance' __iterate_and_advance(i, n, base, len, off, I, ((void)(K),0)) ^ lib/iov_iter.c:126:14: note: expanded from macro '__iterate_and_advance' bvec, (K)) \ ^ lib/iov_iter.c:52:11: note: expanded from macro 'iterate_bvec' left = (STEP); \ ^~~~ lib/iov_iter.c:947: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(base, 0, len) ^ lib/iov_iter.c:147:57: note: expanded from macro 'iterate_and_advance' __iterate_and_advance(i, n, base, len, off, I, ((void)(K),0)) ^ lib/iov_iter.c:126:14: note: expanded from macro '__iterate_and_advance' bvec, (K)) \ ^ lib/iov_iter.c:52:11: note: expanded from macro 'iterate_bvec' left = (STEP); \ ^~~~ lib/iov_iter.c:969:3: 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(p + off, base, len) ^ lib/iov_iter.c:147:57: note: expanded from macro 'iterate_and_advance' __iterate_and_advance(i, n, base, len, off, I, ((void)(K),0)) ^ lib/iov_iter.c:126:14: note: expanded from macro '__iterate_and_advance' bvec, (K)) \ ^ lib/iov_iter.c:52:11: note: expanded from macro 'iterate_bvec' left = (STEP); \ ^~~~ lib/iov_iter.c:969:3: 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(p + off, base, len) ^ lib/iov_iter.c:147:57: note: expanded from macro 'iterate_and_advance' __iterate_and_advance(i, n, base, len, off, I, ((void)(K),0)) ^ lib/iov_iter.c:126:14: note: expanded from macro '__iterate_and_advance' bvec, (K)) \ ^ lib/iov_iter.c:52:11: note: expanded from macro 'iterate_bvec' left = (STEP); \ ^~~~ Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. Suppressed 35 warnings (35 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 38 warnings generated. >> drivers/staging/pi433/rf69.c:867: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(&transfer, 0, sizeof(transfer)); ^~~~~~ drivers/staging/pi433/rf69.c:867: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(&transfer, 0, sizeof(transfer)); ^~~~~~ >> drivers/staging/pi433/rf69.c:879: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(buffer, &local_buffer[1], size); ^~~~~~ drivers/staging/pi433/rf69.c:879: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(buffer, &local_buffer[1], size); ^~~~~~ drivers/staging/pi433/rf69.c:898: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(&local_buffer[1], buffer, size); ^~~~~~ drivers/staging/pi433/rf69.c:898: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(&local_buffer[1], buffer, size); ^~~~~~ Suppressed 35 warnings (35 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. 38 warnings generated. >> drivers/staging/axis-fifo/axis-fifo.c:174:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(tmp, sizeof(tmp), "0x%x\n", read_val); ^~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:174:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(tmp, sizeof(tmp), "0x%x\n", read_val); ^~~~~~~~ >> drivers/staging/axis-fifo/axis-fifo.c:175: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(buf, tmp, len); ^~~~~~ drivers/staging/axis-fifo/axis-fifo.c:175: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(buf, tmp, len); ^~~~~~ drivers/staging/axis-fifo/axis-fifo.c:562:4: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] iowrite32(tmp_buf[i], fifo->base_addr + ^ ~~~~~~~~~~ include/asm-generic/io.h:759:19: note: expanded from macro 'iowrite32' #define iowrite32 iowrite32 ^ drivers/staging/axis-fifo/axis-fifo.c:488:6: note: Assuming the condition is false if (len % sizeof(u32)) { ^~~~~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:488:2: note: Taking false branch if (len % sizeof(u32)) { ^ drivers/staging/axis-fifo/axis-fifo.c:496:6: note: Assuming 'words_to_write' is not equal to 0 if (!words_to_write) { ^~~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:496:2: note: Taking false branch if (!words_to_write) { ^ drivers/staging/axis-fifo/axis-fifo.c:502:6: note: Assuming 'words_to_write' is <= field 'tx_fifo_depth' if (words_to_write > fifo->tx_fifo_depth) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:502:2: note: Taking false branch if (words_to_write > fifo->tx_fifo_depth) { ^ drivers/staging/axis-fifo/axis-fifo.c:508:6: note: Assuming the condition is true if (fifo->write_flags & O_NONBLOCK) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:508:2: note: Taking true branch if (fifo->write_flags & O_NONBLOCK) { ^ drivers/staging/axis-fifo/axis-fifo.c:513:7: note: Assuming the condition is false if (!mutex_trylock(&fifo->write_lock)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:513:3: note: Taking false branch if (!mutex_trylock(&fifo->write_lock)) ^ drivers/staging/axis-fifo/axis-fifo.c:516:7: note: Assuming the condition is false if (words_to_write > ioread32(fifo->base_addr + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:516:3: note: Taking false branch if (words_to_write > ioread32(fifo->base_addr + ^ drivers/staging/axis-fifo/axis-fifo.c:551:9: note: 'words_to_write' is > 0 while (words_to_write > 0) { ^~~~~~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:551:2: note: Loop condition is true. Entering loop body while (words_to_write > 0) { ^ drivers/staging/axis-fifo/axis-fifo.c:552:10: note: Assuming '__UNIQUE_ID___x242' is < '__UNIQUE_ID___y243' copy = min(words_to_write, WRITE_BUF_SIZE); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~~~~~~~~ drivers/staging/axis-fifo/axis-fifo.c:552:10: note: '?' condition is true copy = min(words_to_write, WRITE_BUF_SIZE); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/staging/axis-fifo/axis-fifo.c:554:7: note: Calling 'copy_from_user' if (copy_from_user(tmp_buf, buf + copied * sizeof(u32), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/uaccess.h:191:13: note: Calling 'check_copy_size' if (likely(check_copy_size(to, n, false))) ^ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ include/linux/thread_info.h:221:15: note: Assuming 'sz' is >= 0 if (unlikely(sz >= 0 && sz < bytes)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/thread_info.h:221:15: note: Left side of '&&' is true if (unlikely(sz >= 0 && sz < bytes)) { -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb_cgroup.h:243:2: note: Returning without writing to '*ptr' return 0; ^ include/linux/hugetlb_cgroup.h:243:2: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ mm/hugetlb.c:2892:9: note: Returning from 'hugetlb_cgroup_charge_cgroup_rsvd' ret = hugetlb_cgroup_charge_cgroup_rsvd( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:2894:7: note: 'ret' is 0 if (ret) ^~~ mm/hugetlb.c:2894:3: note: Taking false branch if (ret) ^ mm/hugetlb.c:2898:8: note: Calling 'hugetlb_cgroup_charge_cgroup' ret = hugetlb_cgroup_charge_cgroup(idx, pages_per_huge_page(h), &h_cg); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb_cgroup.h:236:2: note: Returning without writing to '*ptr' return 0; ^ include/linux/hugetlb_cgroup.h:236:2: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ mm/hugetlb.c:2898:8: note: Returning from 'hugetlb_cgroup_charge_cgroup' ret = hugetlb_cgroup_charge_cgroup(idx, pages_per_huge_page(h), &h_cg); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:2899:6: note: 'ret' is 0 if (ret) ^~~ mm/hugetlb.c:2899:2: note: Taking false branch if (ret) ^ mm/hugetlb.c:2909:6: note: Assuming 'page' is null if (!page) { ^~~~~ mm/hugetlb.c:2909:2: note: Taking true branch if (!page) { ^ mm/hugetlb.c:2911:10: note: Calling 'alloc_buddy_huge_page_with_mpol' page = alloc_buddy_huge_page_with_mpol(h, vma, addr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:2260:2: note: Taking false branch if (mpol_is_preferred_many(mpol)) { ^ mm/hugetlb.c:2270:7: note: 'page' is null if (!page) ^~~~ mm/hugetlb.c:2270:2: note: Taking true branch if (!page) ^ mm/hugetlb.c:2273:2: note: Returning pointer (loaded from 'page'), which participates in a condition later return page; ^~~~~~~~~~~ mm/hugetlb.c:2911:10: note: Returning from 'alloc_buddy_huge_page_with_mpol' page = alloc_buddy_huge_page_with_mpol(h, vma, addr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:2912:7: note: Assuming 'page' is null if (!page) ^~~~~ mm/hugetlb.c:2912:3: note: Taking true branch if (!page) ^ mm/hugetlb.c:2913:4: note: Control jumps to line 2957 goto out_uncharge_cgroup; ^ mm/hugetlb.c:2957:2: note: 3rd function call argument is an uninitialized value hugetlb_cgroup_uncharge_cgroup(idx, pages_per_huge_page(h), h_cg); ^ ~~~~ mm/hugetlb.c:3005:12: warning: Access to field 'hstate' results in a dereference of a null pointer (loaded from variable 'm') [clang-analyzer-core.NullDereference] m->hstate = h; ~ ^ mm/hugetlb.c:2973:2: note: 'm' initialized to a null pointer value struct huge_bootmem_page *m = NULL; /* initialize for clang */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:2976:6: note: Assuming the condition is false if (nid != NUMA_NO_NODE && nid >= nr_online_nodes) ^~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:2976:26: note: Left side of '&&' is false if (nid != NUMA_NO_NODE && nid >= nr_online_nodes) ^ mm/hugetlb.c:2979:2: note: Taking false branch if (nid != NUMA_NO_NODE) { ^ mm/hugetlb.c:2987:33: note: Assuming 'nr_nodes' is <= 0 for_each_node_mask_to_alloc(h, nr_nodes, node, &node_states[N_MEMORY]) { ^ mm/hugetlb.c:1294:3: note: expanded from macro 'for_each_node_mask_to_alloc' nr_nodes > 0 && \ ^~~~~~~~~~~~ mm/hugetlb.c:2987:2: note: Left side of '&&' is false for_each_node_mask_to_alloc(h, nr_nodes, node, &node_states[N_MEMORY]) { ^ mm/hugetlb.c:1294:16: note: expanded from macro 'for_each_node_mask_to_alloc' nr_nodes > 0 && \ ^ mm/hugetlb.c:3005:12: note: Access to field 'hstate' results in a dereference of a null pointer (loaded from variable 'm') m->hstate = h; ~ ^ >> mm/hugetlb.c:4103:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB", ^~~~~~~~ mm/hugetlb.c:4103:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB", ^~~~~~~~ >> mm/hugetlb.c:4154:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(p, "%lu%n", &tmp, &count) != 1) ^~~~~~ mm/hugetlb.c:4154:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(p, "%lu%n", &tmp, &count) != 1) ^~~~~~ mm/hugetlb.c:4167:8: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(p, "%lu%n", &tmp, &count) != 1) ^~~~~~ mm/hugetlb.c:4167:8: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(p, "%lu%n", &tmp, &count) != 1) ^~~~~~ mm/hugetlb.c:6889:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(s, "%lu%n", &tmp, &count) != 1) ^~~~~~ mm/hugetlb.c:6889:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(s, "%lu%n", &tmp, &count) != 1) ^~~~~~ mm/hugetlb.c:6990:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "hugetlb%d", nid); ^~~~~~~~ mm/hugetlb.c:6990:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "hugetlb%d", nid); ^~~~~~~~ Suppressed 48 warnings (48 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. 31 warnings generated. Suppressed 31 warnings (31 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. Suppressed 46 warnings (46 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. 54 warnings generated. fs/buffer.c:1923:15: warning: Access to field 'bdev' results in a dereference of a null pointer (loaded from variable 'iomap') [clang-analyzer-core.NullDereference] bh->b_bdev = iomap->bdev; ^ fs/buffer.c:2602:6: note: Assuming 'page' is non-null if (!page) ^~~~~ fs/buffer.c:2602:2: note: Taking false branch if (!page) ^ fs/buffer.c:2607:6: note: Assuming the condition is true if (page_has_buffers(page)) { ^ include/linux/buffer_head.h:146:32: note: expanded from macro 'page_has_buffers' #define page_has_buffers(page) PagePrivate(page) ^~~~~~~~~~~~~~~~~ fs/buffer.c:2607:2: note: Taking true branch if (page_has_buffers(page)) { ^ fs/buffer.c:2608:9: note: Calling '__block_write_begin' ret = __block_write_begin(page, pos, len, get_block); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/buffer.c:2061:12: note: Passing null pointer value via 5th parameter 'iomap' NULL); ^ include/linux/stddef.h:8:14: note: expanded from macro 'NULL' #define NULL ((void *)0) ^~~~~~~~~~~ fs/buffer.c:2060:9: note: Calling '__block_write_begin_int' return __block_write_begin_int(page_folio(page), pos, len, get_block, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/buffer.c:1984:9: note: Assuming the condition is false BUG_ON(!folio_test_locked(folio)); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ fs/buffer.c:1984:2: note: Taking false branch BUG_ON(!folio_test_locked(folio)); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/buffer.c:1984:2: note: Loop condition is false. Exiting loop BUG_ON(!folio_test_locked(folio)); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/buffer.c:1985:2: note: Taking false branch BUG_ON(from > PAGE_SIZE); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/buffer.c:1985:2: note: Loop condition is false. Exiting loop BUG_ON(from > PAGE_SIZE); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/buffer.c:1986:9: note: Assuming the condition is false BUG_ON(to > PAGE_SIZE); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) -- ^~~~~~~~~~ include/linux/sched.h:1633:2: note: Returning the value 32 return fls(state); ^~~~~~~~~~~~~~~~~ include/linux/sched.h:1647:28: note: Returning from 'task_state_index' return task_index_to_char(task_state_index(tsk)); ^~~~~~~~~~~~~~~~~~~~~ include/linux/sched.h:1647:28: note: Passing the value 32 via 1st parameter 'state' return task_index_to_char(task_state_index(tsk)); ^~~~~~~~~~~~~~~~~~~~~ include/linux/sched.h:1647:9: note: Calling 'task_index_to_char' return task_index_to_char(task_state_index(tsk)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/sched.h:1640:19: note: '?' condition is true BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1); ^ include/linux/log2.h:158:2: note: expanded from macro 'ilog2' __builtin_constant_p(n) ? \ ^ include/linux/sched.h:1640:19: note: '?' condition is false BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1); ^ include/linux/log2.h:159:3: note: expanded from macro 'ilog2' ((n) < 2 ? 0 : \ ^ include/linux/sched.h:1640:15: note: Assuming the condition is false BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1); ^ include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON' BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/sched.h:1640:2: note: Taking false branch BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1); ^ include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:326:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ include/linux/sched.h:1640:2: note: Loop condition is false. Exiting loop BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1); ^ include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert' do { \ ^ include/linux/sched.h:1642:2: note: Undefined or garbage value returned to caller return state_char[state]; ^ ~~~~~~~~~~~~~~~~~ kernel/sched/core.c:5510:16: warning: Value stored to 'preempt_disable_ip' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned long preempt_disable_ip = get_preempt_disable_ip(current); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:5510:16: note: Value stored to 'preempt_disable_ip' during its initialization is never read unsigned long preempt_disable_ip = get_preempt_disable_ip(current); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:6295:3: warning: Value stored to 'rq' is never read [clang-analyzer-deadcode.DeadStores] rq = context_switch(rq, prev, next, &rf); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:6295:3: note: Value stored to 'rq' is never read rq = context_switch(rq, prev, next, &rf); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:7651: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(attr, 0, sizeof(*attr)); ^~~~~~ kernel/sched/core.c:7651: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(attr, 0, sizeof(*attr)); ^~~~~~ >> kernel/sched/core.c:8692:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu); ^~~~~~~ kernel/sched/core.c:8692:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu); ^~~~~~~ kernel/sched/core.c:9319:3: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores] ptr += nr_cpu_ids * sizeof(void **); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:9319:3: note: Value stored to 'ptr' is never read ptr += nr_cpu_ids * sizeof(void **); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:10759:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(buf, "%20s %llu", tok, periodp) < 1) ^~~~~~ kernel/sched/core.c:10759:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(buf, "%20s %llu", tok, periodp) < 1) ^~~~~~ kernel/sched/core.c:10764:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(tok, "%llu", quotap)) ^~~~~~ kernel/sched/core.c:10764:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(tok, "%llu", quotap)) ^~~~~~ Suppressed 97 warnings (95 in non-user code, 2 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 39 warnings generated. drivers/of/address.c:89: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(addr, 0, na * 4); ^~~~~~ drivers/of/address.c:89: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(addr, 0, na * 4); ^~~~~~ drivers/of/address.c:430: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(addr, 0, pna * 4); ^~~~~~ drivers/of/address.c:430: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(addr, 0, pna * 4); ^~~~~~ drivers/of/address.c:449: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(addr, ranges + na, 4 * pna); ^~~~~~ drivers/of/address.c:449: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(addr, ranges + na, 4 * pna); ^~~~~~ drivers/of/address.c:502: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(addr, in_addr, na * 4); ^~~~~~ drivers/of/address.c:502: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(addr, in_addr, na * 4); ^~~~~~ drivers/of/address.c:820: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(r, 0, sizeof(struct resource)); ^~~~~~ drivers/of/address.c:820: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(r, 0, sizeof(struct resource)); ^~~~~~ Suppressed 34 warnings (34 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. 36 warnings generated. drivers/of/irq.c:404: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(r, 0, sizeof(*r)); ^~~~~~ drivers/of/irq.c:404: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(r, 0, sizeof(*r)); ^~~~~~ drivers/of/irq.c:610:2: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] list_for_each_entry_safe(desc, temp_desc, &intc_parent_list, list) { ^ include/linux/list.h:726:7: note: expanded from macro 'list_for_each_entry_safe' n = list_next_entry(pos, member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:18:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~~~ drivers/of/irq.c:532:2: note: Loop condition is true. Entering loop body for_each_matching_node_and_match(np, matches, &match) { ^ include/linux/of.h:1364:2: note: expanded from macro 'for_each_matching_node_and_match' for (dn = of_find_matching_node_and_match(NULL, matches, match); \ ^ drivers/of/irq.c:533:8: note: Calling 'of_property_read_bool' if (!of_property_read_bool(np, "interrupt-controller") || ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/of.h:1178:9: note: Assuming 'prop' is null return prop ? true : false; ^~~~ include/linux/of.h:1178:9: note: '?' condition is false include/linux/of.h:1178:2: note: Returning zero, which participates in a condition later return prop ? true : false; ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/of/irq.c:533:8: note: Returning from 'of_property_read_bool' if (!of_property_read_bool(np, "interrupt-controller") || ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/of/irq.c:533:58: note: Left side of '||' is true -- ^ drivers/of/irq.c:602:4: note: Taking true branch pr_err("of_irq_init: children remain, but no parents\n"); ^ include/linux/printk.h:489:2: note: expanded from macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/of/irq.c:602:4: note: '?' condition is true pr_err("of_irq_init: children remain, but no parents\n"); ^ include/linux/printk.h:489:2: note: expanded from macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ drivers/of/irq.c:602:4: note: '?' condition is true pr_err("of_irq_init: children remain, but no parents\n"); ^ include/linux/printk.h:489:2: note: expanded from macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ drivers/of/irq.c:602:4: note: Loop condition is false. Exiting loop pr_err("of_irq_init: children remain, but no parents\n"); ^ include/linux/printk.h:489:2: note: expanded from macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ drivers/of/irq.c:603:4: note: Execution continues on line 610 break; ^ drivers/of/irq.c:610:27: note: Null pointer value stored to 'desc' list_for_each_entry_safe(desc, temp_desc, &intc_parent_list, list) { ^ include/linux/list.h:725:7: note: expanded from macro 'list_for_each_entry_safe' for (pos = list_first_entry(head, typeof(*pos), member), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/of/irq.c:610:2: note: Dereference of null pointer list_for_each_entry_safe(desc, temp_desc, &intc_parent_list, list) { ^ include/linux/list.h:726:7: note: expanded from macro 'list_for_each_entry_safe' n = list_next_entry(pos, member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:18:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 32 warnings generated. kernel/locking/lock_events.c:78:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, sizeof(buf) - 1, "%llu\n", sum); ^~~~~~~~ kernel/locking/lock_events.c:78:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, sizeof(buf) - 1, "%llu\n", sum); ^~~~~~~~ Suppressed 31 warnings (30 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 56 warnings generated. >> fs/hpfs/buffer.c:147: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 + 0 * 512, qbh->bh[0]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:147: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 + 0 * 512, qbh->bh[0]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:148: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 + 1 * 512, qbh->bh[1]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:148: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 + 1 * 512, qbh->bh[1]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:149: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 + 2 * 512, qbh->bh[2]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:149: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 + 2 * 512, qbh->bh[2]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:150: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 + 3 * 512, qbh->bh[3]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:150: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 + 3 * 512, qbh->bh[3]->b_data, 512); ^~~~~~ fs/hpfs/buffer.c:223:3: 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(qbh->bh[0]->b_data, qbh->data + 0 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:223:3: 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(qbh->bh[0]->b_data, qbh->data + 0 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:224:3: 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(qbh->bh[1]->b_data, qbh->data + 1 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:224:3: 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(qbh->bh[1]->b_data, qbh->data + 1 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:225:3: 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(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:225:3: 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(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:226:3: 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(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512); ^~~~~~ fs/hpfs/buffer.c:226:3: 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(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512); ^~~~~~ Suppressed 48 warnings (48 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. 38 warnings generated. drivers/auxdisplay/panel.c:1452:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(key->u.kbd.press_str, press, sizeof(key->u.kbd.press_str)); ^~~~~~~ drivers/auxdisplay/panel.c:1452:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(key->u.kbd.press_str, press, sizeof(key->u.kbd.press_str)); ^~~~~~~ drivers/auxdisplay/panel.c:1453:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(key->u.kbd.repeat_str, repeat, sizeof(key->u.kbd.repeat_str)); ^~~~~~~ drivers/auxdisplay/panel.c:1453:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(key->u.kbd.repeat_str, repeat, sizeof(key->u.kbd.repeat_str)); ^~~~~~~ drivers/auxdisplay/panel.c:1454:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(key->u.kbd.release_str, release, ^~~~~~~ drivers/auxdisplay/panel.c:1454:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(key->u.kbd.release_str, release, ^~~~~~~ drivers/auxdisplay/panel.c:1534: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(&panel_cb, 0, sizeof(panel_cb)); ^~~~~~ drivers/auxdisplay/panel.c:1534: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(&panel_cb, 0, sizeof(panel_cb)); ^~~~~~ Suppressed 34 warnings (34 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. 15 warnings generated. >> crypto/des_generic.c:33: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(dctx, 0, sizeof(*dctx)); ^~~~~~ crypto/des_generic.c:33: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(dctx, 0, sizeof(*dctx)); ^~~~~~ crypto/des_generic.c:65: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(dctx, 0, sizeof(*dctx)); ^~~~~~ crypto/des_generic.c:65: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(dctx, 0, sizeof(*dctx)); ^~~~~~ Suppressed 13 warnings (13 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. 12 warnings generated. Suppressed 12 warnings (12 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. 13 warnings generated. lib/xarray.c:2029:18: warning: Value stored to 'node' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct xa_node *node = xas->xa_node; ^~~~ ~~~~~~~~~~~~ lib/xarray.c:2029:18: note: Value stored to 'node' during its initialization is never read struct xa_node *node = xas->xa_node; ^~~~ ~~~~~~~~~~~~ Suppressed 12 warnings (12 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. 9 warnings generated. Suppressed 9 warnings (9 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 19 warnings generated. Suppressed 19 warnings (19 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. 70 warnings generated. fs/namei.c:247: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((char *)result->name, filename, len); ^~~~~~ fs/namei.c:247: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((char *)result->name, filename, len); ^~~~~~ fs/namei.c:635: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(p, nd->internal, sizeof(nd->internal)); ^~~~~~ fs/namei.c:635: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(p, nd->internal, sizeof(nd->internal)); ^~~~~~ fs/namei.c:3423:8: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] res = step_into(nd, WALK_TRAILING, dentry, inode, seq); ^ fs/namei.c:3636:9: note: Calling 'path_openat' filp = path_openat(&nd, op, flags | LOOKUP_RCU); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/namei.c:3595:41: note: Left side of '&&' is false file = alloc_empty_file(op->open_flag, current_cred()); ^ include/linux/cred.h:299:2: note: expanded from macro 'current_cred' rcu_dereference_protected(current->cred, 1) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:319:11: note: expanded from macro 'RCU_LOCKDEP_WARN' if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ ^ fs/namei.c:3595:41: note: Loop condition is false. Exiting loop file = alloc_empty_file(op->open_flag, current_cred()); ^ include/linux/cred.h:299:2: note: expanded from macro 'current_cred' rcu_dereference_protected(current->cred, 1) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:317:2: note: expanded from macro 'RCU_LOCKDEP_WARN' do { \ ^ fs/namei.c:3596:2: note: Taking false branch if (IS_ERR(file)) ^ fs/namei.c:3599:6: note: Assuming the condition is true if (unlikely(file->f_flags & __O_TMPFILE)) { -- ^ include/asm-generic/bug.h:166:23: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:876:2: note: Calling 'nxp_fspi_prepare_lut' nxp_fspi_prepare_lut(f, op); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:538:6: note: Assuming field 'nbytes' is not equal to 0 if (op->addr.nbytes) { ^~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:538:2: note: Taking true branch if (op->addr.nbytes) { ^ drivers/spi/spi-nxp-fspi.c:539:25: note: The result of the left shift is undefined because the left operand is negative lutval[lutidx / 2] |= LUT_DEF(lutidx, LUT_ADDR, ^ drivers/spi/spi-nxp-fspi.c:311:36: note: expanded from macro 'LUT_DEF' ((((ins) << INSTR_SHIFT) | ((pad) << PAD_SHIFT) | \ ~~~~~ ^ drivers/spi/spi-nxp-fspi.c:547:25: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] lutval[lutidx / 2] |= LUT_DEF(lutidx, LUT_DUMMY, ^ drivers/spi/spi-nxp-fspi.c:311:36: note: expanded from macro 'LUT_DEF' ((((ins) << INSTR_SHIFT) | ((pad) << PAD_SHIFT) | \ ^ drivers/spi/spi-nxp-fspi.c:872:2: note: Assuming 'err' is not equal to 0 WARN_ON(err); ^ include/asm-generic/bug.h:166:23: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:876:2: note: Calling 'nxp_fspi_prepare_lut' nxp_fspi_prepare_lut(f, op); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:538:6: note: Assuming field 'nbytes' is 0 if (op->addr.nbytes) { ^~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:538:2: note: Taking false branch if (op->addr.nbytes) { ^ drivers/spi/spi-nxp-fspi.c:546:6: note: Assuming field 'nbytes' is not equal to 0 if (op->dummy.nbytes) { ^~~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:546:2: note: Taking true branch if (op->dummy.nbytes) { ^ drivers/spi/spi-nxp-fspi.c:547:25: note: The result of the left shift is undefined because the left operand is negative lutval[lutidx / 2] |= LUT_DEF(lutidx, LUT_DUMMY, ^ drivers/spi/spi-nxp-fspi.c:311:36: note: expanded from macro 'LUT_DEF' ((((ins) << INSTR_SHIFT) | ((pad) << PAD_SHIFT) | \ ~~~~~ ^ drivers/spi/spi-nxp-fspi.c:560:25: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] lutval[lutidx / 2] |= LUT_DEF(lutidx, ^ drivers/spi/spi-nxp-fspi.c:311:36: note: expanded from macro 'LUT_DEF' ((((ins) << INSTR_SHIFT) | ((pad) << PAD_SHIFT) | \ ^ drivers/spi/spi-nxp-fspi.c:872:2: note: Assuming 'err' is not equal to 0 WARN_ON(err); ^ include/asm-generic/bug.h:166:23: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:876:2: note: Calling 'nxp_fspi_prepare_lut' nxp_fspi_prepare_lut(f, op); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:538:6: note: Assuming field 'nbytes' is 0 if (op->addr.nbytes) { ^~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:538:2: note: Taking false branch if (op->addr.nbytes) { ^ drivers/spi/spi-nxp-fspi.c:546:6: note: Assuming field 'nbytes' is 0 if (op->dummy.nbytes) { ^~~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:546:2: note: Taking false branch if (op->dummy.nbytes) { ^ drivers/spi/spi-nxp-fspi.c:559:6: note: Assuming field 'nbytes' is not equal to 0 if (op->data.nbytes) { ^~~~~~~~~~~~~~~ drivers/spi/spi-nxp-fspi.c:559:2: note: Taking true branch if (op->data.nbytes) { ^ drivers/spi/spi-nxp-fspi.c:561:12: note: Assuming field 'dir' is not equal to SPI_MEM_DATA_IN op->data.dir == SPI_MEM_DATA_IN ? ^ drivers/spi/spi-nxp-fspi.c:311:6: note: expanded from macro 'LUT_DEF' ((((ins) << INSTR_SHIFT) | ((pad) << PAD_SHIFT) | \ ^~~ drivers/spi/spi-nxp-fspi.c:561:12: note: '?' condition is false op->data.dir == SPI_MEM_DATA_IN ? ^ drivers/spi/spi-nxp-fspi.c:560:25: note: The result of the left shift is undefined because the left operand is negative lutval[lutidx / 2] |= LUT_DEF(lutidx, ^ drivers/spi/spi-nxp-fspi.c:311:36: note: expanded from macro 'LUT_DEF' ((((ins) << INSTR_SHIFT) | ((pad) << PAD_SHIFT) | \ ~~~~~ ^ >> drivers/spi/spi-nxp-fspi.c:764:4: 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, buf + i + j, 4); ^~~~~~ drivers/spi/spi-nxp-fspi.c:764:4: 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, buf + i + j, 4); ^~~~~~ drivers/spi/spi-nxp-fspi.c:811:4: 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(buf + j, &tmp, size); ^~~~~~ drivers/spi/spi-nxp-fspi.c:811:4: 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(buf + j, &tmp, size); ^~~~~~ Suppressed 35 warnings (35 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. 64 warnings generated. fs/ext4/super.c:890:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (snprintf(nbuf, 16, "error %d", -errno) >= 0) ^~~~~~~~ fs/ext4/super.c:890:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 if (snprintf(nbuf, 16, "error %d", -errno) >= 0) ^~~~~~~~ fs/ext4/super.c:3190:3: 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(new_groups, old_groups, ^~~~~~ fs/ext4/super.c:3190:3: 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(new_groups, old_groups, ^~~~~~ fs/ext4/super.c:4227:4: 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(buf, 0, PAGE_SIZE); ^~~~~~ fs/ext4/super.c:4227:4: 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(buf, 0, PAGE_SIZE); ^~~~~~ fs/ext4/super.c:5072: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(&sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); ^~~~~~ fs/ext4/super.c:5072: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(&sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); ^~~~~~ fs/ext4/super.c:5087: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(&sbi->s_fc_stats, 0, sizeof(sbi->s_fc_stats)); ^~~~~~ fs/ext4/super.c:5087: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(&sbi->s_fc_stats, 0, sizeof(sbi->s_fc_stats)); ^~~~~~ fs/ext4/super.c:5838:4: 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(save, ((char *) es) + ^~~~~~ fs/ext4/super.c:5838:4: 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(save, ((char *) es) + ^~~~~~ fs/ext4/super.c:5842:4: 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(((char *) es) + EXT4_S_ERR_START, ^~~~~~ fs/ext4/super.c:5842:4: 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(((char *) es) + EXT4_S_ERR_START, ^~~~~~ fs/ext4/super.c:5915:4: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(es->s_first_error_func, sbi->s_first_error_func, ^~~~~~~ fs/ext4/super.c:5915:4: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(es->s_first_error_func, sbi->s_first_error_func, ^~~~~~~ fs/ext4/super.c:5929:3: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(es->s_last_error_func, sbi->s_last_error_func, ^~~~~~~ fs/ext4/super.c:5929:3: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(es->s_last_error_func, sbi->s_last_error_func, ^~~~~~~ Suppressed 55 warnings (51 in non-user code, 4 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 35 warnings generated. fs/filesystems.c:227:3: 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(buf, p->name, len); ^~~~~~ fs/filesystems.c:227:3: 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(buf, p->name, len); ^~~~~~ Suppressed 34 warnings (34 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. 38 warnings generated. drivers/remoteproc/remoteproc_elf_loader.c:225:5: 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(ptr, elf_data + offset, filesz); ^~~~~~ drivers/remoteproc/remoteproc_elf_loader.c:225:5: 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(ptr, elf_data + offset, filesz); ^~~~~~ drivers/remoteproc/remoteproc_elf_loader.c:239:5: 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(ptr + filesz, 0, memsz - filesz); ^~~~~~ drivers/remoteproc/remoteproc_elf_loader.c:239:5: 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(ptr + filesz, 0, memsz - filesz); ^~~~~~ Suppressed 36 warnings (36 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. 34 warnings generated. Suppressed 34 warnings (34 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. 41 warnings generated. drivers/extcon/extcon.c:339: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(cable->usb_propval, 0, sizeof(cable->usb_propval)); -- ^~~~~~ ~~~~~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:95:22: note: Value stored to 'dst_sg' during its initialization is never read struct scatterlist *dst_sg = areq->dst; ^~~~~~ ~~~~~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:126: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(bkeyiv, op->key, op->keylen); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:126: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(bkeyiv, op->key, op->keylen); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:136:3: 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(bkeyiv + 32, areq->iv, ivsize); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:136:3: 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(bkeyiv + 32, areq->iv, ivsize); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:165: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(desc, 0, sizeof(struct meson_desc)); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:165: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(desc, 0, sizeof(struct meson_desc)); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:185:3: warning: Value stored to 'nr_sgd' is never read [clang-analyzer-deadcode.DeadStores] nr_sgd = nr_sgs; ^ ~~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:185:3: note: Value stored to 'nr_sgd' is never read nr_sgd = nr_sgs; ^ ~~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:208: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(desc, 0, sizeof(struct meson_desc)); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:208: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(desc, 0, sizeof(struct meson_desc)); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:247:4: 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(areq->iv, backup_iv, ivsize); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:247:4: 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(areq->iv, backup_iv, ivsize); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:317: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(op, 0, sizeof(struct meson_cipher_tfm_ctx)); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:317: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(op, 0, sizeof(struct meson_cipher_tfm_ctx)); ^~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:351:20: warning: Value stored to 'mc' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct meson_dev *mc = op->mc; ^~ ~~~~~~ drivers/crypto/amlogic/amlogic-gxl-cipher.c:351:20: note: Value stored to 'mc' during its initialization is never read struct meson_dev *mc = op->mc; ^~ ~~~~~~ Suppressed 46 warnings (46 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. 14 warnings generated. Suppressed 14 warnings (14 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. 3 warnings generated. Suppressed 3 warnings (3 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. 2 warnings generated. Suppressed 2 warnings (2 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. 2 warnings generated. Suppressed 2 warnings (2 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. 3 warnings generated. Suppressed 3 warnings (3 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. 14 warnings generated. Suppressed 14 warnings (14 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. 2 warnings generated. Suppressed 2 warnings (2 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. 11 warnings generated. Suppressed 11 warnings (11 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. 34 warnings generated. Suppressed 34 warnings (34 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. 31 warnings generated. drivers/pinctrl/pinctrl-utils.c:48: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(new_map + old_num, 0, (new_num - old_num) * sizeof(*new_map)); ^~~~~~ drivers/pinctrl/pinctrl-utils.c:48: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(new_map + old_num, 0, (new_num - old_num) * sizeof(*new_map)); ^~~~~~ Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 64 warnings generated. >> fs/ecryptfs/crypto.c:92:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf((*algified_name), algified_name_len, "%s(%s)", ^~~~~~~~ fs/ecryptfs/crypto.c:92:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf((*algified_name), algified_name_len, "%s(%s)", ^~~~~~~~ >> fs/ecryptfs/crypto.c:125: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(src, crypt_stat->root_iv, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:125: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(src, crypt_stat->root_iv, crypt_stat->iv_bytes); ^~~~~~ >> fs/ecryptfs/crypto.c:126: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((src + crypt_stat->iv_bytes), 0, 16); ^~~~~~ fs/ecryptfs/crypto.c:126: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((src + crypt_stat->iv_bytes), 0, 16); ^~~~~~ fs/ecryptfs/crypto.c:127:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf((src + crypt_stat->iv_bytes), 16, "%lld", offset); ^~~~~~~~ fs/ecryptfs/crypto.c:127:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf((src + crypt_stat->iv_bytes), 16, "%lld", offset); ^~~~~~~~ fs/ecryptfs/crypto.c:139: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(iv, dst, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:139: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(iv, dst, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:168: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((void *)crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat)); ^~~~~~ fs/ecryptfs/crypto.c:168: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((void *)crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat)); ^~~~~~ fs/ecryptfs/crypto.c:196: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(crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat)); ^~~~~~ fs/ecryptfs/crypto.c:196: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(crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat)); ^~~~~~ fs/ecryptfs/crypto.c:216: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(mount_crypt_stat, 0, sizeof(struct ecryptfs_mount_crypt_stat)); ^~~~~~ fs/ecryptfs/crypto.c:216: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(mount_crypt_stat, 0, sizeof(struct ecryptfs_mount_crypt_stat)); ^~~~~~ fs/ecryptfs/crypto.c:651: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(crypt_stat->root_iv, dst, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:651: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(crypt_stat->root_iv, dst, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:654: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(crypt_stat->root_iv, 0, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:654: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(crypt_stat->root_iv, 0, crypt_stat->iv_bytes); ^~~~~~ fs/ecryptfs/crypto.c:790: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(crypt_stat->cipher, ^~~~~~ fs/ecryptfs/crypto.c:790: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(crypt_stat->cipher, ^~~~~~ fs/ecryptfs/crypto.c:969:4: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(str, ecryptfs_cipher_code_str_map[i].cipher_str); ^~~~~~ fs/ecryptfs/crypto.c:969:4: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(str, ecryptfs_cipher_code_str_map[i].cipher_str); ^~~~~~ fs/ecryptfs/crypto.c:1407: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(page_virt, 0, PAGE_SIZE); ^~~~~~ fs/ecryptfs/crypto.c:1407: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(page_virt, 0, PAGE_SIZE); ^~~~~~ fs/ecryptfs/crypto.c:1440: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(page_virt, 0, PAGE_SIZE); ^~~~~~ fs/ecryptfs/crypto.c:1440: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(page_virt, 0, PAGE_SIZE); ^~~~~~ fs/ecryptfs/crypto.c:1523: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((void *)(*copied_name), (void *)name, name_size); ^~~~~~ fs/ecryptfs/crypto.c:1523: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((void *)(*copied_name), (void *)name, name_size); ^~~~~~ >> fs/ecryptfs/crypto.c:1633:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(tmp_tfm->cipher_name, cipher_name, ^~~~~~~ fs/ecryptfs/crypto.c:1633:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(tmp_tfm->cipher_name, cipher_name, ^~~~~~~ fs/ecryptfs/crypto.c:1767:3: 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(last_block, (&src[src_size - 3]), 3); ^~~~~~ fs/ecryptfs/crypto.c:1767:3: 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(last_block, (&src[src_size - 3]), 3); ^~~~~~ fs/ecryptfs/crypto.c:1941:4: 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((*encoded_name), ^~~~~~ fs/ecryptfs/crypto.c:1941:4: 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((*encoded_name), ^~~~~~ Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 34 warnings generated. Suppressed 34 warnings (34 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 27 warnings generated. >> fs/pstore/ram.c:149:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(buffer, RAMOOPS_KERNMSG_HDR "%lld.%lu-%c\n%n", ^~~~~~ fs/pstore/ram.c:149:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(buffer, RAMOOPS_KERNMSG_HDR "%lld.%lu-%c\n%n", ^~~~~~ fs/pstore/ram.c:157:13: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] } else if (sscanf(buffer, RAMOOPS_KERNMSG_HDR "%lld.%lu\n%n", ^~~~~~ fs/pstore/ram.c:157:13: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 } else if (sscanf(buffer, RAMOOPS_KERNMSG_HDR "%lld.%lu\n%n", ^~~~~~ >> fs/pstore/ram.c:276: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(record->buf, (char *)persistent_ram_old(prz) + header_length, ^~~~~~ fs/pstore/ram.c:276: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(record->buf, (char *)persistent_ram_old(prz) + header_length, ^~~~~~ >> fs/pstore/ram.c:728: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(pdata, 0, sizeof(*pdata)); ^~~~~~ fs/pstore/ram.c:728: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(pdata, 0, sizeof(*pdata)); ^~~~~~ fs/pstore/ram.c:920: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(&pdata, 0, sizeof(pdata)); ^~~~~~ fs/pstore/ram.c:920: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(&pdata, 0, sizeof(pdata)); ^~~~~~ Suppressed 22 warnings (22 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. 36 warnings generated. drivers/parport/share.c:459: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(tmp->probe_info, 0, 5 * sizeof(struct parport_device_info)); ^~~~~~ drivers/parport/share.c:459: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(tmp->probe_info, 0, 5 * sizeof(struct parport_device_info)); ^~~~~~ drivers/parport/share.c:490:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(name, "parport%d", tmp->portnum = tmp->number); ^~~~~~~ drivers/parport/share.c:490:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(name, "parport%d", tmp->portnum = tmp->number); ^~~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 31 warnings generated. drivers/parport/ieee1284_ops.c:599:4: 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 (buf, byte, rle_count); ^~~~~~ drivers/parport/ieee1284_ops.c:599:4: 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 (buf, byte, rle_count); ^~~~~~ Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 48 warnings generated. drivers/video/fbdev/core/modedb.c:728:4: 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(&cvt_mode, 0, sizeof(cvt_mode)); ^~~~~~ drivers/video/fbdev/core/modedb.c:728:4: 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(&cvt_mode, 0, sizeof(cvt_mode)); ^~~~~~ drivers/video/fbdev/core/modedb.c:1180: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(&var, 0, sizeof(struct fb_var_screeninfo)); ^~~~~~ drivers/video/fbdev/core/modedb.c:1180: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(&var, 0, sizeof(struct fb_var_screeninfo)); ^~~~~~ Suppressed 46 warnings (46 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. 58 warnings generated. drivers/video/fbdev/core/fbcvt.c:227:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "fbcvt: %dx%d@%d: CVT Name - ", ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:227:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "fbcvt: %dx%d@%d: CVT Name - ", ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:233:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf+offset, cnt, "Not a CVT standard - %d.%03d Mega " ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:233:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf+offset, cnt, "Not a CVT standard - %d.%03d Mega " ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:237:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "%d", pixcount); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:237:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "%d", pixcount); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:242:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, ".%03dM", pixcount_mod); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:242:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, ".%03dM", pixcount_mod); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:247:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "3"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:247:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "3"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:249:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "4"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:249:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "4"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:251:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "9"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:251:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "9"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:253:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "A"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:253:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "A"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:260:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read = snprintf(buf+offset, cnt, "-R"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:260:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read = snprintf(buf+offset, cnt, "-R"); ^~~~~~~~ drivers/video/fbdev/core/fbcvt.c:261:4: warning: Value stored to 'cnt' is never read [clang-analyzer-deadcode.DeadStores] cnt -= read; ^ ~~~~ drivers/video/fbdev/core/fbcvt.c:261:4: note: Value stored to 'cnt' is never read cnt -= read; ^ ~~~~ drivers/video/fbdev/core/fbcvt.c:262:4: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores] offset += read; ^ ~~~~ drivers/video/fbdev/core/fbcvt.c:262:4: note: Value stored to 'offset' is never read offset += read; ^ ~~~~ drivers/video/fbdev/core/fbcvt.c:309: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(&cvt, 0, sizeof(cvt)); ^~~~~~ drivers/video/fbdev/core/fbcvt.c:309: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(&cvt, 0, sizeof(cvt)); ^~~~~~ Suppressed 46 warnings (46 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. 35 warnings generated. >> kernel/stop_machine.c:72: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(done, 0, sizeof(*done)); ^~~~~~ kernel/stop_machine.c:72: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(done, 0, sizeof(*done)); ^~~~~~ Suppressed 34 warnings (34 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. 42 warnings generated. >> kernel/kcov.c:943: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(dst_entries, src_entries, bytes_to_move); ^~~~~~ kernel/kcov.c:943: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_entries, src_entries, bytes_to_move); ^~~~~~ Suppressed 41 warnings (31 in non-user code, 10 with check filters). 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. Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 23 warnings generated. Suppressed 23 warnings (23 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. 34 warnings generated. Suppressed 34 warnings (34 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. 41 warnings generated. kernel/trace/ring_buffer.c:2297: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(iter->event, event, length); ^~~~~~ kernel/trace/ring_buffer.c:2297: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(iter->event, event, length); ^~~~~~ kernel/trace/ring_buffer.c:3509:25: warning: The right operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (unlikely(info->ts != save_before)) { ^ kernel/trace/ring_buffer.c:3823:2: note: Loop condition is false. Exiting loop preempt_disable_notrace(); ^ include/linux/preempt.h:254:35: note: expanded from macro 'preempt_disable_notrace' #define preempt_disable_notrace() \ ^ kernel/trace/ring_buffer.c:3825:6: note: Assuming the condition is false if (atomic_read(&buffer->record_disabled)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3825:2: note: Taking false branch if (atomic_read(&buffer->record_disabled)) ^ kernel/trace/ring_buffer.c:3830:6: note: Assuming the condition is false if (!cpumask_test_cpu(cpu, buffer->cpumask)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3830:2: note: Taking false branch if (!cpumask_test_cpu(cpu, buffer->cpumask)) ^ kernel/trace/ring_buffer.c:3835:6: note: Assuming the condition is false if (atomic_read(&cpu_buffer->record_disabled)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3835:2: note: Taking false branch if (atomic_read(&cpu_buffer->record_disabled)) ^ kernel/trace/ring_buffer.c:3838:6: note: Assuming the condition is false if (length > BUF_MAX_DATA_SIZE) ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3838:2: note: Taking false branch if (length > BUF_MAX_DATA_SIZE) ^ kernel/trace/ring_buffer.c:3841:2: note: Taking false branch if (unlikely(trace_recursive_lock(cpu_buffer))) ^ kernel/trace/ring_buffer.c:3844:10: note: Calling 'rb_reserve_next_event' event = rb_reserve_next_event(buffer, cpu_buffer, length); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3612:6: note: Assuming the condition is false if (ring_buffer_time_stamp_abs(cpu_buffer->buffer)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3612:2: note: Taking false branch if (ring_buffer_time_stamp_abs(cpu_buffer->buffer)) { ^ kernel/trace/ring_buffer.c:3632:6: note: '_____ret' is 0 if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000)) ^ kernel/trace/ring_buffer.c:1054:7: note: expanded from macro 'RB_WARN_ON' if (_____ret) { \ ^~~~~~~~ kernel/trace/ring_buffer.c:3632:6: note: Taking false branch if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000)) ^ kernel/trace/ring_buffer.c:1054:3: note: expanded from macro 'RB_WARN_ON' if (_____ret) { \ ^ kernel/trace/ring_buffer.c:3632:2: note: Taking false branch if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000)) ^ kernel/trace/ring_buffer.c:3635:10: note: Calling '__rb_reserve_next' event = __rb_reserve_next(cpu_buffer, &info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ring_buffer.c:3440:32: note: Left side of '||' is false tail_page = info->tail_page = READ_ONCE(cpu_buffer->tail_page); ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ -- ^~~~~~ kernel/trace/ring_buffer.c:5129: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(cpu_buffer->event_stamp, 0, sizeof(cpu_buffer->event_stamp)); ^~~~~~ kernel/trace/ring_buffer.c:5596:4: 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(bpage->data + pos, rpage->data + rpos, size); ^~~~~~ kernel/trace/ring_buffer.c:5596:4: 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(bpage->data + pos, rpage->data + rpos, size); ^~~~~~ kernel/trace/ring_buffer.c:5653:4: 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(&bpage->data[commit], &missed_events, ^~~~~~ kernel/trace/ring_buffer.c:5653:4: 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(&bpage->data[commit], &missed_events, ^~~~~~ kernel/trace/ring_buffer.c:5665: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(&bpage->data[commit], 0, BUF_PAGE_SIZE - commit); ^~~~~~ kernel/trace/ring_buffer.c:5665: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(&bpage->data[commit], 0, BUF_PAGE_SIZE - commit); ^~~~~~ Suppressed 34 warnings (34 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. 50 warnings generated. drivers/siox/siox-core.c:150: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(smaster->buf, 0, smaster->setbuf_len); ^~~~~~ drivers/siox/siox-core.c:150: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(smaster->buf, 0, smaster->setbuf_len); ^~~~~~ drivers/siox/siox-core.c:240:4: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status &= ~SIOX_STATUS_WDG; ^ ~~~~~~~~~~~~~~~~ drivers/siox/siox-core.c:240:4: note: Value stored to 'status' is never read status &= ~SIOX_STATUS_WDG; ^ ~~~~~~~~~~~~~~~~ drivers/siox/siox-core.c:389:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", sdev->type); ^~~~~~~ drivers/siox/siox-core.c:389:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", sdev->type); ^~~~~~~ drivers/siox/siox-core.c:399:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%zu\n", sdev->inbytes); ^~~~~~~ drivers/siox/siox-core.c:399:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%zu\n", sdev->inbytes); ^~~~~~~ drivers/siox/siox-core.c:409:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%zu\n", sdev->outbytes); ^~~~~~~ drivers/siox/siox-core.c:409:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%zu\n", sdev->outbytes); ^~~~~~~ drivers/siox/siox-core.c:426:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", status_errors); ^~~~~~~ drivers/siox/siox-core.c:426:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", status_errors); ^~~~~~~ drivers/siox/siox-core.c:443:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", connected); ^~~~~~~ drivers/siox/siox-core.c:443:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", connected); ^~~~~~~ drivers/siox/siox-core.c:460:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", status & SIOX_STATUS_WDG); ^~~~~~~ drivers/siox/siox-core.c:460:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", status & SIOX_STATUS_WDG); ^~~~~~~ drivers/siox/siox-core.c:477:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", watchdog_errors); ^~~~~~~ drivers/siox/siox-core.c:477:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", watchdog_errors); ^~~~~~~ drivers/siox/siox-core.c:559:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", smaster->active); ^~~~~~~ drivers/siox/siox-core.c:559:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", smaster->active); ^~~~~~~ drivers/siox/siox-core.c:601:8: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sscanf(buf, "%19s %zu %zu %hhu", type, &inbytes, ^~~~~~ drivers/siox/siox-core.c:601:8: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 ret = sscanf(buf, "%19s %zu %zu %hhu", type, &inbytes, ^~~~~~ drivers/siox/siox-core.c:637:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld\n", jiffies_to_nsecs(smaster->poll_interval)); ^~~~~~~ drivers/siox/siox-core.c:637:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld\n", jiffies_to_nsecs(smaster->poll_interval)); ^~~~~~~ Suppressed 38 warnings (38 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. 31 warnings generated. >> drivers/watchdog/watchdog_dev.c:1015: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] kthread_init_work(&wd_data->work, watchdog_ping_work); ^ include/linux/kthread.h:195:3: note: expanded from macro 'kthread_init_work' memset((work), 0, sizeof(struct kthread_work)); \ ^~~~~~ drivers/watchdog/watchdog_dev.c:1015: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 kthread_init_work(&wd_data->work, watchdog_ping_work); ^ include/linux/kthread.h:195:3: note: expanded from macro 'kthread_init_work' memset((work), 0, sizeof(struct kthread_work)); \ ^~~~~~ Suppressed 30 warnings (30 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 49 warnings generated. Suppressed 49 warnings (49 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. 25 warnings generated. drivers/leds/led-core.c:442:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(led_classdev_name, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:442:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(led_classdev_name, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:449:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tmp_buf, LED_MAX_NAME_SIZE, "%s:%s-%d", ^~~~~~~~ drivers/leds/led-core.c:449:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tmp_buf, LED_MAX_NAME_SIZE, "%s:%s-%d", ^~~~~~~~ drivers/leds/led-core.c:453:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tmp_buf, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:453:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tmp_buf, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:458:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(led_classdev_name, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:458:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(led_classdev_name, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:469:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(led_classdev_name, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:469:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(led_classdev_name, LED_MAX_NAME_SIZE, "%s:%s", ^~~~~~~~ drivers/leds/led-core.c:472:30: warning: Access to field 'name' results in a dereference of a null pointer [clang-analyzer-core.NullDereference] strscpy(led_classdev_name, to_of_node(fwnode)->name, ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ drivers/leds/led-core.c:424:2: note: Taking false branch BUG_ON(props.color == LED_COLOR_ID_MULTI); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ drivers/leds/led-core.c:424:2: note: Loop condition is false. Exiting loop BUG_ON(props.color == LED_COLOR_ID_MULTI); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ drivers/leds/led-core.c:426:6: note: Assuming 'led_classdev_name' is non-null if (!led_classdev_name) ^~~~~~~~~~~~~~~~~~ drivers/leds/led-core.c:426:2: note: Taking false branch if (!led_classdev_name) ^ drivers/leds/led-core.c:429:2: note: Calling 'led_parse_fwnode_props' led_parse_fwnode_props(dev, fwnode, &props); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/led-core.c:370:6: note: Assuming 'fwnode' is non-null if (!fwnode) ^~~~~~~ drivers/leds/led-core.c:370:2: note: Taking false branch if (!fwnode) ^ drivers/leds/led-core.c:373:6: note: Assuming the condition is false if (fwnode_property_present(fwnode, "label")) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/led-core.c:373:2: note: Taking false branch if (fwnode_property_present(fwnode, "label")) { ^ drivers/leds/led-core.c:380:6: note: Assuming the condition is false if (fwnode_property_present(fwnode, "color")) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/led-core.c:380:2: note: Taking false branch if (fwnode_property_present(fwnode, "color")) { ^ drivers/leds/led-core.c:391:6: note: Assuming the condition is true if (!fwnode_property_present(fwnode, "function")) -- ^~~~~~ drivers/staging/fieldbus/anybuss/host.c:1074: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(buf, t->area_pd.buf, count); ^~~~~~ Suppressed 34 warnings (34 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 53 warnings generated. block/blk-mq-sysfs.c:98:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%u\n", hctx->tags->nr_tags); ^~~~~~~ block/blk-mq-sysfs.c:98:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%u\n", hctx->tags->nr_tags); ^~~~~~~ block/blk-mq-sysfs.c:104:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%u\n", hctx->tags->nr_reserved_tags); ^~~~~~~ block/blk-mq-sysfs.c:104:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%u\n", hctx->tags->nr_reserved_tags); ^~~~~~~ block/blk-mq-sysfs.c:115:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(pos + page, size - pos, "%u", i); ^~~~~~~~ block/blk-mq-sysfs.c:115:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(pos + page, size - pos, "%u", i); ^~~~~~~~ block/blk-mq-sysfs.c:117:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(pos + page, size - pos, ", %u", i); ^~~~~~~~ block/blk-mq-sysfs.c:117:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(pos + page, size - pos, ", %u", i); ^~~~~~~~ block/blk-mq-sysfs.c:126:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(pos + page, size + 1 - pos, "\n"); ^~~~~~~~ block/blk-mq-sysfs.c:126:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(pos + page, size + 1 - pos, "\n"); ^~~~~~~~ Suppressed 48 warnings (48 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. 22 warnings generated. Suppressed 22 warnings (22 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. 35 warnings generated. Suppressed 35 warnings (35 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. 48 warnings generated. Suppressed 48 warnings (48 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. 61 warnings generated. fs/hpfs/hpfs_fn.h:180:4: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] a = dst->down; ^ fs/hpfs/namei.c:533:6: note: Assuming the condition is false if (flags & ~RENAME_NOREPLACE) ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/hpfs/namei.c:533:2: note: Taking false branch if (flags & ~RENAME_NOREPLACE) ^ fs/hpfs/namei.c:536:7: note: Assuming 'err' is 0 if ((err = hpfs_chk_name(new_name, &new_len))) return err; ^~~ fs/hpfs/namei.c:536:2: note: Taking false branch if ((err = hpfs_chk_name(new_name, &new_len))) return err; ^ fs/hpfs/namei.c:544:6: note: Assuming 'new_inode' is null if (new_inode && S_ISDIR(new_inode->i_mode)) { ^~~~~~~~~ fs/hpfs/namei.c:544:16: note: Left side of '&&' is false if (new_inode && S_ISDIR(new_inode->i_mode)) { ^ fs/hpfs/namei.c:549:8: note: Assuming 'dep' is non-null if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { ^~~ fs/hpfs/namei.c:549:2: note: Taking false branch if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { ^ fs/hpfs/namei.c:554:2: note: Calling 'copy_de' copy_de(&de, dep); ^~~~~~~~~~~~~~~~~ fs/hpfs/hpfs_fn.h:179:7: note: 'dst' is non-null if (!dst || !src) return; ^~~ fs/hpfs/hpfs_fn.h:179:6: note: Left side of '||' is false if (!dst || !src) return; ^ fs/hpfs/hpfs_fn.h:179:15: note: 'src' is non-null if (!dst || !src) return; ^~~ fs/hpfs/hpfs_fn.h:179:2: note: Taking false branch if (!dst || !src) return; ^ fs/hpfs/hpfs_fn.h:180:4: note: Assigned value is garbage or undefined a = dst->down; ^ ~~~~~~~~~ >> fs/hpfs/namei.c:48: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:48: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(&dee, 0, sizeof dee); ^~~~~~ >> fs/hpfs/namei.c:84: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:84: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:151: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:151: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:190: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:190: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:239: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:239: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:273: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:273: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:317: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:317: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(&dee, 0, sizeof dee); ^~~~~~ fs/hpfs/namei.c:352: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:352: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(fnode->name, name, len > 15 ? 15 : len); ^~~~~~ fs/hpfs/namei.c:559:8: warning: Although the value stored to 'r' is used in the enclosing expression, the value is never actually read from 'r' [clang-analyzer-deadcode.DeadStores] if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/hpfs/namei.c:559:8: note: Although the value stored to 'r' is used in the enclosing expression, the value is never actually read from 'r' if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/hpfs/namei.c:563:5: 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(nde->name, new_name, new_len); ^~~~~~ fs/hpfs/namei.c:563:5: 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(nde->name, new_name, new_len); ^~~~~~ fs/hpfs/namei.c:607:3: 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(fnode->name, new_name, new_len>15?15:new_len); ^~~~~~ fs/hpfs/namei.c:607:3: 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(fnode->name, new_name, new_len>15?15:new_len); ^~~~~~ fs/hpfs/namei.c:608:21: 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] if (new_len < 15) memset(&fnode->name[new_len], 0, 15 - new_len); ^~~~~~ fs/hpfs/namei.c:608:21: 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 if (new_len < 15) memset(&fnode->name[new_len], 0, 15 - new_len); ^~~~~~ Suppressed 48 warnings (48 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. 12 warnings generated. Suppressed 12 warnings (12 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. 55 warnings generated. drivers/thermal/thermal_core.c:675:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(dev->name, "cdev%d", dev->id); ^~~~~~~ drivers/thermal/thermal_core.c:675:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(dev->name, "cdev%d", dev->id); ^~~~~~~ drivers/thermal/thermal_core.c:681:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(dev->attr_name, "cdev%d_trip_point", dev->id); ^~~~~~~ drivers/thermal/thermal_core.c:681:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(dev->attr_name, "cdev%d_trip_point", dev->id); ^~~~~~~ drivers/thermal/thermal_core.c:690:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(dev->weight_attr_name, "cdev%d_weight", dev->id); ^~~~~~~ drivers/thermal/thermal_core.c:690:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(dev->weight_attr_name, "cdev%d_weight", dev->id); ^~~~~~~ Suppressed 52 warnings (52 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. 63 warnings generated. drivers/thermal/thermal_sysfs.c:31:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", tz->type); ^~~~~~~ drivers/thermal/thermal_sysfs.c:31:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", tz->type); ^~~~~~~ drivers/thermal/thermal_sysfs.c:45:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temperature); -- ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:344:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 create_s32_tzp_attr(k_d); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:345:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] create_s32_tzp_attr(integral_cutoff); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:345:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 create_s32_tzp_attr(integral_cutoff); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:346:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] create_s32_tzp_attr(slope); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:346:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 create_s32_tzp_attr(slope); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:347:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] create_s32_tzp_attr(offset); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:347:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 create_s32_tzp_attr(offset); ^ drivers/thermal/thermal_sysfs.c:317:10: note: expanded from macro 'create_s32_tzp_attr' return sprintf(buf, "%d\n", tz->tzp->name); \ ^~~~~~~ drivers/thermal/thermal_sysfs.c:456:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tz->trip_type_attrs[indx].name, THERMAL_NAME_LENGTH, ^~~~~~~~ drivers/thermal/thermal_sysfs.c:456:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tz->trip_type_attrs[indx].name, THERMAL_NAME_LENGTH, ^~~~~~~~ drivers/thermal/thermal_sysfs.c:467:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH, ^~~~~~~~ drivers/thermal/thermal_sysfs.c:467:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH, ^~~~~~~~ drivers/thermal/thermal_sysfs.c:486:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(tz->trip_hyst_attrs[indx].name, THERMAL_NAME_LENGTH, ^~~~~~~~ drivers/thermal/thermal_sysfs.c:486:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(tz->trip_hyst_attrs[indx].name, THERMAL_NAME_LENGTH, ^~~~~~~~ drivers/thermal/thermal_sysfs.c:576:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", cdev->type); ^~~~~~~ drivers/thermal/thermal_sysfs.c:576:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", cdev->type); ^~~~~~~ drivers/thermal/thermal_sysfs.c:589:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", state); ^~~~~~~ drivers/thermal/thermal_sysfs.c:589:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", state); ^~~~~~~ drivers/thermal/thermal_sysfs.c:602:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", state); ^~~~~~~ drivers/thermal/thermal_sysfs.c:602:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", state); ^~~~~~~ drivers/thermal/thermal_sysfs.c:616:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(buf, "%ld\n", &state) != 1) ^~~~~~ drivers/thermal/thermal_sysfs.c:616:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(buf, "%ld\n", &state) != 1) ^~~~~~ drivers/thermal/thermal_sysfs.c:705:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%u\n", stats->total_trans); ^~~~~~~ drivers/thermal/thermal_sysfs.c:705:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%u\n", stats->total_trans); ^~~~~~~ drivers/thermal/thermal_sysfs.c:724:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(buf + len, "state%u\t%llu\n", i, ^~~~~~~ drivers/thermal/thermal_sysfs.c:724:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(buf + len, "state%u\t%llu\n", i, ^~~~~~~ >> drivers/thermal/thermal_sysfs.c:744: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(stats->trans_table, 0, ^~~~~~ drivers/thermal/thermal_sysfs.c:744: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(stats->trans_table, 0, ^~~~~~ drivers/thermal/thermal_sysfs.c:763:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:763:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:764:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, " : "); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:764:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, " : "); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:768:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, "state%2u ", i); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:768:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, "state%2u ", i); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:773:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, "\n"); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:773:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, "\n"); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:779:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, "state%2u:", i); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:779:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, "state%2u:", i); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:784:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, "%8u ", ^~~~~~~~ drivers/thermal/thermal_sysfs.c:784:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, "%8u ", ^~~~~~~~ drivers/thermal/thermal_sysfs.c:789:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, PAGE_SIZE - len, "\n"); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:789:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, PAGE_SIZE - len, "\n"); ^~~~~~~~ drivers/thermal/thermal_sysfs.c:884:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", instance->trip); ^~~~~~~ drivers/thermal/thermal_sysfs.c:884:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", instance->trip); ^~~~~~~ drivers/thermal/thermal_sysfs.c:894:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", instance->weight); ^~~~~~~ drivers/thermal/thermal_sysfs.c:894:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", instance->weight); ^~~~~~~ Suppressed 19 warnings (19 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. 55 warnings generated. fs/ext4/ioctl.c:42: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(es->s_volume_name, (char *)arg, EXT4_LABEL_MAX); ^~~~~~ fs/ext4/ioctl.c:42: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(es->s_volume_name, (char *)arg, EXT4_LABEL_MAX); ^~~~~~ fs/ext4/ioctl.c:433:4: 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(ei_bl->i_data, 0, sizeof(ei_bl->i_data)); ^~~~~~ fs/ext4/ioctl.c:433:4: 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(ei_bl->i_data, 0, sizeof(ei_bl->i_data)); ^~~~~~ fs/ext4/ioctl.c:1117: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(new_label + len, 0, EXT4_LABEL_MAX - len); ^~~~~~ fs/ext4/ioctl.c:1117: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(new_label + len, 0, EXT4_LABEL_MAX - len); ^~~~~~ fs/ext4/ioctl.c:1140: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(label, 0, sizeof(label)); ^~~~~~ fs/ext4/ioctl.c:1140: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(label, 0, sizeof(label)); ^~~~~~ fs/ext4/ioctl.c:1142:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(label, sbi->s_es->s_volume_name, EXT4_LABEL_MAX); ^~~~~~~ fs/ext4/ioctl.c:1142:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(label, sbi->s_es->s_volume_name, EXT4_LABEL_MAX); ^~~~~~~ Suppressed 50 warnings (50 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 49 warnings generated. Suppressed 49 warnings (49 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. 40 warnings generated. >> drivers/firmware/efi/memmap.c:319:3: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:319:3: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:335:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:335:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:348:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:348:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:356:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:356:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:370:4: 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(new, old, old_memmap->desc_size); ^~~~~~ drivers/firmware/efi/memmap.c:370:4: 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(new, old, old_memmap->desc_size); ^~~~~~ Suppressed 35 warnings (35 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. 15 warnings generated. drivers/auxdisplay/line-display.c:91: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(linedisp->buf, ' ', linedisp->num_chars); ^~~~~~ drivers/auxdisplay/line-display.c:91: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(linedisp->buf, ' ', linedisp->num_chars); ^~~~~~ drivers/auxdisplay/line-display.c:212: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(linedisp, 0, sizeof(*linedisp)); ^~~~~~ drivers/auxdisplay/line-display.c:212: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(linedisp, 0, sizeof(*linedisp)); ^~~~~~ Suppressed 13 warnings (13 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. 36 warnings generated. Suppressed 36 warnings (36 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. 10 warnings generated. kernel/rcu/sync.c:23: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(rsp, 0, sizeof(*rsp)); ^~~~~~ kernel/rcu/sync.c:23: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(rsp, 0, sizeof(*rsp)); ^~~~~~ Suppressed 9 warnings (9 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. 13 warnings generated. Suppressed 13 warnings (13 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. 53 warnings generated. kernel/rcu/tree.c:3057:3: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] __call_rcu_nocb_wake(rdp, was_alldone, flags); /* unlocks */ ^ kernel/rcu/tree.c:3106:2: note: Calling '__call_rcu' __call_rcu(head, func); ^~~~~~~~~~~~~~~~~~~~~~ kernel/rcu/tree.c:3005:2: note: 'was_alldone' declared without an initial value bool was_alldone; ^~~~~~~~~~~~~~~~ kernel/rcu/tree.c:3008:2: note: Assuming '__ret_warn_on' is not equal to 0 WARN_ON_ONCE((unsigned long)head & (sizeof(void *) - 1)); ^ include/asm-generic/bug.h:179:33: note: expanded from macro 'WARN_ON_ONCE' #define WARN_ON_ONCE(condition) WARN_ON(condition) ^~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:167:2: note: expanded from macro 'WARN_ON' unlikely(__ret_warn_on); \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ kernel/rcu/tree.c:3010:6: note: Calling 'debug_rcu_head_queue' if (debug_rcu_head_queue(head)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/rcu/rcu.h:193:2: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ kernel/rcu/tree.c:3010:6: note: Returning from 'debug_rcu_head_queue' if (debug_rcu_head_queue(head)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/rcu/tree.c:3010:2: note: Taking false branch if (debug_rcu_head_queue(head)) { ^ kernel/rcu/tree.c:3025:2: note: Loop condition is false. Exiting loop local_irq_save(flags); ^ include/linux/irqflags.h:221:3: note: expanded from macro 'local_irq_save' raw_local_irq_save(flags); \ -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/udf/balloc.c:527:2: note: Loop condition is false. Execution continues on line 534 while (first_block != eloc.logicalBlockNum && ^ fs/udf/balloc.c:534:6: note: Assuming 'first_block' is equal to field 'logicalBlockNum' if (first_block == eloc.logicalBlockNum) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/udf/balloc.c:534:2: note: Taking true branch if (first_block == eloc.logicalBlockNum) { ^ fs/udf/balloc.c:538:7: note: Assuming 'alloc_count' is > 'block_count' if (alloc_count > block_count) { ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/udf/balloc.c:538:3: note: Taking true branch if (alloc_count > block_count) { ^ fs/udf/balloc.c:543:13: note: The result of the left shift is undefined because the left operand is negative (etype << 30) | elen, 1); ~~~~~ ^ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 83 warnings generated. Suppressed 83 warnings (83 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. 47 warnings generated. fs/jffs2/nodelist.c:600:9: warning: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref') [clang-analyzer-core.NullDereference] while (ref->flash_offset != REF_EMPTY_NODE) { ^ fs/jffs2/nodelist.c:665:6: note: Assuming 'size' is not equal to 0 if (!size) ^~~~~ fs/jffs2/nodelist.c:665:2: note: Taking false branch if (!size) ^ fs/jffs2/nodelist.c:667:15: note: Assuming 'size' is <= field 'free_size' if (unlikely(size > jeb->free_size)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ fs/jffs2/nodelist.c:667:2: note: Taking false branch if (unlikely(size > jeb->free_size)) { ^ fs/jffs2/nodelist.c:673:6: note: Assuming field 'last_node' is null if (jeb->last_node && ref_obsolete(jeb->last_node)) { ^~~~~~~~~~~~~~ fs/jffs2/nodelist.c:673:21: note: Left side of '&&' is false if (jeb->last_node && ref_obsolete(jeb->last_node)) { ^ fs/jffs2/nodelist.c:685:3: note: Calling 'jffs2_link_node_ref' jffs2_link_node_ref(c, jeb, ofs, size, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/nodelist.c:592:9: note: Assuming field 'allocated_refs' is not equal to 0 BUG_ON(!jeb->allocated_refs); ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ fs/jffs2/nodelist.c:592:2: note: Taking false branch BUG_ON(!jeb->allocated_refs); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/jffs2/nodelist.c:592:2: note: Loop condition is false. Exiting loop BUG_ON(!jeb->allocated_refs); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/jffs2/nodelist.c:595:2: note: Null pointer value stored to 'ref' ref = jeb->last_node; ^~~~~~~~~~~~~~~~~~~~ fs/jffs2/nodelist.c:597:2: note: Taking false branch dbg_noderef("Last node at %p is (%08x,%p)\n", ref, ref->flash_offset, ^ fs/jffs2/debug.h:134:31: note: expanded from macro 'dbg_noderef' #define dbg_noderef(fmt, ...) no_printk(fmt, ##__VA_ARGS__) ^ include/linux/printk.h:131:2: note: expanded from macro 'no_printk' if (0) \ ^ fs/jffs2/nodelist.c:600:9: note: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref') while (ref->flash_offset != REF_EMPTY_NODE) { ^~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 51 warnings generated. >> fs/jffs2/read.c:80: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(buf, 0, len); ^~~~~~ fs/jffs2/read.c:80: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(buf, 0, len); ^~~~~~ >> fs/jffs2/read.c:143:3: 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(buf, decomprbuf+ofs, len); ^~~~~~ fs/jffs2/read.c:143:3: 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(buf, decomprbuf+ofs, len); ^~~~~~ fs/jffs2/read.c:187:4: 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(buf, 0, holesize); ^~~~~~ fs/jffs2/read.c:187:4: 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(buf, 0, holesize); ^~~~~~ fs/jffs2/read.c:196:4: 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(buf, 0, holeend - offset); ^~~~~~ fs/jffs2/read.c:196:4: 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(buf, 0, holeend - offset); ^~~~~~ fs/jffs2/read.c:217:5: 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(buf, 0, readlen); ^~~~~~ fs/jffs2/read.c:217:5: 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(buf, 0, readlen); ^~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. kernel/resource.c:91:2: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign] (*pos)++; ^ kernel/resource.c:1679:2: note: 'l' declared without an initial value loff_t l; ^~~~~~~~ kernel/resource.c:1682:2: note: Loop condition is true. Entering loop body for (p = p->child; p ; p = r_next(NULL, p, &l)) { ^ kernel/resource.c:1687:7: note: Assuming the condition is true if (p->start >= addr + size) ^~~~~~~~~~~~~~~~~~~~~~~ kernel/resource.c:1687:3: note: Taking true branch if (p->start >= addr + size) ^ kernel/resource.c:1688:4: note: Execution continues on line 1682 continue; ^ kernel/resource.c:1682:29: note: Calling 'r_next' for (p = p->child; p ; p = r_next(NULL, p, &l)) { ^~~~~~~~~~~~~~~~~~~ kernel/resource.c:91:2: note: The expression is an uninitialized value. The computed value will also be garbage (*pos)++; ^~~~~~ kernel/resource.c:188: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(res, 0, sizeof(struct resource)); ^~~~~~ kernel/resource.c:188: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(res, 0, sizeof(struct resource)); ^~~~~~ Suppressed 34 warnings (34 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. 103 warnings generated. Suppressed 103 warnings (103 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. 34 warnings generated. Suppressed 34 warnings (34 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. 50 warnings generated. Suppressed 50 warnings (50 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. 34 warnings generated. Suppressed 34 warnings (34 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. 54 warnings generated. block/bfq-iosched.c:7185:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%u\n", var); ^~~~~~~ block/bfq-iosched.c:7185:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%u\n", var); ^~~~~~~ Suppressed 53 warnings (53 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. 53 warnings generated. block/bfq-wf2q.c:263:7: warning: Access to field 'my_sched_data' results in a dereference of a null pointer (loaded from variable 'entity') [clang-analyzer-core.NullDereference] if (!entity->my_sched_data) ^ block/bfq-wf2q.c:1508:2: note: 'entity' initialized to a null pointer value struct bfq_entity *entity = NULL; ^~~~~~~~~~~~~~~~~~~~~~~~~ block/bfq-wf2q.c:1512:6: note: Assuming the condition is false if (bfq_tot_busy_queues(bfqd) == 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block/bfq-wf2q.c:1512:2: note: Taking false branch if (bfq_tot_busy_queues(bfqd) == 0) ^ block/bfq-wf2q.c:1521:2: note: Loop condition is false. Execution continues on line 1582 for (; sd ; sd = entity->my_sched_data) { ^ block/bfq-wf2q.c:1582:28: note: Passing null pointer value via 1st parameter 'entity' bfqq = bfq_entity_to_bfqq(entity); ^~~~~~ block/bfq-wf2q.c:1582:9: note: Calling 'bfq_entity_to_bfqq' bfqq = bfq_entity_to_bfqq(entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~ block/bfq-wf2q.c:263:7: note: Access to field 'my_sched_data' results in a dereference of a null pointer (loaded from variable 'entity') if (!entity->my_sched_data) ^~~~~~ Suppressed 52 warnings (52 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. 53 warnings generated. Suppressed 53 warnings (52 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. >> arch/riscv/kvm/../../../virt/kvm/coalesced_mmio.c:88: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(ring->coalesced_mmio[insert].data, val, len); ^~~~~~ arch/riscv/kvm/../../../virt/kvm/coalesced_mmio.c:88: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(ring->coalesced_mmio[insert].data, val, len); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 50 warnings generated. Suppressed 50 warnings (50 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. 61 warnings generated. drivers/crypto/ccree/cc_hash.c:83:8: warning: Excessive padding in 'struct cc_hash_ctx' (103 padding bytes, where 39 is optimal). Optimal fields order: opad_tmp_keys_dma_addr, drvdata, digest_buff_dma_addr, hash_mode, hw_mode, inter_digestsize, hash_len, key_params, setkey_comp, is_hmac, digest_buff, opad_tmp_keys_buff, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct cc_hash_ctx { ~~~~~~~^~~~~~~~~~~~~ drivers/crypto/ccree/cc_hash.c:83:8: note: Excessive padding in 'struct cc_hash_ctx' (103 padding bytes, where 39 is optimal). Optimal fields order: opad_tmp_keys_dma_addr, drvdata, digest_buff_dma_addr, hash_mode, hw_mode, inter_digestsize, hash_len, key_params, setkey_comp, is_hmac, digest_buff, opad_tmp_keys_buff, consider reordering the fields or adding explicit padding members struct cc_hash_ctx { ~~~~~~~^~~~~~~~~~~~~ >> drivers/crypto/ccree/cc_hash.c:140: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(state, 0, sizeof(*state)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:140: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(state, 0, sizeof(*state)); ^~~~~~ >> drivers/crypto/ccree/cc_hash.c:149:4: 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(state->digest_buff, ctx->digest_buff, ^~~~~~ drivers/crypto/ccree/cc_hash.c:149:4: 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(state->digest_buff, ctx->digest_buff, ^~~~~~ drivers/crypto/ccree/cc_hash.c:153:5: 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(state->digest_bytes_len, ^~~~~~ drivers/crypto/ccree/cc_hash.c:153:5: 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(state->digest_bytes_len, ^~~~~~ drivers/crypto/ccree/cc_hash.c:157:5: 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(state->digest_bytes_len, ^~~~~~ drivers/crypto/ccree/cc_hash.c:157:5: 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(state->digest_bytes_len, ^~~~~~ drivers/crypto/ccree/cc_hash.c:167:4: 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(state->opad_digest_buff, ^~~~~~ drivers/crypto/ccree/cc_hash.c:167:4: 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(state->opad_digest_buff, ^~~~~~ drivers/crypto/ccree/cc_hash.c:174:3: 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(state->digest_buff, larval, ctx->inter_digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:174:3: 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(state->digest_buff, larval, ctx->inter_digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:278:3: 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(result, state->digest_result_buff, digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:278:3: 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(result, state->digest_result_buff, digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1033: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(ctx->opad_tmp_keys_buff, key, keylen); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1033: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(ctx->opad_tmp_keys_buff, key, keylen); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1035: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(ctx->opad_tmp_keys_buff + 24, 0, ^~~~~~ drivers/crypto/ccree/cc_hash.c:1035: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(ctx->opad_tmp_keys_buff + 24, 0, ^~~~~~ drivers/crypto/ccree/cc_hash.c:1144:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_hash.c:1144:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_hash.c:1508: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(out, &tmp, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1508: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(out, &tmp, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1511: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(out, state->digest_buff, ctx->inter_digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1511: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(out, state->digest_buff, ctx->inter_digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1514: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(out, state->digest_bytes_len, ctx->hash_len); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1514: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(out, state->digest_bytes_len, ctx->hash_len); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1517: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(out, &curr_buff_cnt, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1517: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(out, &curr_buff_cnt, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1520: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(out, curr_buff, curr_buff_cnt); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1520: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(out, curr_buff, curr_buff_cnt); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1533: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(&tmp, in, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1533: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(&tmp, in, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1540: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(state->digest_buff, in, ctx->inter_digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1540: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(state->digest_buff, in, ctx->inter_digestsize); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1543: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(state->digest_bytes_len, in, ctx->hash_len); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1543: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(state->digest_bytes_len, in, ctx->hash_len); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1547: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(&tmp, in, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1547: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(&tmp, in, sizeof(u32)); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1553: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(state->buffers[0], in, tmp); ^~~~~~ drivers/crypto/ccree/cc_hash.c:1553: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(state->buffers[0], in, tmp); ^~~~~~ >> drivers/crypto/ccree/cc_hash.c:1837:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1837:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1839:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1839:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1843:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1843:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1845:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:1845:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_hash.c:2168:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_hash.c:2168:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 35 warnings (35 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. 50 warnings generated. Suppressed 50 warnings (50 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. 51 warnings generated. fs/ext4/hash.c:221:5: 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(buf, hinfo->seed, sizeof(buf)); ^~~~~~ fs/ext4/hash.c:221:5: 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(buf, hinfo->seed, sizeof(buf)); ^~~~~~ Suppressed 50 warnings (50 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. 53 warnings generated. fs/ext4/ialloc.c:66: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(bitmap + (i >> 3), 0xff, (end_bit - i) >> 3); ^~~~~~ fs/ext4/ialloc.c:66: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(bitmap + (i >> 3), 0xff, (end_bit - i) >> 3); ^~~~~~ fs/ext4/ialloc.c:172: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(bh->b_data, 0, (EXT4_INODES_PER_GROUP(sb) + 7) / 8); ^~~~~~ fs/ext4/ialloc.c:172: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(bh->b_data, 0, (EXT4_INODES_PER_GROUP(sb) + 7) / 8); ^~~~~~ fs/ext4/ialloc.c:1255: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(ei->i_data, 0, sizeof(ei->i_data)); ^~~~~~ fs/ext4/ialloc.c:1255: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(ei->i_data, 0, sizeof(ei->i_data)); ^~~~~~ Suppressed 50 warnings (50 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. 53 warnings generated. fs/ext4/indirect.c:155:47: warning: The right operand of '+' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] add_chain(chain, NULL, EXT4_I(inode)->i_data + *offsets); ^ fs/ext4/indirect.c:1236:6: note: Assuming 'end' is < 'max_block' if (end >= max_block) ^~~~~~~~~~~~~~~~ fs/ext4/indirect.c:1236:2: note: Taking false branch if (end >= max_block) ^ fs/ext4/indirect.c:1238:7: note: Assuming 'start' is < 'end' if ((start >= end) || (start > max_block)) ^~~~~~~~~~~~ fs/ext4/indirect.c:1238:6: note: Left side of '||' is false if ((start >= end) || (start > max_block)) ^ fs/ext4/indirect.c:1238:25: note: Assuming 'start' is <= 'max_block' if ((start >= end) || (start > max_block)) ^~~~~~~~~~~~~~~~~ fs/ext4/indirect.c:1238:2: note: Taking false branch if ((start >= end) || (start > max_block)) ^ fs/ext4/indirect.c:1241:6: note: Calling 'ext4_block_to_path' n = ext4_block_to_path(inode, start, offsets, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/indirect.c:86:6: note: Assuming 'i_block' is >= 'direct_blocks' if (i_block < direct_blocks) { ^~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/indirect.c:86:2: note: Taking false branch if (i_block < direct_blocks) { ^ fs/ext4/indirect.c:89:13: note: Assuming the condition is false } else if ((i_block -= direct_blocks) < indirect_blocks) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/indirect.c:89:9: note: Taking false branch } else if ((i_block -= direct_blocks) < indirect_blocks) { -- ^~~~~~ fs/ext4/indirect.c:364: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(bh->b_data, 0, bh->b_size); ^~~~~~ fs/ext4/indirect.c:603: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(&ar, 0, sizeof(ar)); ^~~~~~ fs/ext4/indirect.c:603: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(&ar, 0, sizeof(ar)); ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. block/blk-flush.c:440: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(&rq->flush, 0, sizeof(rq->flush)); ^~~~~~ block/blk-flush.c:440: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(&rq->flush, 0, sizeof(rq->flush)); ^~~~~~ Suppressed 49 warnings (49 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 51 warnings generated. block/blk-map.c:32: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(bmd->iov, data->iov, sizeof(struct iovec) * data->nr_segs); ^~~~~~ block/blk-map.c:32: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(bmd->iov, data->iov, sizeof(struct iovec) * data->nr_segs); ^~~~~~ block/blk-map.c:264:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = -EINVAL; ^ ~~~~~~~ block/blk-map.c:264:4: note: Value stored to 'ret' is never read ret = -EINVAL; ^ ~~~~~~~ block/blk-map.c:454:4: 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(page_address(page), p, bytes); ^~~~~~ block/blk-map.c:454:4: 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(page_address(page), p, bytes); ^~~~~~ Suppressed 48 warnings (48 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. 51 warnings generated. Suppressed 51 warnings (51 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. 48 warnings generated. Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 50 warnings generated. mm/vmscan.c:1524: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(stat, 0, sizeof(*stat)); ^~~~~~ mm/vmscan.c:1524: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(stat, 0, sizeof(*stat)); ^~~~~~ mm/vmscan.c:2954: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(targets, nr, sizeof(nr)); ^~~~~~ mm/vmscan.c:2954: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(targets, nr, sizeof(nr)); ^~~~~~ mm/vmscan.c:3200: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(&sc->nr, 0, sizeof(sc->nr)); ^~~~~~ mm/vmscan.c:3200: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(&sc->nr, 0, sizeof(sc->nr)); ^~~~~~ Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. 15 warnings generated. drivers/leds/trigger/ledtrig-cpu.c:54:7: warning: Value stored to 'is_active' during its initialization is never read [clang-analyzer-deadcode.DeadStores] bool is_active = trig->is_active; ^~~~~~~~~ ~~~~~~~~~~~~~~~ drivers/leds/trigger/ledtrig-cpu.c:54:7: note: Value stored to 'is_active' during its initialization is never read bool is_active = trig->is_active; ^~~~~~~~~ ~~~~~~~~~~~~~~~ drivers/leds/trigger/ledtrig-cpu.c:155:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu); ^~~~~~~~ drivers/leds/trigger/ledtrig-cpu.c:155:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu); ^~~~~~~~ Suppressed 13 warnings (13 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. 35 warnings generated. >> drivers/leds/trigger/ledtrig-activity.c:159:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", activity_data->invert); ^~~~~~~ drivers/leds/trigger/ledtrig-activity.c:159:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", activity_data->invert); ^~~~~~~ Suppressed 34 warnings (34 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. 13 warnings generated. Suppressed 13 warnings (13 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. 22 warnings generated. Suppressed 22 warnings (22 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 31 warnings generated. Suppressed 31 warnings (31 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. 31 warnings generated. Suppressed 31 warnings (31 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. 35 warnings generated. Suppressed 35 warnings (35 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. >> drivers/firmware/efi/esrt.c:116:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] str += sprintf(str, "\n"); ^~~~~~~ drivers/firmware/efi/esrt.c:116:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 str += sprintf(str, "\n"); ^~~~~~~ drivers/firmware/efi/esrt.c:132:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esre_attr_decl(fw_type, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:132:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esre_attr_decl(fw_type, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:133:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esre_attr_decl(fw_version, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:133:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esre_attr_decl(fw_version, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:134:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esre_attr_decl(lowest_supported_fw_version, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:134:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esre_attr_decl(lowest_supported_fw_version, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:135:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esre_attr_decl(capsule_flags, 32, "0x%x"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:135:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esre_attr_decl(capsule_flags, 32, "0x%x"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:136:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esre_attr_decl(last_attempt_version, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:136:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esre_attr_decl(last_attempt_version, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:137:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esre_attr_decl(last_attempt_status, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:137:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esre_attr_decl(last_attempt_status, 32, "%u"); ^ drivers/firmware/efi/esrt.c:126:9: note: expanded from macro 'esre_attr_decl' return sprintf(buf, fmt "\n", \ ^~~~~~~ drivers/firmware/efi/esrt.c:205:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esrt_attr_decl(fw_resource_count, 32, "%u"); ^ drivers/firmware/efi/esrt.c:200:9: note: expanded from macro 'esrt_attr_decl' return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ ^~~~~~~ drivers/firmware/efi/esrt.c:205:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esrt_attr_decl(fw_resource_count, 32, "%u"); ^ drivers/firmware/efi/esrt.c:200:9: note: expanded from macro 'esrt_attr_decl' return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ ^~~~~~~ drivers/firmware/efi/esrt.c:206:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esrt_attr_decl(fw_resource_count_max, 32, "%u"); ^ drivers/firmware/efi/esrt.c:200:9: note: expanded from macro 'esrt_attr_decl' return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ ^~~~~~~ drivers/firmware/efi/esrt.c:206:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esrt_attr_decl(fw_resource_count_max, 32, "%u"); ^ drivers/firmware/efi/esrt.c:200:9: note: expanded from macro 'esrt_attr_decl' return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ ^~~~~~~ drivers/firmware/efi/esrt.c:207:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] esrt_attr_decl(fw_resource_version, 64, "%llu"); ^ drivers/firmware/efi/esrt.c:200:9: note: expanded from macro 'esrt_attr_decl' return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ ^~~~~~~ drivers/firmware/efi/esrt.c:207:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 esrt_attr_decl(fw_resource_version, 64, "%llu"); ^ drivers/firmware/efi/esrt.c:200:9: note: expanded from macro 'esrt_attr_decl' return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ ^~~~~~~ >> drivers/firmware/efi/esrt.c:289: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(&tmpesrt, va, sizeof(tmpesrt)); ^~~~~~ drivers/firmware/efi/esrt.c:289: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(&tmpesrt, va, sizeof(tmpesrt)); ^~~~~~ Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 47 warnings generated. Suppressed 47 warnings (47 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. 35 warnings generated. Suppressed 35 warnings (35 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. 49 warnings generated. Suppressed 49 warnings (49 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. 40 warnings generated. drivers/crypto/ccree/cc_driver.c:105:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_driver.c:105:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/crypto/ccree/cc_driver.c:176:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(prefix, sizeof(prefix), "%s[%zu]: ", name, len); ^~~~~~~~ drivers/crypto/ccree/cc_driver.c:176:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(prefix, sizeof(prefix), "%s[%zu]: ", name, len); ^~~~~~~~ drivers/crypto/ccree/cc_driver.c:232:3: warning: Value stored to 'axi_err' is never read [clang-analyzer-deadcode.DeadStores] axi_err = cc_ioread(drvdata, CC_REG(AXIM_MON_ERR)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_driver.c:232:3: note: Value stored to 'axi_err' is never read axi_err = cc_ioread(drvdata, CC_REG(AXIM_MON_ERR)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_driver.c:276:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_driver.c:276:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 36 warnings (36 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. 35 warnings generated. Suppressed 35 warnings (35 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. 33 warnings generated. drivers/of/base.c:1297: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(it, 0, sizeof(*it)); ^~~~~~ drivers/of/base.c:1297: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(it, 0, sizeof(*it)); ^~~~~~ drivers/of/base.c:1887:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(ap->stem, stem, stem_len); ^~~~~~~ drivers/of/base.c:1887:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(ap->stem, stem, stem_len); ^~~~~~~ drivers/of/base.c:1958: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(ap, 0, sizeof(*ap) + len + 1); ^~~~~~ drivers/of/base.c:1958: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(ap, 0, sizeof(*ap) + len + 1); ^~~~~~ Suppressed 30 warnings (30 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. 50 warnings generated. >> fs/omfs/dir.c:94: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(bh->b_data, 0, sizeof(struct omfs_inode)); ^~~~~~ fs/omfs/dir.c:94: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(bh->b_data, 0, sizeof(struct omfs_inode)); ^~~~~~ fs/omfs/dir.c:97: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(&bh->b_data[OMFS_DIR_START], 0xff, ^~~~~~ fs/omfs/dir.c:97: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(&bh->b_data[OMFS_DIR_START], 0xff, ^~~~~~ >> fs/omfs/dir.c:139: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(oi->i_name, name, namelen); ^~~~~~ fs/omfs/dir.c:139: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(oi->i_name, name, namelen); ^~~~~~ fs/omfs/dir.c:140: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(oi->i_name + namelen, 0, OMFS_NAMELEN - namelen); ^~~~~~ fs/omfs/dir.c:140: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(oi->i_name + namelen, 0, OMFS_NAMELEN - namelen); ^~~~~~ Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 50 warnings generated. fs/xfs/scrub/parent.c:196:13: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (nlink != expected_nlink) ^ fs/xfs/scrub/parent.c:276:7: note: Assuming the condition is true if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) ^ include/uapi/linux/stat.h:23:21: note: expanded from macro 'S_ISDIR' #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:276:2: note: Taking false branch if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) ^ fs/xfs/scrub/parent.c:280:6: note: Assuming the condition is false if (!xfs_verify_dir_ino(mp, sc->ip->i_ino)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:280:2: note: Taking false branch if (!xfs_verify_dir_ino(mp, sc->ip->i_ino)) { ^ fs/xfs/scrub/parent.c:297:6: note: Assuming the condition is false if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:297:2: note: Taking false branch if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error)) ^ fs/xfs/scrub/parent.c:299:6: note: Assuming the condition is false if (!xfs_verify_dir_ino(mp, dnum)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:299:2: note: Taking false branch if (!xfs_verify_dir_ino(mp, dnum)) { ^ fs/xfs/scrub/parent.c:305:6: note: Assuming field 'ip' is not equal to field 'm_rootip' if (sc->ip == mp->m_rootip) { ^~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:305:2: note: Taking false branch if (sc->ip == mp->m_rootip) { ^ fs/xfs/scrub/parent.c:313:11: note: Calling 'xchk_parent_validate' error = xchk_parent_validate(sc, dnum, &try_again); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:137:2: note: 'nlink' declared without an initial value xfs_nlink_t nlink; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:142:6: note: Assuming the condition is false if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:142:2: note: Taking false branch if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) ^ fs/xfs/scrub/parent.c:146:6: note: Assuming 'dnum' is not equal to field 'i_ino' if (sc->ip->i_ino == dnum) { ^~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:146:2: note: Taking false branch if (sc->ip->i_ino == dnum) { ^ fs/xfs/scrub/parent.c:155:19: note: Assuming field 'i_nlink' is not equal to 0 expected_nlink = VFS_I(sc->ip)->i_nlink == 0 ? 0 : 1; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:155:19: note: '?' condition is false fs/xfs/scrub/parent.c:172:6: note: Assuming the condition is false if (error == -EINVAL || error == -ENOENT) { ^~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:172:6: note: Left side of '||' is false fs/xfs/scrub/parent.c:172:26: note: Assuming the condition is false if (error == -EINVAL || error == -ENOENT) { ^~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:172:2: note: Taking false branch if (error == -EINVAL || error == -ENOENT) { ^ fs/xfs/scrub/parent.c:177:6: note: Assuming the condition is false if (!xchk_fblock_xref_process_error(sc, XFS_DATA_FORK, 0, &error)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/scrub/parent.c:177:2: note: Taking false branch if (!xchk_fblock_xref_process_error(sc, XFS_DATA_FORK, 0, &error)) ^ fs/xfs/scrub/parent.c:179:6: note: Assuming 'dp' is not equal to field 'ip' if (dp == sc->ip || !S_ISDIR(VFS_I(dp)->i_mode)) { ^~~~~~~~~~~~ fs/xfs/scrub/parent.c:179:6: note: Left side of '||' is false fs/xfs/scrub/parent.c:179:23: note: Assuming the condition is true if (dp == sc->ip || !S_ISDIR(VFS_I(dp)->i_mode)) { ^ include/uapi/linux/stat.h:23:21: note: expanded from macro 'S_ISDIR' #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -- #define VERBOSE_TOROUT_STRING(s) \ ^ kernel/locking/locktorture.c:821:3: note: Calling 'lock_torture_stats_print' lock_torture_stats_print(); ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/locking/locktorture.c:781:6: note: Assuming field 'readlock' is null if (cxt.cur_ops->readlock) ^~~~~~~~~~~~~~~~~~~~~ kernel/locking/locktorture.c:781:2: note: Taking false branch if (cxt.cur_ops->readlock) ^ kernel/locking/locktorture.c:784:8: note: Calling 'kmalloc' buf = kmalloc(size, GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:569:2: note: Taking false branch if (__builtin_constant_p(size)) { ^ include/linux/slab.h:586:9: note: Value assigned to 'cxt.lwsa' return __kmalloc(size, flags); ^~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later return __kmalloc(size, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/locking/locktorture.c:784:8: note: Returning from 'kmalloc' buf = kmalloc(size, GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/locking/locktorture.c:785:6: note: Assuming 'buf' is non-null if (!buf) { ^~~~ kernel/locking/locktorture.c:785:2: note: Taking false branch if (!buf) { ^ kernel/locking/locktorture.c:791:29: note: Passing value via 2nd parameter 'statp' __torture_print_stats(buf, cxt.lwsa, true); ^~~~~~~~ kernel/locking/locktorture.c:791:2: note: Calling '__torture_print_stats' __torture_print_stats(buf, cxt.lwsa, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/locking/locktorture.c:744:22: note: Assuming 'statp' is null long max = 0, min = statp ? data_race(statp[0].n_lock_acquired) : 0; ^~~~~ kernel/locking/locktorture.c:744:22: note: '?' condition is false kernel/locking/locktorture.c:747:13: note: 'write' is true n_stress = write ? cxt.nrealwriters_stress : cxt.nrealreaders_stress; ^~~~~ kernel/locking/locktorture.c:747:13: note: '?' condition is true kernel/locking/locktorture.c:748:14: note: Assuming 'i' is < 'n_stress' for (i = 0; i < n_stress; i++) { ^~~~~~~~~~~~ kernel/locking/locktorture.c:748:2: note: Loop condition is true. Entering loop body for (i = 0; i < n_stress; i++) { ^ kernel/locking/locktorture.c:749:17: note: Dereference of null pointer if (data_race(statp[i].n_lock_fail)) ^ include/linux/compiler.h:218:3: note: expanded from macro 'data_race' expr; \ ^~~~ kernel/locking/locktorture.c:758:2: warning: Value stored to 'page' is never read [clang-analyzer-deadcode.DeadStores] page += sprintf(page, ^ ~~~~~~~~~~~~~ kernel/locking/locktorture.c:758:2: note: Value stored to 'page' is never read page += sprintf(page, ^ ~~~~~~~~~~~~~ kernel/locking/locktorture.c:758:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] page += sprintf(page, ^~~~~~~ kernel/locking/locktorture.c:758:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 page += sprintf(page, ^~~~~~~ Suppressed 34 warnings (34 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. 16 warnings generated. Suppressed 16 warnings (16 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 35 warnings generated. Suppressed 35 warnings (35 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. 34 warnings generated. >> drivers/base/arch_topology.c:464:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "thread%d", i); ^~~~~~~~ drivers/base/arch_topology.c:464:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "thread%d", i); ^~~~~~~~ drivers/base/arch_topology.c:518:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "cluster%d", i); ^~~~~~~~ drivers/base/arch_topology.c:518:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "cluster%d", i); ^~~~~~~~ drivers/base/arch_topology.c:533:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "core%d", i); ^~~~~~~~ drivers/base/arch_topology.c:533:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "core%d", i); ^~~~~~~~ Suppressed 31 warnings (31 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. 36 warnings generated. Suppressed 36 warnings (36 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. 55 warnings generated. drivers/block/brd.c:205: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(dst + offset, src, copy); ^~~~~~ drivers/block/brd.c:205: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 + offset, src, copy); ^~~~~~ drivers/block/brd.c:216:3: 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(dst, src, copy); ^~~~~~ drivers/block/brd.c:216:3: 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, copy); ^~~~~~ drivers/block/brd.c:236:3: 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(dst, src + offset, copy); ^~~~~~ drivers/block/brd.c:236:3: 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 + offset, copy); ^~~~~~ drivers/block/brd.c:239: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(dst, 0, copy); ^~~~~~ drivers/block/brd.c:239: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(dst, 0, copy); ^~~~~~ drivers/block/brd.c:248:4: 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(dst, src, copy); ^~~~~~ drivers/block/brd.c:248:4: 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, copy); ^~~~~~ drivers/block/brd.c:251:4: 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(dst, 0, copy); ^~~~~~ drivers/block/brd.c:251:4: 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(dst, 0, copy); ^~~~~~ drivers/block/brd.c:386:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, DISK_NAME_LEN, "ram%d", i); ^~~~~~~~ drivers/block/brd.c:386:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, DISK_NAME_LEN, "ram%d", i); ^~~~~~~~ drivers/block/brd.c:459:18: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] max_part = 1UL << fls(max_part); ^ drivers/block/brd.c:472:2: note: Calling 'brd_check_and_reset_par' brd_check_and_reset_par(); ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/brd.c:451:15: note: Assuming 'max_part' is not equal to 0 if (unlikely(!max_part)) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/block/brd.c:451:2: note: Taking false branch if (unlikely(!max_part)) ^ drivers/block/brd.c:458:6: note: Assuming the condition is true if ((1U << MINORBITS) % max_part != 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/brd.c:458:2: note: Taking true branch if ((1U << MINORBITS) % max_part != 0) ^ drivers/block/brd.c:459:21: note: Calling 'fls' max_part = 1UL << fls(max_part); ^~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32 int r = 32; ^~~~~ include/asm-generic/bitops/fls.h:17:7: note: 'x' is not equal to 0, which participates in a condition later if (!x) ^ include/asm-generic/bitops/fls.h:17:2: note: Taking false branch if (!x) ^ include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false if (!(x & 0xffff0000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:19:2: note: Taking false branch if (!(x & 0xffff0000u)) { ^ include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false if (!(x & 0xff000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:23:2: note: Taking false branch if (!(x & 0xff000000u)) { ^ include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false if (!(x & 0xf0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:27:2: note: Taking false branch if (!(x & 0xf0000000u)) { ^ include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false if (!(x & 0xc0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:31:2: note: Taking false branch if (!(x & 0xc0000000u)) { ^ include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false if (!(x & 0x80000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:35:2: note: Taking false branch if (!(x & 0x80000000u)) { ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ drivers/block/brd.c:459:21: note: Returning from 'fls' max_part = 1UL << fls(max_part); ^~~~~~~~~~~~~ drivers/block/brd.c:459:18: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' max_part = 1UL << fls(max_part); ^ ~~~~~~~~~~~~~ Suppressed 47 warnings (47 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. 13 warnings generated. Suppressed 13 warnings (13 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. 13 warnings generated. Suppressed 13 warnings (13 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. 34 warnings generated. Suppressed 34 warnings (34 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. 58 warnings generated. fs/ufs/inode.c:78:9: warning: Excessive padding in 'Indirect' (8 padding bytes, where 0 is optimal). Optimal fields order: , p, bh, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] typedef struct { ^~~~~~~~ fs/ufs/inode.c:78:9: note: Excessive padding in 'Indirect' (8 padding bytes, where 0 is optimal). Optimal fields order: , p, bh, consider reordering the fields or adding explicit padding members typedef struct { ^~~~~~~~ >> fs/ufs/inode.c:596:3: 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(ufsi->i_u1.i_data, &ufs_inode->ui_u2.ui_addr, ^~~~~~ fs/ufs/inode.c:596:3: 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(ufsi->i_u1.i_data, &ufs_inode->ui_u2.ui_addr, ^~~~~~ fs/ufs/inode.c:599:3: 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(ufsi->i_u1.i_symlink, ufs_inode->ui_u2.ui_symlink, ^~~~~~ fs/ufs/inode.c:599:3: 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(ufsi->i_u1.i_symlink, ufs_inode->ui_u2.ui_symlink, ^~~~~~ fs/ufs/inode.c:643:3: 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(ufsi->i_u1.u2_i_data, &ufs2_inode->ui_u2.ui_addr, ^~~~~~ fs/ufs/inode.c:643:3: 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(ufsi->i_u1.u2_i_data, &ufs2_inode->ui_u2.ui_addr, ^~~~~~ fs/ufs/inode.c:646:3: 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(ufsi->i_u1.i_symlink, ufs2_inode->ui_u2.ui_symlink, ^~~~~~ fs/ufs/inode.c:646:3: 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(ufsi->i_u1.i_symlink, ufs2_inode->ui_u2.ui_symlink, ^~~~~~ fs/ufs/inode.c:746:3: 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(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.i_data, ^~~~~~ fs/ufs/inode.c:746:3: 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(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.i_data, ^~~~~~ fs/ufs/inode.c:750:3: 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(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, ^~~~~~ fs/ufs/inode.c:750:3: 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(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, ^~~~~~ >> fs/ufs/inode.c:755: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 (ufs_inode, 0, sizeof(struct ufs_inode)); ^~~~~~ fs/ufs/inode.c:755: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 (ufs_inode, 0, sizeof(struct ufs_inode)); ^~~~~~ fs/ufs/inode.c:786:3: 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(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.u2_i_data, ^~~~~~ fs/ufs/inode.c:786:3: 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(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.u2_i_data, ^~~~~~ fs/ufs/inode.c:789:3: 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(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, ^~~~~~ fs/ufs/inode.c:789:3: 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(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, ^~~~~~ fs/ufs/inode.c:794: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 (ufs_inode, 0, sizeof(struct ufs2_inode)); ^~~~~~ fs/ufs/inode.c:794: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 (ufs_inode, 0, sizeof(struct ufs2_inode)); ^~~~~~ fs/ufs/inode.c:1104:10: 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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ufs/inode.c:1104:10: 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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ Suppressed 46 warnings (46 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. 2 warnings generated. Suppressed 2 warnings (2 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. 34 warnings generated. Suppressed 34 warnings (34 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. 9 warnings generated. Suppressed 9 warnings (9 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. 57 warnings generated. fs/jffs2/nodelist.h:106:6: warning: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref') [clang-analyzer-core.NullDereference] if (ref->flash_offset == REF_LINK_NODE) { ^ fs/jffs2/wbuf.c:288:6: note: Assuming the condition is false if (c->wbuf_ofs % c->mtd->erasesize) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:288:2: note: Taking false branch if (c->wbuf_ofs % c->mtd->erasesize) ^ fs/jffs2/wbuf.c:294:10: note: Assuming the condition is true BUG_ON(!ref_obsolete(jeb->last_node)); ^ fs/jffs2/nodelist.h:138:28: note: expanded from macro 'ref_obsolete' #define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE) ^ include/asm-generic/bug.h:161:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ~~~~~~~~~^~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ fs/jffs2/wbuf.c:294:2: note: Taking false branch BUG_ON(!ref_obsolete(jeb->last_node)); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/jffs2/wbuf.c:294:2: note: Loop condition is false. Exiting loop BUG_ON(!ref_obsolete(jeb->last_node)); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/jffs2/wbuf.c:298:2: note: Loop condition is true. Entering loop body for (next = raw = jeb->first_node; next; raw = next) { ^ fs/jffs2/wbuf.c:301:7: note: Assuming the condition is false if (ref_obsolete(raw) || ^ fs/jffs2/nodelist.h:138:28: note: expanded from macro 'ref_obsolete' #define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:301:7: note: Left side of '||' is false if (ref_obsolete(raw) || ^ fs/jffs2/nodelist.h:138:27: note: expanded from macro 'ref_obsolete' #define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE) ^ fs/jffs2/wbuf.c:302:8: note: 'next' is null (next && ref_offset(next) <= c->wbuf_ofs)) { ^~~~ fs/jffs2/wbuf.c:302:13: note: Left side of '&&' is false (next && ref_offset(next) <= c->wbuf_ofs)) { ^ fs/jffs2/wbuf.c:309:3: note: Taking false branch dbg_noderef("First node to be recovered is at 0x%08x(%d)-0x%08x\n", ^ fs/jffs2/debug.h:134:31: note: expanded from macro 'dbg_noderef' #define dbg_noderef(fmt, ...) no_printk(fmt, ##__VA_ARGS__) ^ include/linux/printk.h:131:2: note: expanded from macro 'no_printk' if (0) \ ^ fs/jffs2/wbuf.c:314:3: note: Execution continues on line 317 break; ^ fs/jffs2/wbuf.c:317:7: note: 'first_raw' is non-null if (!first_raw) { ^~~~~~~~~ fs/jffs2/wbuf.c:317:2: note: Taking false branch if (!first_raw) { ^ fs/jffs2/wbuf.c:329:2: note: Loop condition is true. Entering loop body while ((raw = ref_next(raw)) != jeb->last_node) ^ fs/jffs2/wbuf.c:329:16: note: Calling 'ref_next' while ((raw = ref_next(raw)) != jeb->last_node) ^~~~~~~~~~~~~ fs/jffs2/nodelist.h:103:2: note: Null pointer value stored to 'ref' ref++; ^~~~~ fs/jffs2/nodelist.h:106:6: note: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref') if (ref->flash_offset == REF_LINK_NODE) { ^~~ >> fs/jffs2/wbuf.c:382:4: 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(buf + (c->wbuf_ofs - start), c->wbuf, end - c->wbuf_ofs); ^~~~~~ fs/jffs2/wbuf.c:382:4: 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(buf + (c->wbuf_ofs - start), c->wbuf, end - c->wbuf_ofs); ^~~~~~ >> fs/jffs2/wbuf.c:446:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(c->wbuf, rewrite_buf + towrite, c->wbuf_len); ^~~~~~~ fs/jffs2/wbuf.c:446:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(c->wbuf, rewrite_buf + towrite, c->wbuf_len); ^~~~~~~ fs/jffs2/wbuf.c:451:4: 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(c->wbuf, buf, end-start); ^~~~~~ fs/jffs2/wbuf.c:451:4: 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(c->wbuf, buf, end-start); ^~~~~~ fs/jffs2/wbuf.c:453:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(c->wbuf, c->wbuf + (start - c->wbuf_ofs), end - start); ^~~~~~~ fs/jffs2/wbuf.c:453:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(c->wbuf, c->wbuf + (start - c->wbuf_ofs), end - start); ^~~~~~~ >> fs/jffs2/wbuf.c:614: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(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len); ^~~~~~ fs/jffs2/wbuf.c:614: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(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len); ^~~~~~ fs/jffs2/wbuf.c:691: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(c->wbuf,0xff,c->wbuf_pagesize); ^~~~~~ fs/jffs2/wbuf.c:691: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(c->wbuf,0xff,c->wbuf_pagesize); ^~~~~~ fs/jffs2/wbuf.c:789: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(c->wbuf + c->wbuf_len, buf, len); ^~~~~~ fs/jffs2/wbuf.c:789: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(c->wbuf + c->wbuf_len, buf, len); ^~~~~~ fs/jffs2/wbuf.c:813: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(c->wbuf,0xff,c->wbuf_pagesize); ^~~~~~ fs/jffs2/wbuf.c:813: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(c->wbuf,0xff,c->wbuf_pagesize); ^~~~~~ fs/jffs2/wbuf.c:876:39: warning: Division by zero [clang-analyzer-core.DivideZero] ret = mtd_write(c->mtd, outvec_to, PAGE_DIV(vlen), ^ fs/jffs2/wbuf.c:35:43: note: expanded from macro 'PAGE_DIV' #define PAGE_DIV(x) ( ((unsigned long)(x) / (unsigned long)(c->wbuf_pagesize)) * (unsigned long)(c->wbuf_pagesize) ) ^ fs/jffs2/wbuf.c:946:30: note: Assuming field 'wbuf' is not equal to null if (!jffs2_is_writebuffered(c)) ^ fs/jffs2/os-linux.h:103:36: note: expanded from macro 'jffs2_is_writebuffered' #define jffs2_is_writebuffered(c) (c->wbuf != NULL) ^~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:946:2: note: Taking false branch if (!jffs2_is_writebuffered(c)) ^ fs/jffs2/wbuf.c:951:9: note: Calling 'jffs2_flash_writev' return jffs2_flash_writev(c, vecs, 1, ofs, retlen, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:804:7: note: Field 'wbuf' is not equal to null if (!jffs2_is_writebuffered(c)) ^ fs/jffs2/os-linux.h:103:39: note: expanded from macro 'jffs2_is_writebuffered' #define jffs2_is_writebuffered(c) (c->wbuf != NULL) ^ fs/jffs2/wbuf.c:804:2: note: Taking false branch if (!jffs2_is_writebuffered(c)) ^ fs/jffs2/wbuf.c:810:6: note: Assuming field 'wbuf_ofs' is not equal to -1 if (c->wbuf_ofs == 0xFFFFFFFF) { ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:810:2: note: Taking false branch if (c->wbuf_ofs == 0xFFFFFFFF) { ^ fs/jffs2/wbuf.c:823:6: note: Assuming the condition is false if (SECTOR_ADDR(to) != SECTOR_ADDR(c->wbuf_ofs)) { ^ fs/jffs2/os-linux.h:65:24: note: expanded from macro 'SECTOR_ADDR' #define SECTOR_ADDR(x) ( (((unsigned long)(x) / c->sector_size) * c->sector_size) ) ^ fs/jffs2/wbuf.c:823:2: note: Taking false branch if (SECTOR_ADDR(to) != SECTOR_ADDR(c->wbuf_ofs)) { ^ fs/jffs2/wbuf.c:837:6: note: Assuming the condition is false if (to != PAD(c->wbuf_ofs + c->wbuf_len)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:837:2: note: Taking false branch if (to != PAD(c->wbuf_ofs + c->wbuf_len)) { ^ fs/jffs2/wbuf.c:848:6: note: Assuming the condition is false if (c->wbuf_len != PAGE_MOD(to)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:848:2: note: Taking false branch if (c->wbuf_len != PAGE_MOD(to)) { ^ fs/jffs2/wbuf.c:859:2: note: Loop condition is true. Entering loop body for (invec = 0; invec < count; invec++) { ^ fs/jffs2/wbuf.c:863:17: note: Calling 'jffs2_fill_wbuf' wbuf_retlen = jffs2_fill_wbuf(c, v, vlen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:784:6: note: Assuming 'len' is 0 if (len && !c->wbuf_len && (len >= c->wbuf_pagesize)) ^~~ fs/jffs2/wbuf.c:784:10: note: Left side of '&&' is false if (len && !c->wbuf_len && (len >= c->wbuf_pagesize)) ^ fs/jffs2/wbuf.c:787:2: note: Taking false branch if (len > (c->wbuf_pagesize - c->wbuf_len)) ^ fs/jffs2/wbuf.c:791:2: note: Returning without writing to 'c->wbuf_pagesize' return len; ^ fs/jffs2/wbuf.c:863:17: note: Returning from 'jffs2_fill_wbuf' wbuf_retlen = jffs2_fill_wbuf(c, v, vlen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/wbuf.c:865:7: note: Assuming field 'wbuf_len' is equal to field 'wbuf_pagesize' if (c->wbuf_len == c->wbuf_pagesize) { -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/cpudeadline.c:122:2: note: Taking true branch if (later_mask && ^ kernel/sched/cpudeadline.c:127:8: note: Left side of '&&' is false if (!static_branch_unlikely(&sched_asym_cpucapacity)) ^ include/linux/jump_label.h:508:52: note: expanded from macro 'static_branch_unlikely' #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key)) ^ include/linux/jump_label.h:416:67: note: expanded from macro 'static_key_enabled' if (!__builtin_types_compatible_p(typeof(*x), struct static_key) && \ ^ kernel/sched/cpudeadline.c:127:8: note: Assuming the condition is true if (!static_branch_unlikely(&sched_asym_cpucapacity)) ^ include/linux/jump_label.h:508:52: note: expanded from macro 'static_branch_unlikely' #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key)) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/jump_label.h:420:2: note: expanded from macro 'static_key_enabled' static_key_count((struct static_key *)x) > 0; \ ^ include/linux/compiler.h:80:39: note: expanded from macro 'unlikely_notrace' # define unlikely_notrace(x) unlikely(x) ~~~~~~~~~^~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ kernel/sched/cpudeadline.c:127:3: note: Taking false branch if (!static_branch_unlikely(&sched_asym_cpucapacity)) ^ kernel/sched/cpudeadline.c:131:3: note: Assuming 'cpu' is >= 'nr_cpu_ids' for_each_cpu(cpu, later_mask) { ^ include/linux/cpumask.h:278:3: note: expanded from macro 'for_each_cpu' (cpu) < nr_cpu_ids;) ^~~~~~~~~~~~~~~~~~ kernel/sched/cpudeadline.c:131:3: note: Loop condition is false. Execution continues on line 145 for_each_cpu(cpu, later_mask) { ^ include/linux/cpumask.h:276:2: note: expanded from macro 'for_each_cpu' for ((cpu) = -1; \ ^ kernel/sched/cpudeadline.c:145:3: note: Taking true branch if (cpumask_empty(later_mask)) ^ kernel/sched/cpudeadline.c:146:4: note: Calling 'cpumask_set_cpu' cpumask_set_cpu(max_cpu, later_mask); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/cpumask.h:346:2: note: Calling 'set_bit' set_bit(cpumask_check(cpu), cpumask_bits(dstp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/bitops.h:115:2: note: The result of the left shift is undefined because the right operand is negative __op_bit(or, __NOP, nr, addr); ^ arch/riscv/include/asm/bitops.h:58:2: note: expanded from macro '__op_bit' __op_bit_ord(op, mod, nr, addr, ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/bitops.h:52:14: note: expanded from macro '__op_bit_ord' : "r" (mod(BIT_MASK(nr))) \ ~~~~^~~~~~~~~~~~~ include/linux/bits.h:10:30: note: expanded from macro 'BIT_MASK' #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG)) ^ arch/riscv/include/asm/bitops.h:61:19: note: expanded from macro '__NOP' #define __NOP(x) (x) ^ Suppressed 68 warnings (68 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. 38 warnings generated. fs/d_path.c:50: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(dst, 'x', len); ^~~~~~ fs/d_path.c:50: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(dst, 'x', len); ^~~~~~ fs/d_path.c:308:7: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sz = vsnprintf(temp, sizeof(temp), fmt, args) + 1; ^~~~~~~~~ fs/d_path.c:308:7: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 sz = vsnprintf(temp, sizeof(temp), fmt, args) + 1; ^~~~~~~~~ fs/d_path.c:315:9: 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] return memcpy(buffer, temp, sz); ^~~~~~ fs/d_path.c:315:9: 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 return memcpy(buffer, temp, sz); ^~~~~~ Suppressed 35 warnings (34 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 50 warnings generated. Suppressed 50 warnings (50 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. 63 warnings generated. >> fs/orangefs/namei.c:44:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.create.d_name, ^~~~~~~ fs/orangefs/namei.c:44:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.create.d_name, ^~~~~~~ >> fs/orangefs/namei.c:86: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:86: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:140:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, ^~~~~~~ fs/orangefs/namei.c:140:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, ^~~~~~~ fs/orangefs/namei.c:195:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name, ^~~~~~~ fs/orangefs/namei.c:195:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name, ^~~~~~~ fs/orangefs/namei.c:211: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:211: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:250:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.sym.entry_name, ^~~~~~~ fs/orangefs/namei.c:250:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.sym.entry_name, ^~~~~~~ fs/orangefs/namei.c:253:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX - 1); ^~~~~~~ fs/orangefs/namei.c:253:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX - 1); ^~~~~~~ fs/orangefs/namei.c:298: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:298: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:327:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.mkdir.d_name, ^~~~~~~ fs/orangefs/namei.c:327:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.mkdir.d_name, ^~~~~~~ fs/orangefs/namei.c:369: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:369: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:396: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:396: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/namei.c:408:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.rename.d_old_name, ^~~~~~~ fs/orangefs/namei.c:408:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.rename.d_old_name, ^~~~~~~ fs/orangefs/namei.c:411:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.rename.d_new_name, ^~~~~~~ fs/orangefs/namei.c:411:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.rename.d_new_name, ^~~~~~~ Suppressed 50 warnings (50 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. 81 warnings generated. >> fs/ecryptfs/keystore.c:179: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(&message[i], signature, ECRYPTFS_SIG_SIZE_HEX); ^~~~~~ fs/ecryptfs/keystore.c:179: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(&message[i], signature, ECRYPTFS_SIG_SIZE_HEX); ^~~~~~ fs/ecryptfs/keystore.c:190: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(&message[i], session_key->encrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:190: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(&message[i], session_key->encrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:266: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(session_key->decrypted_key, &data[i], ^~~~~~ fs/ecryptfs/keystore.c:266: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(session_key->decrypted_key, &data[i], ^~~~~~ fs/ecryptfs/keystore.c:322: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(&message[i], signature, ECRYPTFS_SIG_SIZE_HEX); ^~~~~~ fs/ecryptfs/keystore.c:322: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(&message[i], signature, ECRYPTFS_SIG_SIZE_HEX); ^~~~~~ fs/ecryptfs/keystore.c:334: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(&message[i], crypt_stat->key, crypt_stat->key_size); ^~~~~~ fs/ecryptfs/keystore.c:334: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(&message[i], crypt_stat->key, crypt_stat->key_size); ^~~~~~ fs/ecryptfs/keystore.c:406: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(key_rec->enc_key, &data[i], key_rec->enc_key_size); ^~~~~~ fs/ecryptfs/keystore.c:406: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(key_rec->enc_key, &data[i], key_rec->enc_key_size); ^~~~~~ fs/ecryptfs/keystore.c:784:4: 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(s->hash, s->tmp_hash, ^~~~~~ fs/ecryptfs/keystore.c:784:4: 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(s->hash, s->tmp_hash, ^~~~~~ fs/ecryptfs/keystore.c:790: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(&s->block_aligned_filename[s->num_rand_bytes], filename, ^~~~~~ fs/ecryptfs/keystore.c:790: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(&s->block_aligned_filename[s->num_rand_bytes], filename, ^~~~~~ fs/ecryptfs/keystore.c:1076: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((*filename), &s->decrypted_filename[s->i], (*filename_size)); ^~~~~~ fs/ecryptfs/keystore.c:1076: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((*filename), &s->decrypted_filename[s->i], (*filename_size)); ^~~~~~ fs/ecryptfs/keystore.c:1170: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(crypt_stat->key, auth_tok->session_key.decrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1170: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(crypt_stat->key, auth_tok->session_key.decrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1310: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((*new_auth_tok)->session_key.encrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1310: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((*new_auth_tok)->session_key.encrypted_key, ^~~~~~ >> fs/ecryptfs/keystore.c:1327: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(auth_tok_list_item, 0, ^~~~~~ fs/ecryptfs/keystore.c:1327: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(auth_tok_list_item, 0, ^~~~~~ fs/ecryptfs/keystore.c:1464:3: 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((*new_auth_tok)->token.password.salt, ^~~~~~ fs/ecryptfs/keystore.c:1464:3: 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((*new_auth_tok)->token.password.salt, ^~~~~~ fs/ecryptfs/keystore.c:1475:3: 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((*new_auth_tok)->session_key.encrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1475:3: 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((*new_auth_tok)->session_key.encrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1503: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(auth_tok_list_item, 0, ^~~~~~ fs/ecryptfs/keystore.c:1503: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(auth_tok_list_item, 0, ^~~~~~ fs/ecryptfs/keystore.c:1599: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(contents, &data[(*packet_size)], (*tag_11_contents_size)); ^~~~~~ fs/ecryptfs/keystore.c:1599: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(contents, &data[(*packet_size)], (*tag_11_contents_size)); ^~~~~~ fs/ecryptfs/keystore.c:1726: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(crypt_stat->key, auth_tok->session_key.decrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1726: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(crypt_stat->key, auth_tok->session_key.decrypted_key, ^~~~~~ fs/ecryptfs/keystore.c:1887:4: warning: Value stored to 'found_auth_tok' is never read [clang-analyzer-deadcode.DeadStores] found_auth_tok = 1; ^ ~ fs/ecryptfs/keystore.c:1887:4: note: Value stored to 'found_auth_tok' is never read found_auth_tok = 1; ^ ~ fs/ecryptfs/keystore.c:1899:3: 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(&(candidate_auth_tok->token.private_key), ^~~~~~ fs/ecryptfs/keystore.c:1899:3: 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(&(candidate_auth_tok->token.private_key), ^~~~~~ fs/ecryptfs/keystore.c:1907:3: 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(&(candidate_auth_tok->token.password), ^~~~~~ fs/ecryptfs/keystore.c:1907:3: 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(&(candidate_auth_tok->token.password), ^~~~~~ fs/ecryptfs/keystore.c:2038:3: 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(key_rec->enc_key, ^~~~~~ fs/ecryptfs/keystore.c:2038:3: 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(key_rec->enc_key, ^~~~~~ fs/ecryptfs/keystore.c:2086: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(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE); ^~~~~~ fs/ecryptfs/keystore.c:2086: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(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE); ^~~~~~ fs/ecryptfs/keystore.c:2089: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(&dest[(*packet_size)], key_rec->enc_key, ^~~~~~ fs/ecryptfs/keystore.c:2089: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(&dest[(*packet_size)], key_rec->enc_key, ^~~~~~ fs/ecryptfs/keystore.c:2147: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(&dest[(*packet_length)], "_CONSOLE", 8); ^~~~~~ fs/ecryptfs/keystore.c:2147: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(&dest[(*packet_length)], "_CONSOLE", 8); ^~~~~~ fs/ecryptfs/keystore.c:2149: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(&dest[(*packet_length)], 0x00, 4); ^~~~~~ fs/ecryptfs/keystore.c:2149: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(&dest[(*packet_length)], 0x00, 4); ^~~~~~ fs/ecryptfs/keystore.c:2151: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(&dest[(*packet_length)], contents, contents_length); ^~~~~~ fs/ecryptfs/keystore.c:2151: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(&dest[(*packet_length)], contents, contents_length); ^~~~~~ fs/ecryptfs/keystore.c:2220: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((crypt_stat->key + 24), 0, 8); ^~~~~~ fs/ecryptfs/keystore.c:2220: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((crypt_stat->key + 24), 0, 8); ^~~~~~ fs/ecryptfs/keystore.c:2235:3: 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(key_rec->enc_key, ^~~~~~ fs/ecryptfs/keystore.c:2235:3: 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(key_rec->enc_key, -- ^~~~~~~~~~~~~~~ include/linux/bitops.h:154:2: note: Taking true branch if (sizeof(l) == 4) ^ include/linux/bitops.h:155:10: note: Calling 'fls' return fls(l); ^~~~~~ include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32 int r = 32; ^~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking false branch if (!x) ^ include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false if (!(x & 0xffff0000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:19:2: note: Taking false branch if (!(x & 0xffff0000u)) { ^ include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false if (!(x & 0xff000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:23:2: note: Taking false branch if (!(x & 0xff000000u)) { ^ include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false if (!(x & 0xf0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:27:2: note: Taking false branch if (!(x & 0xf0000000u)) { ^ include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false if (!(x & 0xc0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:31:2: note: Taking false branch if (!(x & 0xc0000000u)) { ^ include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false if (!(x & 0x80000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:35:2: note: Taking false branch if (!(x & 0x80000000u)) { ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ include/linux/bitops.h:155:10: note: Returning from 'fls' return fls(l); ^~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32 return fls(l); ^~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Returning from 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' return 1UL << fls_long(n - 1); ^ ~~~~~~~~~~~~~~~ Suppressed 31 warnings (31 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. 48 warnings generated. mm/mempool.c:333: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(new_elements, pool->elements, ^~~~~~ mm/mempool.c:333: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(new_elements, pool->elements, ^~~~~~ Suppressed 47 warnings (47 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. 50 warnings generated. mm/oom_kill.c:258:17: warning: Value stored to 'highest_zoneidx' during its initialization is never read [clang-analyzer-deadcode.DeadStores] enum zone_type highest_zoneidx = gfp_zone(oc->gfp_mask); ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ mm/oom_kill.c:258:17: note: Value stored to 'highest_zoneidx' during its initialization is never read enum zone_type highest_zoneidx = gfp_zone(oc->gfp_mask); ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ Suppressed 49 warnings (49 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. Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. drivers/spi/spi-tle62x0.c:122:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bp += sprintf(bp, "%s ", decode_fault(fault >> (ptr * 2))); ^~~~~~~ drivers/spi/spi-tle62x0.c:122:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 bp += sprintf(bp, "%s ", decode_fault(fault >> (ptr * 2))); ^~~~~~~ Suppressed 35 warnings (35 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. 38 warnings generated. >> drivers/spi/spi-zynqmp-gqspi.c:347: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(xqspi->rxbuf, &data, size); ^~~~~~ drivers/spi/spi-zynqmp-gqspi.c:347: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(xqspi->rxbuf, &data, size); ^~~~~~ drivers/spi/spi-zynqmp-gqspi.c:513:4: 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(&intermediate, xqspi->txbuf, 4); ^~~~~~ drivers/spi/spi-zynqmp-gqspi.c:513:4: 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(&intermediate, xqspi->txbuf, 4); ^~~~~~ drivers/spi/spi-zynqmp-gqspi.c:518:4: 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(&intermediate, xqspi->txbuf, ^~~~~~ drivers/spi/spi-zynqmp-gqspi.c:518:4: 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(&intermediate, xqspi->txbuf, ^~~~~~ Suppressed 35 warnings (35 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. 20 warnings generated. crypto/streebog_generic.c:914: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(ctx, 0, sizeof(struct streebog_state)); ^~~~~~ crypto/streebog_generic.c:914: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(ctx, 0, sizeof(struct streebog_state)); ^~~~~~ crypto/streebog_generic.c:927: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(ctx->buffer + ctx->fillsize, 0, ^~~~~~ crypto/streebog_generic.c:927: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(ctx->buffer + ctx->fillsize, 0, ^~~~~~ crypto/streebog_generic.c:979: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(&m, data, sizeof(m)); ^~~~~~ crypto/streebog_generic.c:979: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(&m, data, sizeof(m)); ^~~~~~ crypto/streebog_generic.c:999: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(&ctx->hash, &ctx->h, sizeof(struct streebog_uint512)); ^~~~~~ crypto/streebog_generic.c:999: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(&ctx->hash, &ctx->h, sizeof(struct streebog_uint512)); ^~~~~~ crypto/streebog_generic.c:1012:3: 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(&ctx->buffer[ctx->fillsize], data, chunksize); ^~~~~~ crypto/streebog_generic.c:1012:3: 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(&ctx->buffer[ctx->fillsize], data, chunksize); ^~~~~~ crypto/streebog_generic.c:1030:3: 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(&ctx->buffer, data, len); ^~~~~~ crypto/streebog_generic.c:1030:3: 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(&ctx->buffer, data, len); ^~~~~~ crypto/streebog_generic.c:1043:3: 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(digest, &ctx->hash.qword[4], STREEBOG256_DIGEST_SIZE); ^~~~~~ crypto/streebog_generic.c:1043:3: 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(digest, &ctx->hash.qword[4], STREEBOG256_DIGEST_SIZE); ^~~~~~ crypto/streebog_generic.c:1045:3: 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(digest, &ctx->hash.qword[0], STREEBOG512_DIGEST_SIZE); ^~~~~~ crypto/streebog_generic.c:1045:3: 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(digest, &ctx->hash.qword[0], STREEBOG512_DIGEST_SIZE); ^~~~~~ Suppressed 12 warnings (12 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. 47 warnings generated. fs/bfs/dir.c:228:2: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores] error = -EPERM; ^ ~~~~~~ fs/bfs/dir.c:228:2: note: Value stored to 'error' is never read error = -EPERM; ^ ~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. fs/ecryptfs/inode.c:933:4: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores] rc = 0; ^ ~ fs/ecryptfs/inode.c:933:4: note: Value stored to 'rc' is never read rc = 0; ^ ~ >> fs/ecryptfs/inode.c:949: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(&lower_ia, ia, sizeof(lower_ia)); ^~~~~~ fs/ecryptfs/inode.c:949: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(&lower_ia, ia, sizeof(lower_ia)); ^~~~~~ Suppressed 46 warnings (46 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. 70 warnings generated. >> fs/ecryptfs/main.c:215: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((void *)mount_crypt_stat, 0, ^~~~~~ fs/ecryptfs/main.c:215: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((void *)mount_crypt_stat, 0, ^~~~~~ >> fs/ecryptfs/main.c:299:4: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(cipher_name_dst, cipher_name_src, ^~~~~~~ fs/ecryptfs/main.c:299:4: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(cipher_name_dst, cipher_name_src, ^~~~~~~ fs/ecryptfs/main.c:331:4: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(fnek_dst, fnek_src, ECRYPTFS_SIG_SIZE_HEX); ^~~~~~~ fs/ecryptfs/main.c:331:4: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(fnek_dst, fnek_src, ECRYPTFS_SIG_SIZE_HEX); ^~~~~~~ fs/ecryptfs/main.c:353:4: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(fn_cipher_name_dst, fn_cipher_name_src, ^~~~~~~ fs/ecryptfs/main.c:353:4: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(fn_cipher_name_dst, fn_cipher_name_src, ^~~~~~~ fs/ecryptfs/main.c:401:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(mount_crypt_stat->global_default_fn_cipher_name, ^~~~~~ fs/ecryptfs/main.c:401:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(mount_crypt_stat->global_default_fn_cipher_name, ^~~~~~ >> fs/ecryptfs/main.c:772:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buff, PAGE_SIZE, "%d\n", ECRYPTFS_VERSIONING_MASK); ^~~~~~~~ fs/ecryptfs/main.c:772:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buff, PAGE_SIZE, "%d\n", ECRYPTFS_VERSIONING_MASK); ^~~~~~~~ Suppressed 64 warnings (64 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. 36 warnings generated. kernel/params.c:279:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(*(char **)kp->arg, val); ^~~~~~ kernel/params.c:279:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(*(char **)kp->arg, val); ^~~~~~ kernel/params.c:320:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buffer, "%c\n", *(bool *)kp->arg ? 'Y' : 'N'); ^~~~~~~ kernel/params.c:320:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buffer, "%c\n", *(bool *)kp->arg ? 'Y' : 'N'); ^~~~~~~ kernel/params.c:379:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buffer, "%c\n", (*(bool *)kp->arg) ? 'N' : 'Y'); ^~~~~~~ kernel/params.c:379:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buffer, "%c\n", (*(bool *)kp->arg) ? 'N' : 'Y'); ^~~~~~~ kernel/params.c:519:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(kps->string, val); ^~~~~~ kernel/params.c:519:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(kps->string, val); ^~~~~~ kernel/params.c:668: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(&mk->mp->attrs[mk->mp->num], 0, sizeof(mk->mp->attrs[0])); ^~~~~~ kernel/params.c:668: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(&mk->mp->attrs[mk->mp->num], 0, sizeof(mk->mp->attrs[0])); ^~~~~~ Suppressed 31 warnings (31 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. 35 warnings generated. Suppressed 35 warnings (35 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. kernel/irq/irqdomain.c:618:2: warning: Value stored to 'of_node' is never read [clang-analyzer-deadcode.DeadStores] of_node = irq_domain_get_of_node(domain); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/irq/irqdomain.c:618:2: note: Value stored to 'of_node' is never read of_node = irq_domain_get_of_node(domain); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 19 warnings generated. Suppressed 19 warnings (19 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. 22 warnings generated. Suppressed 22 warnings (22 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. 21 warnings generated. Suppressed 21 warnings (21 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. Suppressed 46 warnings (46 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. 48 warnings generated. Suppressed 48 warnings (48 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. 63 warnings generated. include/linux/math64.h:92:15: warning: Division by zero [clang-analyzer-core.DivideZero] *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ^ fs/f2fs/debug.c:349:2: note: Loop condition is true. Entering loop body list_for_each_entry(si, &f2fs_stat_list, stat_list) { -- fs/f2fs/debug.c:372:7: note: Assuming the condition is false if (test_opt(si->sbi, DISCARD)) ^ fs/f2fs/f2fs.h:112:32: note: expanded from macro 'test_opt' #define test_opt(sbi, option) (F2FS_OPTION(sbi).opt & F2FS_MOUNT_##option) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/f2fs/f2fs.h:109:26: note: expanded from macro 'F2FS_OPTION' #define F2FS_OPTION(sbi) ((sbi)->mount_opt) ^ fs/f2fs/debug.c:372:3: note: Taking false branch if (test_opt(si->sbi, DISCARD)) ^ fs/f2fs/debug.c:501:5: note: Assuming field 'total_ext' is not equal to 0 !si->total_ext ? 0 : ^~~~~~~~~~~~~~ fs/f2fs/debug.c:501:5: note: '?' condition is false fs/f2fs/debug.c:543:15: note: Assuming 'j' is >= field 'util_valid' for (j = 0; j < si->util_valid; j++) ^~~~~~~~~~~~~~~~~~ fs/f2fs/debug.c:543:3: note: Loop condition is false. Execution continues on line 545 for (j = 0; j < si->util_valid; j++) ^ fs/f2fs/debug.c:547:15: note: Assuming 'j' is >= field 'util_invalid' for (j = 0; j < si->util_invalid; j++) ^~~~~~~~~~~~~~~~~~~~ fs/f2fs/debug.c:547:3: note: Loop condition is false. Execution continues on line 549 for (j = 0; j < si->util_invalid; j++) ^ fs/f2fs/debug.c:551:15: note: Assuming 'j' is >= field 'util_free' for (j = 0; j < si->util_free; j++) ^~~~~~~~~~~~~~~~~ fs/f2fs/debug.c:551:3: note: Loop condition is false. Execution continues on line 553 for (j = 0; j < si->util_free; j++) ^ fs/f2fs/debug.c:561:3: note: Calling 'f2fs_update_sit_info' f2fs_update_sit_info(si->sbi); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/f2fs/debug.c:38:2: note: 'ndirty' initialized to 0 int ndirty = 0; ^~~~~~~~~~ fs/f2fs/debug.c:44:18: note: Assuming 'segno' is >= field 'main_segments' for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { ^~~~~~~~~~~~~~~~~~~~~~ fs/f2fs/debug.c:44:2: note: Loop condition is false. Execution continues on line 54 for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { ^ fs/f2fs/debug.c:56:6: note: Assuming field 'dirty_count' is not equal to 0 if (si->dirty_count) ^~~~~~~~~~~~~~~ fs/f2fs/debug.c:56:2: note: Taking true branch if (si->dirty_count) ^ fs/f2fs/debug.c:57:44: note: Passing the value 0 via 2nd parameter 'divisor' si->avg_vblocks = div_u64(total_vblocks, ndirty); ^~~~~~ fs/f2fs/debug.c:57:21: note: Calling 'div_u64' si->avg_vblocks = div_u64(total_vblocks, ndirty); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/math64.h:128:31: note: Passing the value 0 via 2nd parameter 'divisor' return div_u64_rem(dividend, divisor, &remainder); ^~~~~~~ include/linux/math64.h:128:9: note: Calling 'div_u64_rem' return div_u64_rem(dividend, divisor, &remainder); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/math64.h:92:15: note: '__base' initialized to 0 *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:220:2: note: expanded from macro 'do_div' uint32_t __base = (base); \ ^~~~~~~~~~~~~~~ include/linux/math64.h:92:15: note: Left side of '&&' is false *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:223:35: note: expanded from macro 'do_div' if (__builtin_constant_p(__base) && \ ^ include/linux/math64.h:92:15: note: Left side of '&&' is false *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:227:42: note: expanded from macro 'do_div' } else if (__builtin_constant_p(__base) && \ ^ include/linux/math64.h:92:15: note: Taking true branch *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:234:9: note: expanded from macro 'do_div' } else if (likely(((n) >> 32) == 0)) { \ ^ include/linux/math64.h:92:15: note: Division by zero *remainder = do_div(dividend, divisor); ^ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ~~~~~~~~~~~~~~^~~~~~~~ Suppressed 62 warnings (62 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. 50 warnings generated. Suppressed 50 warnings (50 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. 65 warnings generated. >> fs/orangefs/xattr.c:141:4: 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(buffer, cx->val, cx->length); ^~~~~~ fs/orangefs/xattr.c:141:4: 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(buffer, cx->val, cx->length); ^~~~~~ >> fs/orangefs/xattr.c:142:4: 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(buffer + cx->length, 0, size - cx->length); ^~~~~~ fs/orangefs/xattr.c:142:4: 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(buffer + cx->length, 0, size - cx->length); ^~~~~~ fs/orangefs/xattr.c:153:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(new_op->upcall.req.getxattr.key, name); ^~~~~~ fs/orangefs/xattr.c:153:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(new_op->upcall.req.getxattr.key, name); ^~~~~~ fs/orangefs/xattr.c:174:5: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(cx->key, name); ^~~~~~ fs/orangefs/xattr.c:174:5: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(cx->key, name); ^~~~~~ fs/orangefs/xattr.c:206: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(buffer, new_op->downcall.resp.getxattr.val, length); ^~~~~~ fs/orangefs/xattr.c:206: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(buffer, new_op->downcall.resp.getxattr.val, length); ^~~~~~ fs/orangefs/xattr.c:207: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(buffer + length, 0, size - length); ^~~~~~ fs/orangefs/xattr.c:207: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(buffer + length, 0, size - length); ^~~~~~ fs/orangefs/xattr.c:221:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(cx->key, name); ^~~~~~ fs/orangefs/xattr.c:221:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(cx->key, name); ^~~~~~ fs/orangefs/xattr.c:222:3: 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(cx->val, buffer, length); ^~~~~~ fs/orangefs/xattr.c:222:3: 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(cx->val, buffer, length); ^~~~~~ fs/orangefs/xattr.c:228:4: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(cx->key, name); ^~~~~~ fs/orangefs/xattr.c:228:4: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(cx->key, name); ^~~~~~ fs/orangefs/xattr.c:229:4: 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(cx->val, buffer, length); ^~~~~~ fs/orangefs/xattr.c:229:4: 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(cx->val, buffer, length); ^~~~~~ fs/orangefs/xattr.c:268:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(new_op->upcall.req.removexattr.key, name); ^~~~~~ fs/orangefs/xattr.c:268:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(new_op->upcall.req.removexattr.key, name); ^~~~~~ fs/orangefs/xattr.c:362:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(new_op->upcall.req.setxattr.keyval.key, name); ^~~~~~ fs/orangefs/xattr.c:362:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(new_op->upcall.req.setxattr.keyval.key, name); ^~~~~~ fs/orangefs/xattr.c:364: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(new_op->upcall.req.setxattr.keyval.val, value, size); ^~~~~~ fs/orangefs/xattr.c:364: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(new_op->upcall.req.setxattr.keyval.val, value, size); ^~~~~~ fs/orangefs/xattr.c:430: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(buffer, 0, size); ^~~~~~ fs/orangefs/xattr.c:430: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(buffer, 0, size); ^~~~~~ fs/orangefs/xattr.c:492:4: 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(buffer + total, ^~~~~~ fs/orangefs/xattr.c:492:4: 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(buffer + total, ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. >> drivers/crypto/ccree/cc_buffer_mgr.c:1174:4: 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(areq_ctx->buff_sg, src, ^~~~~~ drivers/crypto/ccree/cc_buffer_mgr.c:1174:4: 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(areq_ctx->buff_sg, src, ^~~~~~ drivers/crypto/ccree/cc_buffer_mgr.c:1287:4: 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(areq_ctx->buff_sg, src, ^~~~~~ drivers/crypto/ccree/cc_buffer_mgr.c:1287:4: 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(areq_ctx->buff_sg, src, ^~~~~~ Suppressed 48 warnings (48 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. 19 warnings generated. drivers/input/gameport/gameport.c:462:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", gameport->name); ^~~~~~~ drivers/input/gameport/gameport.c:462:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", gameport->name); ^~~~~~~ drivers/input/gameport/gameport.c:516:2: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] vsnprintf(gameport->phys, sizeof(gameport->phys), fmt, args); ^~~~~~~~~ drivers/input/gameport/gameport.c:516:2: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 vsnprintf(gameport->phys, sizeof(gameport->phys), fmt, args); ^~~~~~~~~ drivers/input/gameport/gameport.c:681:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)"); ^~~~~~~ drivers/input/gameport/gameport.c:681:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)"); ^~~~~~~ Suppressed 16 warnings (16 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. 48 warnings generated. Suppressed 48 warnings (48 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. 49 warnings generated. fs/direct-io.c:1160: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(dio, 0, offsetof(struct dio, pages)); ^~~~~~ fs/direct-io.c:1160: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(dio, 0, offsetof(struct dio, pages)); ^~~~~~ fs/direct-io.c:1239:2: warning: Value stored to 'retval' is never read [clang-analyzer-deadcode.DeadStores] retval = 0; ^ ~ fs/direct-io.c:1239:2: note: Value stored to 'retval' is never read retval = 0; ^ ~ Suppressed 47 warnings (47 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. 49 warnings generated. fs/mpage.c:295:40: warning: The left operand of '<<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (!bdev_read_page(bdev, blocks[0] << (blkbits - 9), ^ fs/mpage.c:401:13: note: Calling 'do_mpage_readpage' args.bio = do_mpage_readpage(&args); ^~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:177:12: note: Field 'is_readahead' is false if (args->is_readahead) { ^ fs/mpage.c:177:2: note: Taking false branch if (args->is_readahead) { ^ fs/mpage.c:185:6: note: Assuming the condition is false if (page_has_buffers(page)) ^ include/linux/buffer_head.h:146:32: note: expanded from macro 'page_has_buffers' #define page_has_buffers(page) PagePrivate(page) ^~~~~~~~~~~~~~~~~ fs/mpage.c:185:2: note: Taking false branch if (page_has_buffers(page)) ^ fs/mpage.c:191:6: note: Assuming 'last_block' is <= 'last_block_in_file' if (last_block > last_block_in_file) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:191:2: note: Taking false branch if (last_block > last_block_in_file) ^ fs/mpage.c:199:28: note: Left side of '&&' is false if (buffer_mapped(map_bh) && ^ fs/mpage.c:224:9: note: Assuming 'page_block' is >= 'blocks_per_page' while (page_block < blocks_per_page) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:224:2: note: Loop condition is false. Execution continues on line 275 while (page_block < blocks_per_page) { ^ fs/mpage.c:275:6: note: 'first_hole' is equal to 'blocks_per_page' if (first_hole != blocks_per_page) { ^~~~~~~~~~ fs/mpage.c:275:2: note: Taking false branch if (first_hole != blocks_per_page) { ^ fs/mpage.c:282:13: note: 'fully_mapped' is 1 } else if (fully_mapped) { ^~~~~~~~~~~~ fs/mpage.c:282:9: note: Taking true branch } else if (fully_mapped) { -- ^~~~~~~~~~~~~~~~~ fs/mpage.c:519:8: note: Left side of '||' is false fs/mpage.c:519:29: note: Assuming the condition is false if (!buffer_dirty(bh) || !buffer_uptodate(bh)) ^~~~~~~~~~~~~~~~~~~~ fs/mpage.c:519:4: note: Taking false branch if (!buffer_dirty(bh) || !buffer_uptodate(bh)) ^ fs/mpage.c:521:8: note: 'page_block' is 0 if (page_block) { ^~~~~~~~~~ fs/mpage.c:521:4: note: Taking false branch if (page_block) { ^ fs/mpage.c:527:8: note: Assuming 'boundary' is 0 if (boundary) { ^~~~~~~~ fs/mpage.c:527:4: note: Taking false branch if (boundary) { ^ fs/mpage.c:532:12: note: Assuming the condition is false } while ((bh = bh->b_this_page) != head); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:502:3: note: Loop condition is false. Exiting loop do { ^ fs/mpage.c:534:7: note: Assuming 'first_unmapped' is not equal to 0 if (first_unmapped) ^~~~~~~~~~~~~~ fs/mpage.c:534:3: note: Taking true branch if (first_unmapped) ^ fs/mpage.c:535:4: note: Control jumps to line 581 goto page_is_mapped; ^ fs/mpage.c:582:6: note: Assuming 'end_index' is > field 'index' if (page->index >= end_index) { ^~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:582:2: note: Taking false branch if (page->index >= end_index) { ^ fs/mpage.c:601:6: note: Assuming 'bio' is non-null if (bio && mpd->last_block_in_bio != blocks[0] - 1) ^~~ fs/mpage.c:601:6: note: Left side of '&&' is true fs/mpage.c:601:13: note: Assuming the condition is false if (bio && mpd->last_block_in_bio != blocks[0] - 1) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:601:2: note: Taking false branch if (bio && mpd->last_block_in_bio != blocks[0] - 1) ^ fs/mpage.c:605:6: note: 'bio' is not equal to NULL if (bio == NULL) { ^~~ fs/mpage.c:605:2: note: Taking false branch if (bio == NULL) { ^ fs/mpage.c:627:6: note: Assuming the condition is false if (bio_add_page(bio, page, length, 0) < length) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/mpage.c:627:2: note: Taking false branch if (bio_add_page(bio, page, length, 0) < length) { ^ fs/mpage.c:634:2: note: Assuming the condition is true BUG_ON(PageWriteback(page)); ^ include/asm-generic/bug.h:161:36: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ fs/mpage.c:634:2: note: Taking false branch BUG_ON(PageWriteback(page)); ^ include/asm-generic/bug.h:161:32: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/mpage.c:634:2: note: Loop condition is false. Exiting loop BUG_ON(PageWriteback(page)); ^ include/asm-generic/bug.h:161:27: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^ fs/mpage.c:637:6: note: 'boundary' is 0 if (boundary || (first_unmapped != blocks_per_page)) { ^~~~~~~~ fs/mpage.c:637:6: note: Left side of '||' is false fs/mpage.c:637:19: note: 'first_unmapped' is equal to 'blocks_per_page' if (boundary || (first_unmapped != blocks_per_page)) { ^~~~~~~~~~~~~~ fs/mpage.c:637:2: note: Taking false branch if (boundary || (first_unmapped != blocks_per_page)) { ^ fs/mpage.c:644:26: note: Assigned value is garbage or undefined mpd->last_block_in_bio = blocks[blocks_per_page - 1]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 47 warnings (47 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. 32 warnings generated. >> fs/jffs2/compr_lzo.c:57: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(cpage_out, lzo_compress_buf, compress_size); ^~~~~~ fs/jffs2/compr_lzo.c:57: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(cpage_out, lzo_compress_buf, compress_size); ^~~~~~ Suppressed 31 warnings (31 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. 53 warnings generated. >> fs/jffs2/summary.c:152: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(temp->name, rd->name, rd->nsize); ^~~~~~ fs/jffs2/summary.c:152: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(temp->name, rd->name, rd->nsize); ^~~~~~ fs/jffs2/summary.c:300:6: 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(temp->name,node->d.name,node->d.nsize); ^~~~~~ fs/jffs2/summary.c:300:6: 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(temp->name,node->d.name,node->d.nsize); ^~~~~~ fs/jffs2/summary.c:304:6: 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(temp->name,invecs[1].iov_base,node->d.nsize); ^~~~~~ fs/jffs2/summary.c:304:6: 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(temp->name,invecs[1].iov_base,node->d.nsize); ^~~~~~ fs/jffs2/summary.c:464:5: 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(&fd->name, spd->name, checkedlen); ^~~~~~ fs/jffs2/summary.c:464:5: 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(&fd->name, spd->name, checkedlen); ^~~~~~ >> fs/jffs2/summary.c:706: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(c->summary->sum_buf, 0xff, datasize); ^~~~~~ fs/jffs2/summary.c:706: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(c->summary->sum_buf, 0xff, datasize); ^~~~~~ fs/jffs2/summary.c:707: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(&isum, 0, sizeof(isum)); ^~~~~~ fs/jffs2/summary.c:707: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(&isum, 0, sizeof(isum)); ^~~~~~ fs/jffs2/summary.c:748:5: 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(sdrnt_ptr->name, temp->d.name, ^~~~~~ fs/jffs2/summary.c:748:5: 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(sdrnt_ptr->name, temp->d.name, ^~~~~~ Suppressed 46 warnings (46 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. 50 warnings generated. block/bio-integrity.c:70: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(bip, 0, sizeof(*bip)); ^~~~~~ block/bio-integrity.c:70: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(bip, 0, sizeof(*bip)); ^~~~~~ block/bio-integrity.c:415: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(bip->bip_vec, bip_src->bip_vec, ^~~~~~ block/bio-integrity.c:415: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(bip->bip_vec, bip_src->bip_vec, ^~~~~~ Suppressed 48 warnings (48 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. 56 warnings generated. block/blk-integrity.c:251:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%s\n", bi->profile->name); ^~~~~~~ block/blk-integrity.c:251:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "%s\n", bi->profile->name); ^~~~~~~ block/blk-integrity.c:253:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "none\n"); ^~~~~~~ block/blk-integrity.c:253:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "none\n"); ^~~~~~~ block/blk-integrity.c:258:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%u\n", bi->tag_size); ^~~~~~~ block/blk-integrity.c:258:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%u\n", bi->tag_size); ^~~~~~~ block/blk-integrity.c:263:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%u\n", ^~~~~~~ block/blk-integrity.c:263:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%u\n", ^~~~~~~ block/blk-integrity.c:283:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0); ^~~~~~~ block/blk-integrity.c:283:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0); ^~~~~~~ block/blk-integrity.c:302:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_GENERATE) != 0); ^~~~~~~ block/blk-integrity.c:302:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_GENERATE) != 0); ^~~~~~~ block/blk-integrity.c:307:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%u\n", ^~~~~~~ block/blk-integrity.c:307:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%u\n", ^~~~~~~ block/blk-integrity.c:437: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(bi, 0, sizeof(*bi)); ^~~~~~ block/blk-integrity.c:437: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(bi, 0, sizeof(*bi)); ^~~~~~ Suppressed 48 warnings (48 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. 41 warnings generated. drivers/remoteproc/remoteproc_core.c:263:2: warning: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] vsnprintf(_name, sizeof(_name), name, args); ^~~~~~~~~ drivers/remoteproc/remoteproc_core.c:263:2: note: Call to function 'vsnprintf' 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 'vsnprintf_s' in case of C11 vsnprintf(_name, sizeof(_name), name, args); ^~~~~~~~~ drivers/remoteproc/remoteproc_core.c:557:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index); ^~~~~~~~ drivers/remoteproc/remoteproc_core.c:557:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index); ^~~~~~~~ drivers/remoteproc/remoteproc_core.c:683:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "trace%d", rproc->num_traces); -- ^~~~~~ drivers/char/ipmi/ipmi_smic_sm.c:169: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, smic->read_data, smic->read_pos); ^~~~~~ Suppressed 34 warnings (34 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. 44 warnings generated. drivers/char/ipmi/ipmi_bt_sm.c:155:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "B_BUSY "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:155:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "B_BUSY "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:157:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "H_BUSY "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:157:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "H_BUSY "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:159:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "OEM0 "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:159:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "OEM0 "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:161:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "SMS "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:161:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "SMS "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:163:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "B2H "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:163:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "B2H "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:165:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "H2B "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:165:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "H2B "); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:166:2: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "]"); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:166:2: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "]"); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:175: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(bt, 0, sizeof(struct si_sm_data)); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:175: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(bt, 0, sizeof(struct si_sm_data)); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:231: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(bt->write_data + 3, data + 1, size - 1); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:231: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(bt->write_data + 3, data + 1, size - 1); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:264:3: 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 + 2, bt->read_data + 4, msg_len - 2); ^~~~~~ drivers/char/ipmi/ipmi_bt_sm.c:264:3: 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 + 2, bt->read_data + 4, msg_len - 2); ^~~~~~ Suppressed 34 warnings (34 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. 53 warnings generated. drivers/char/random.c:1378: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(out, hash, EXTRACT_SIZE); ^~~~~~ drivers/char/random.c:1378: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(out, hash, EXTRACT_SIZE); ^~~~~~ drivers/char/random.c:1390:3: 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(buf, tmp, i); ^~~~~~ drivers/char/random.c:1390:3: 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(buf, tmp, i); ^~~~~~ drivers/char/random.c:1463:3: 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(buf, tmp, nbytes); ^~~~~~ drivers/char/random.c:1463:3: 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(buf, tmp, nbytes); ^~~~~~ drivers/char/random.c:1654:3: 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(p, &v, chunk); ^~~~~~ drivers/char/random.c:1654:3: 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(p, &v, chunk); ^~~~~~ Suppressed 49 warnings (48 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 30 warnings generated. Suppressed 30 warnings (30 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. 37 warnings generated. >> fs/pstore/ram_core.c:104: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(prz->ecc_info.par, 0, ^~~~~~ fs/pstore/ram_core.c:104: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(prz->ecc_info.par, 0, ^~~~~~ >> fs/pstore/ram_core.c:265:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(str, len, "" ^~~~~~~~ fs/pstore/ram_core.c:265:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(str, len, "" ^~~~~~~~ fs/pstore/ram_core.c:269:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(str, len, "\nNo errors detected\n"); ^~~~~~~~ fs/pstore/ram_core.c:269:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(str, len, "\nNo errors detected\n"); ^~~~~~~~ Suppressed 34 warnings (34 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. 54 warnings generated. fs/binfmt_misc.c:296: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(e, 0, sizeof(Node)); ^~~~~~ fs/binfmt_misc.c:296: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(e, 0, sizeof(Node)); ^~~~~~ fs/binfmt_misc.c:305: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(buf + count, del, 8); ^~~~~~ fs/binfmt_misc.c:305: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(buf + count, del, 8); ^~~~~~ fs/binfmt_misc.c:511:3: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(page, "%s\n", status); ^~~~~~~ fs/binfmt_misc.c:511:3: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(page, "%s\n", status); ^~~~~~~ fs/binfmt_misc.c:515:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] dp += sprintf(dp, "%s\ninterpreter %s\n", status, e->interpreter); ^~~~~~~ fs/binfmt_misc.c:515:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 dp += sprintf(dp, "%s\ninterpreter %s\n", status, e->interpreter); ^~~~~~~ fs/binfmt_misc.c:518:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] dp += sprintf(dp, "flags: "); ^~~~~~~ fs/binfmt_misc.c:518:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 dp += sprintf(dp, "flags: "); ^~~~~~~ fs/binfmt_misc.c:530:3: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(dp, "extension .%s\n", e->magic); ^~~~~~~ fs/binfmt_misc.c:530:3: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(dp, "extension .%s\n", e->magic); ^~~~~~~ fs/binfmt_misc.c:532:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] dp += sprintf(dp, "offset %i\nmagic ", e->offset); ^~~~~~~ fs/binfmt_misc.c:532:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 dp += sprintf(dp, "offset %i\nmagic ", e->offset); ^~~~~~~ fs/binfmt_misc.c:535:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] dp += sprintf(dp, "\nmask "); ^~~~~~~ fs/binfmt_misc.c:535:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 dp += sprintf(dp, "\nmask "); ^~~~~~~ Suppressed 46 warnings (46 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. 16 warnings generated. crypto/cfb.c:76: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(walk->iv, iv, bsize); ^~~~~~ crypto/cfb.c:76: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(walk->iv, iv, bsize); ^~~~~~ crypto/cfb.c:98: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(walk->iv, iv, bsize); ^~~~~~ crypto/cfb.c:98: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(walk->iv, iv, bsize); ^~~~~~ crypto/cfb.c:146: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(walk->iv, iv, bsize); ^~~~~~ crypto/cfb.c:146: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(walk->iv, iv, bsize); ^~~~~~ crypto/cfb.c:162:3: 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(iv, src, bsize); ^~~~~~ crypto/cfb.c:162:3: 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(iv, src, bsize); ^~~~~~ Suppressed 12 warnings (12 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. 63 warnings generated. crypto/ccm.c:73: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(block, 0, csize); ^~~~~~ crypto/ccm.c:73: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(block, 0, csize); ^~~~~~ crypto/ccm.c:82: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(block - csize, (u8 *)&data + 4 - csize, csize); -- ^~~~~~ lib/bch.c:440: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(dst, src, GF_POLY_SZ(src->deg)); ^~~~~~ lib/bch.c:440: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, GF_POLY_SZ(src->deg)); ^~~~~~ lib/bch.c:454: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(pelp, 0, GF_POLY_SZ(2*t)); ^~~~~~ lib/bch.c:454: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(pelp, 0, GF_POLY_SZ(2*t)); ^~~~~~ lib/bch.c:455: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(elp, 0, GF_POLY_SZ(2*t)); ^~~~~~ lib/bch.c:455: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(elp, 0, GF_POLY_SZ(2*t)); ^~~~~~ lib/bch.c:823:3: 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(q->c, &a->c[b->deg], (1+q->deg)*sizeof(unsigned int)); ^~~~~~ lib/bch.c:823:3: 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(q->c, &a->c[b->deg], (1+q->deg)*sizeof(unsigned int)); ^~~~~~ lib/bch.c:875: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(out, 0, GF_POLY_SZ(f->deg)); ^~~~~~ lib/bch.c:875: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(out, 0, GF_POLY_SZ(f->deg)); ^~~~~~ lib/bch.c:1123:27: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] const unsigned int k = 1 << deg(poly); ^ ~~~~~~~~~ lib/bch.c:1123:30: note: Calling 'deg' const unsigned int k = 1 << deg(poly); ^~~~~~~~~ lib/bch.c:345:2: note: Returning the value -1 return fls(poly)-1; ^~~~~~~~~~~~~~~~~~ lib/bch.c:1123:30: note: Returning from 'deg' const unsigned int k = 1 << deg(poly); ^~~~~~~~~ lib/bch.c:1123:27: note: The result of the left shift is undefined because the right operand is negative const unsigned int k = 1 << deg(poly); ^ ~~~~~~~~~ lib/bch.c:1156: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(bch->mod8_tab, 0, 4*256*l*sizeof(*bch->mod8_tab)); ^~~~~~ lib/bch.c:1156: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(bch->mod8_tab, 0, 4*256*l*sizeof(*bch->mod8_tab)); ^~~~~~ lib/bch.c:1200: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(xi, 0, sizeof(xi)); ^~~~~~ lib/bch.c:1200: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(xi, 0, sizeof(xi)); ^~~~~~ lib/bch.c:1253: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(roots , 0, (bch->n+1)*sizeof(*roots)); ^~~~~~ lib/bch.c:1253: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(roots , 0, (bch->n+1)*sizeof(*roots)); ^~~~~~ Suppressed 12 warnings (12 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. 50 warnings generated. crypto/essiv.c:213:3: 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(iv, req->iv, ivsize); ^~~~~~ crypto/essiv.c:213:3: 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(iv, req->iv, ivsize); ^~~~~~ crypto/essiv.c:403: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(essiv_cipher_name, p, len); ^~~~~~ crypto/essiv.c:403: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(essiv_cipher_name, p, len); ^~~~~~ crypto/essiv.c:552:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/essiv.c:552:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 if (snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/essiv.c:556:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/essiv.c:556:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 if (snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ Suppressed 46 warnings (46 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. 123 warnings generated. drivers/crypto/ccree/cc_aead.c:364:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:364:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/crypto/ccree/cc_aead.c:576:4: 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(ctx->ctr_nonce, enckey + ctx->enc_keylen - ^~~~~~ drivers/crypto/ccree/cc_aead.c:576:4: 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(ctx->ctr_nonce, enckey + ctx->enc_keylen - ^~~~~~ drivers/crypto/ccree/cc_aead.c:595: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(ctx->enckey, enckey, ctx->enc_keylen); ^~~~~~ drivers/crypto/ccree/cc_aead.c:595: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(ctx->enckey, enckey, ctx->enc_keylen); ^~~~~~ >> drivers/crypto/ccree/cc_aead.c:597: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(ctx->enckey + 24, 0, CC_AES_KEY_SIZE_MAX - 24); ^~~~~~ drivers/crypto/ccree/cc_aead.c:597: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(ctx->enckey + 24, 0, CC_AES_KEY_SIZE_MAX - 24); ^~~~~~ drivers/crypto/ccree/cc_aead.c:599:3: 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(ctx->auth_state.xcbc.xcbc_keys, authkey, ^~~~~~ drivers/crypto/ccree/cc_aead.c:599:3: 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(ctx->auth_state.xcbc.xcbc_keys, authkey, ^~~~~~ drivers/crypto/ccree/cc_aead.c:664: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(ctx->ctr_nonce, key + keylen, 3); ^~~~~~ drivers/crypto/ccree/cc_aead.c:664: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(ctx->ctr_nonce, key + keylen, 3); ^~~~~~ drivers/crypto/ccree/cc_aead.c:673:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:673:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:1164:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:1164:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:1395: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(block, 0, csize); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1395: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(block, 0, csize); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1404: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(block - csize, (u8 *)&data + 4 - csize, csize); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1404: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(block - csize, (u8 *)&data + 4 - csize, csize); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1553: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(req_ctx->mac_buf, 0, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1553: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(req_ctx->mac_buf, 0, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1554: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(req_ctx->ccm_config, 0, AES_BLOCK_SIZE * 3); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1554: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(req_ctx->ccm_config, 0, AES_BLOCK_SIZE * 3); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1562: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(b0, req->iv, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1562: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(b0, req->iv, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1581: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(req->iv + 15 - req->iv[0], 0, req->iv[0] + 1); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1581: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(req->iv + 15 - req->iv[0], 0, req->iv[0] + 1); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1584: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(ctr_count_0, req->iv, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1584: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(ctr_count_0, req->iv, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1597: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(areq_ctx->ctr_iv, 0, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1597: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(areq_ctx->ctr_iv, 0, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1606: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(areq_ctx->ctr_iv + CCM_BLOCK_NONCE_OFFSET, ctx->ctr_nonce, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1606: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(areq_ctx->ctr_iv + CCM_BLOCK_NONCE_OFFSET, ctx->ctr_nonce, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1608: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(areq_ctx->ctr_iv + CCM_BLOCK_IV_OFFSET, req->iv, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1608: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(areq_ctx->ctr_iv + CCM_BLOCK_IV_OFFSET, req->iv, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1834:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:1834:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:1845: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(req_ctx->hkey, 0, AES_BLOCK_SIZE); ^~~~~~ drivers/crypto/ccree/cc_aead.c:1845: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(req_ctx->hkey, 0, AES_BLOCK_SIZE); -- ^~~~~~ drivers/crypto/ccree/cc_aead.c:1932:3: 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(areq_ctx->ctr_iv, ctx->ctr_nonce, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1934:3: 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(areq_ctx->ctr_iv + CTR_RFC3686_NONCE_SIZE, req->iv, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1934:3: 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(areq_ctx->ctr_iv + CTR_RFC3686_NONCE_SIZE, req->iv, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1947:4: 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(areq_ctx->ctr_iv, req->iv, ^~~~~~ drivers/crypto/ccree/cc_aead.c:1947:4: 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(areq_ctx->ctr_iv, req->iv, ^~~~~~ drivers/crypto/ccree/cc_aead.c:2025: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2025: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2049: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2049: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2069: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2069: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2091: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2091: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2111:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2111:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2119: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(ctx->ctr_nonce, key + keylen, 4); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2119: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(ctx->ctr_nonce, key + keylen, 4); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2128:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2128:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2136: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(ctx->ctr_nonce, key + keylen, 4); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2136: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(ctx->ctr_nonce, key + keylen, 4); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2164:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2164:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2184:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2184:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(ctx->drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_aead.c:2203: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2203: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2227: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2227: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2254: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2254: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2278: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ drivers/crypto/ccree/cc_aead.c:2278: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(areq_ctx, 0, sizeof(*areq_ctx)); ^~~~~~ >> drivers/crypto/ccree/cc_aead.c:2572:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name); ^~~~~~~~ drivers/crypto/ccree/cc_aead.c:2572:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name); ^~~~~~~~ drivers/crypto/ccree/cc_aead.c:2573:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(alg->base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ drivers/crypto/ccree/cc_aead.c:2573:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(alg->base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", ^~~~~~~~ Suppressed 73 warnings (73 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. drivers/remoteproc/remoteproc_coredump.c:166:4: 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(dest, 0xff, size); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:166:4: 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(dest, 0xff, size); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:171:5: 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(dest, ptr, size); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:171:5: 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(dest, ptr, size); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:276: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(ehdr, 0, elf_size_of_hdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:276: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(ehdr, 0, elf_size_of_hdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:294: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(phdr, 0, elf_size_of_phdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:294: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(phdr, 0, elf_size_of_phdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:394: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(ehdr, 0, elf_size_of_hdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:394: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(ehdr, 0, elf_size_of_hdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:413: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(shdr, 0, elf_size_of_shdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:413: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(shdr, 0, elf_size_of_shdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:419: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 + offset, 0, strtbl_size); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:419: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 + offset, 0, strtbl_size); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:422: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(shdr, 0, elf_size_of_shdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:422: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(shdr, 0, elf_size_of_shdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:433: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(shdr, 0, elf_size_of_shdr(class)); ^~~~~~ drivers/remoteproc/remoteproc_coredump.c:433: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(shdr, 0, elf_size_of_shdr(class)); ^~~~~~ Suppressed 37 warnings (37 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. 10 warnings generated. Suppressed 10 warnings (10 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. 10 warnings generated. Suppressed 10 warnings (10 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. 10 warnings generated. Suppressed 10 warnings (10 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. 10 warnings generated. Suppressed 10 warnings (10 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. 15 warnings generated. lib/zstd/compress/zstd_opt.c:1082:17: 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] ZSTD_memcpy(opt[cur].rep, &newReps, sizeof(repcodes_t)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1082:17: 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 ZSTD_memcpy(opt[cur].rep, &newReps, sizeof(repcodes_t)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1084:17: 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] ZSTD_memcpy(opt[cur].rep, opt[cur - 1].rep, sizeof(repcodes_t)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1084:17: 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 ZSTD_memcpy(opt[cur].rep, opt[cur - 1].rep, sizeof(repcodes_t)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1171:13: 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] ZSTD_memcpy(rep, &reps, sizeof(reps)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1171:13: 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 ZSTD_memcpy(rep, &reps, sizeof(reps)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1173:13: 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] ZSTD_memcpy(rep, opt[cur].rep, sizeof(repcodes_t)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1173:13: 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 ZSTD_memcpy(rep, opt[cur].rep, sizeof(repcodes_t)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1271:5: 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] ZSTD_memcpy(tmpRep, rep, sizeof(tmpRep)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ lib/zstd/compress/zstd_opt.c:1271:5: 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 ZSTD_memcpy(tmpRep, rep, sizeof(tmpRep)); ^ lib/zstd/compress/../common/zstd_deps.h:32:28: note: expanded from macro 'ZSTD_memcpy' #define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) ^~~~~~~~~~~~~~~~ Suppressed 10 warnings (10 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. 40 warnings generated. drivers/crypto/ccree/cc_request_mgr.c:189:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_request_mgr.c:189:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_request_mgr.c:334:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_request_mgr.c:334:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/crypto/ccree/cc_request_mgr.c:435:3: 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(&bli->creq, cc_req, sizeof(*cc_req)); ^~~~~~ drivers/crypto/ccree/cc_request_mgr.c:435:3: 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(&bli->creq, cc_req, sizeof(*cc_req)); ^~~~~~ drivers/crypto/ccree/cc_request_mgr.c:436:3: 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(&bli->desc, desc, len * sizeof(*desc)); ^~~~~~ drivers/crypto/ccree/cc_request_mgr.c:436:3: 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(&bli->desc, desc, len * sizeof(*desc)); ^~~~~~ drivers/crypto/ccree/cc_request_mgr.c:618:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/ccree/cc_request_mgr.c:618:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = drvdata_to_dev(drvdata); ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 35 warnings (35 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. 48 warnings generated. Suppressed 48 warnings (48 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. 47 warnings generated. >> fs/ufs/namei.c:137:3: 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(inode->i_link, symname, l); ^~~~~~ fs/ufs/namei.c:137:3: 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(inode->i_link, symname, l); ^~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. fs/ufs/util.h:110:9: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] return fs64_to_cpu(sb, tmp); ^ fs/ufs/super.c:799:6: note: Assuming the condition is false if (!sb_rdonly(sb)) { ^~~~~~~~~~~~~~ fs/ufs/super.c:799:2: note: Taking false branch if (!sb_rdonly(sb)) { ^ fs/ufs/super.c:806:6: note: Assuming 'sbi' is non-null if (!sbi) ^~~~ fs/ufs/super.c:806:2: note: Taking false branch if (!sbi) ^ fs/ufs/super.c:813:2: note: Loop condition is false. Exiting loop mutex_init(&sbi->s_lock); ^ include/linux/mutex.h:101:32: note: expanded from macro 'mutex_init' #define mutex_init(mutex) \ ^ fs/ufs/super.c:814:2: note: Loop condition is false. Exiting loop spin_lock_init(&sbi->work_lock); ^ include/linux/spinlock.h:329:35: note: expanded from macro 'spin_lock_init' # define spin_lock_init(lock) \ ^ fs/ufs/super.c:815:2: note: Loop condition is false. Exiting loop INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs); ^ include/linux/workqueue.h:267:2: note: expanded from macro 'INIT_DELAYED_WORK' __INIT_DELAYED_WORK(_work, _func, 0) ^ include/linux/workqueue.h:252:3: note: expanded from macro '__INIT_DELAYED_WORK' INIT_WORK(&(_work)->work, (_func)); \ ^ include/linux/workqueue.h:245:2: note: expanded from macro 'INIT_WORK' __INIT_WORK((_work), (_func), 0) ^ include/linux/workqueue.h:225:2: note: expanded from macro '__INIT_WORK' do { \ ^ fs/ufs/super.c:815:2: note: Loop condition is false. Exiting loop INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs); ^ include/linux/workqueue.h:267:2: note: expanded from macro 'INIT_DELAYED_WORK' __INIT_DELAYED_WORK(_work, _func, 0) ^ include/linux/workqueue.h:253:3: note: expanded from macro '__INIT_DELAYED_WORK' __init_timer(&(_work)->timer, \ ^ include/linux/timer.h:113:2: note: expanded from macro '__init_timer' do { \ ^ fs/ufs/super.c:815:2: note: Loop condition is false. Exiting loop INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs); ^ include/linux/workqueue.h:267:2: note: expanded from macro 'INIT_DELAYED_WORK' __INIT_DELAYED_WORK(_work, _func, 0) ^ include/linux/workqueue.h:251:2: note: expanded from macro '__INIT_DELAYED_WORK' do { \ ^ fs/ufs/super.c:822:2: note: Taking false branch if (!ufs_parse_options ((char *) data, &sbi->s_mount_opt)) { ^ fs/ufs/super.c:826:2: note: Taking true branch if (!(sbi->s_mount_opt & UFS_MOUNT_UFSTYPE)) { ^ fs/ufs/super.c:827:7: note: Assuming 'silent' is not equal to 0 if (!silent) ^~~~~~~ fs/ufs/super.c:827:3: note: Taking false branch if (!silent) ^ fs/ufs/super.c:838:6: note: Assuming 'uspi' is non-null if (!uspi) ^~~~~ fs/ufs/super.c:838:2: note: Taking false branch if (!uspi) ^ fs/ufs/super.c:849:2: note: Control jumps to 'case 16:' at line 907 switch (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) { ^ fs/ufs/super.c:915:7: note: Assuming the condition is false if (!sb_rdonly(sb)) { ^~~~~~~~~~~~~~ fs/ufs/super.c:915:3: note: Taking false branch if (!sb_rdonly(sb)) { ^ fs/ufs/super.c:920:3: note: Execution continues on line 991 break; -- fs/ufs/super.c:991:2: note: Taking false branch if (!sb_set_blocksize(sb, block_size)) { ^ fs/ufs/super.c:1002:6: note: Assuming 'ubh' is non-null if (!ubh) ^~~~ fs/ufs/super.c:1002:2: note: Taking false branch if (!ubh) ^ fs/ufs/super.c:1011:46: note: Left side of '&&' is false if (((flags & UFS_ST_MASK) == UFS_ST_SUNOS) && ^ fs/ufs/super.c:1017:44: note: Left side of '&&' is false if ((flags & UFS_ST_MASK) == UFS_ST_44BSD && ^ fs/ufs/super.c:1028:2: note: Control jumps to 'case 72020:' at line 1029 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { ^ fs/ufs/super.c:1035:4: note: Control jumps to line 1065 goto magic_found; ^ fs/ufs/super.c:1071:2: note: Taking false branch if (!is_power_of_2(uspi->s_fsize)) { ^ fs/ufs/super.c:1076:6: note: Assuming field 's_fsize' is >= 512 if (uspi->s_fsize < 512) { ^~~~~~~~~~~~~~~~~~~ fs/ufs/super.c:1076:2: note: Taking false branch if (uspi->s_fsize < 512) { ^ fs/ufs/super.c:1081:6: note: Assuming field 's_fsize' is <= 4096 if (uspi->s_fsize > 4096) { ^~~~~~~~~~~~~~~~~~~~ fs/ufs/super.c:1081:2: note: Taking false branch if (uspi->s_fsize > 4096) { ^ fs/ufs/super.c:1086:2: note: Taking false branch if (!is_power_of_2(uspi->s_bsize)) { ^ fs/ufs/super.c:1091:6: note: Assuming field 's_bsize' is >= 4096 if (uspi->s_bsize < 4096) { ^~~~~~~~~~~~~~~~~~~~ fs/ufs/super.c:1091:2: note: Taking false branch if (uspi->s_bsize < 4096) { ^ fs/ufs/super.c:1096:6: note: Assuming the condition is false if (uspi->s_bsize / uspi->s_fsize > 8) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/super.c:1096:2: note: Taking false branch if (uspi->s_bsize / uspi->s_fsize > 8) { ^ fs/ufs/super.c:1101:6: note: Assuming 'block_size' is equal to field 's_fsize' if (uspi->s_fsize != block_size || uspi->s_sbsize != super_block_size) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/super.c:1101:6: note: Left side of '||' is false fs/ufs/super.c:1101:37: note: Assuming 'super_block_size' is equal to field 's_sbsize' if (uspi->s_fsize != block_size || uspi->s_sbsize != super_block_size) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/super.c:1101:2: note: Taking false branch if (uspi->s_fsize != block_size || uspi->s_sbsize != super_block_size) { ^ fs/ufs/super.c:1117:6: note: Left side of '||' is false if (((flags & UFS_ST_MASK) == UFS_ST_44BSD) || ^ fs/ufs/super.c:1118:42: note: Left side of '||' is true ((flags & UFS_ST_MASK) == UFS_ST_OLD) || ^ fs/ufs/super.c:1123:3: note: Control jumps to 'case 253:' at line 1130 switch(usb1->fs_clean) { ^ fs/ufs/super.c:1132:4: note: Execution continues on line 1158 break; ^ fs/ufs/super.c:1170:2: note: Taking false branch if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { ^ fs/ufs/super.c:1201:12: note: Field 'fs_magic' is not equal to UFS2_MAGIC if (uspi->fs_magic == UFS2_MAGIC) ^ fs/ufs/super.c:1201:2: note: Taking false branch if (uspi->fs_magic == UFS2_MAGIC) ^ fs/ufs/super.c:1215:19: note: Calling 'ufs_get_fs_qbmask' uspi->s_qbmask = ufs_get_fs_qbmask(sb, usb3); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/util.h:92:2: note: 'tmp' declared without an initial value __fs64 tmp; ^~~~~~~~~~ fs/ufs/util.h:94:2: note: 'Default' branch taken. Execution continues on line 110 switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) { ^ fs/ufs/util.h:110:9: note: 2nd function call argument is an uninitialized value return fs64_to_cpu(sb, tmp); ^ ~~~ Suppressed 47 warnings (47 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. 12 warnings generated. Suppressed 12 warnings (12 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. 40 warnings generated. >> kernel/rcu/refscale.c:613:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf, "Experiment #%d (Format: :)", ^~~~~~~ kernel/rcu/refscale.c:613:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf, "Experiment #%d (Format: :)", ^~~~~~~ kernel/rcu/refscale.c:618:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf1, "%d: %llu\t", i, rt->last_duration_ns); ^~~~~~~ kernel/rcu/refscale.c:618:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf1, "%d: %llu\t", i, rt->last_duration_ns); ^~~~~~~ kernel/rcu/refscale.c:621:4: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "\n"); ^~~~~~ kernel/rcu/refscale.c:621:4: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "\n"); ^~~~~~ kernel/rcu/refscale.c:626:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, buf1); ^~~~~~ kernel/rcu/refscale.c:626:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, buf1); ^~~~~~ kernel/rcu/refscale.c:708:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf1, "%d\t%llu.%03u\n", exp + 1, avg, rem); ^~~~~~~ kernel/rcu/refscale.c:708:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf1, "%d\t%llu.%03u\n", exp + 1, avg, rem); ^~~~~~~ kernel/rcu/refscale.c:709:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, buf1); ^~~~~~ kernel/rcu/refscale.c:709:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, buf1); ^~~~~~ Suppressed 34 warnings (34 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. 37 warnings generated. drivers/of/device.c:59:29: warning: Value stored to 'of_node' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device_node *node, *of_node = dev->of_node; ^~~~~~~ ~~~~~~~~~~~~ drivers/of/device.c:59:29: note: Value stored to 'of_node' during its initialization is never read struct device_node *node, *of_node = dev->of_node; ^~~~~~~ ~~~~~~~~~~~~ drivers/of/device.c:254:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] csize = snprintf(str, len, "of:N%pOFn%c%s", dev->of_node, 'T', ^~~~~~~~ drivers/of/device.c:254:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 csize = snprintf(str, len, "of:N%pOFn%c%s", dev->of_node, 'T', ^~~~~~~~ drivers/of/device.c:267:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] csize = snprintf(str, len, "C%s", compat); ^~~~~~~~ drivers/of/device.c:267:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 csize = snprintf(str, len, "C%s", compat); ^~~~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 50 warnings generated. Suppressed 50 warnings (50 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. Suppressed 46 warnings (46 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. 58 warnings generated. mm/memory.c:264:2: warning: Value stored to 'pmd' is never read [clang-analyzer-deadcode.DeadStores] pmd = pmd_offset(pud, start); ^ mm/memory.c:264:2: note: Value stored to 'pmd' is never read mm/memory.c:298:2: warning: Value stored to 'pud' is never read [clang-analyzer-deadcode.DeadStores] pud = pud_offset(p4d, start); ^ mm/memory.c:298:2: note: Value stored to 'pud' is never read mm/memory.c:332:2: warning: Value stored to 'p4d' is never read [clang-analyzer-deadcode.DeadStores] p4d = p4d_offset(pgd, start); ^ ~~~~~~~~~~~~~~~~~~~~~~ mm/memory.c:332:2: note: Value stored to 'p4d' is never read p4d = p4d_offset(pgd, start); ^ ~~~~~~~~~~~~~~~~~~~~~~ mm/memory.c:495: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(rss, 0, sizeof(int) * NR_MM_COUNTERS); ^~~~~~ mm/memory.c:495: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(rss, 0, sizeof(int) * NR_MM_COUNTERS); ^~~~~~ mm/memory.c:1136:20: warning: Value stored to 'src_mm' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct mm_struct *src_mm = src_vma->vm_mm; ^~~~~~ ~~~~~~~~~~~~~~ mm/memory.c:1136:20: note: Value stored to 'src_mm' during its initialization is never read struct mm_struct *src_mm = src_vma->vm_mm; ^~~~~~ ~~~~~~~~~~~~~~ mm/memory.c:1173:20: warning: Value stored to 'src_mm' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct mm_struct *src_mm = src_vma->vm_mm; ^~~~~~ ~~~~~~~~~~~~~~ mm/memory.c:1173:20: note: Value stored to 'src_mm' during its initialization is never read struct mm_struct *src_mm = src_vma->vm_mm; ^~~~~~ ~~~~~~~~~~~~~~ -- ^ include/linux/fsnotify_backend.h:279:18: note: Access to field 'dentry' results in a dereference of a null pointer (loaded from variable 'data') return d_inode(((const struct path *)data)->dentry); ^ ~~~~ Suppressed 31 warnings (31 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. 50 warnings generated. drivers/base/firmware_loader/fallback.c:314:3: 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(buffer, fw_priv->data + offset, count); ^~~~~~ drivers/base/firmware_loader/fallback.c:314:3: 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(buffer, fw_priv->data + offset, count); ^~~~~~ drivers/base/firmware_loader/fallback.c:316:3: 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(fw_priv->data + offset, buffer, count); ^~~~~~ drivers/base/firmware_loader/fallback.c:316:3: 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(fw_priv->data + offset, buffer, count); ^~~~~~ drivers/base/firmware_loader/fallback.c:331:4: 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(buffer, page_data + page_ofs, page_cnt); ^~~~~~ drivers/base/firmware_loader/fallback.c:331:4: 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(buffer, page_data + page_ofs, page_cnt); ^~~~~~ drivers/base/firmware_loader/fallback.c:333:4: 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(page_data + page_ofs, buffer, page_cnt); ^~~~~~ drivers/base/firmware_loader/fallback.c:333:4: 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(page_data + page_ofs, buffer, page_cnt); ^~~~~~ Suppressed 46 warnings (46 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. 51 warnings generated. drivers/phy/cadence/phy-cadence-torrent.c:1352:25: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] value |= ((~lane_mask) << PMA_TX_ELEC_IDLE_SHIFT) & ^ drivers/phy/cadence/phy-cadence-torrent.c:1476:6: note: 'ret' is 0 if (ret) { ^~~ drivers/phy/cadence/phy-cadence-torrent.c:1476:2: note: Taking false branch if (ret) { ^ drivers/phy/cadence/phy-cadence-torrent.c:1481:6: note: Assuming field 'set_lanes' is not equal to 0 if (opts->dp.set_lanes) { ^~~~~~~~~~~~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1481:2: note: Taking true branch if (opts->dp.set_lanes) { ^ drivers/phy/cadence/phy-cadence-torrent.c:1482:9: note: Calling 'cdns_torrent_dp_set_lanes' ret = cdns_torrent_dp_set_lanes(cdns_phy, &opts->dp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1352:25: note: The result of the left shift is undefined because the left operand is negative value |= ((~lane_mask) << PMA_TX_ELEC_IDLE_SHIFT) & ~~~~~~~~~~~~ ^ drivers/phy/cadence/phy-cadence-torrent.c:1697:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), ^~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1697:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), ^~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1780:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), ^~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1780:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), ^~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1900:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), ^~~~~~~~ drivers/phy/cadence/phy-cadence-torrent.c:1900:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), ^~~~~~~~ Suppressed 47 warnings (47 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. 31 warnings generated. Suppressed 31 warnings (31 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. 34 warnings generated. Suppressed 34 warnings (34 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. 47 warnings generated. Suppressed 47 warnings (47 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. 49 warnings generated. fs/iomap/iter.c:26: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(&iter->iomap, 0, sizeof(iter->iomap)); ^~~~~~ fs/iomap/iter.c:26: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(&iter->iomap, 0, sizeof(iter->iomap)); ^~~~~~ fs/iomap/iter.c:27: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(&iter->srcmap, 0, sizeof(iter->srcmap)); ^~~~~~ fs/iomap/iter.c:27: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(&iter->srcmap, 0, sizeof(iter->srcmap)); ^~~~~~ Suppressed 47 warnings (47 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. 64 warnings generated. >> drivers/of/unittest.c:283: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(buf, 0xff, buf_size); ^~~~~~ drivers/of/unittest.c:283: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(buf, 0xff, buf_size); ^~~~~~ >> drivers/of/unittest.c:284:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] size = snprintf(buf, buf_size - 2, fmt, np); ^~~~~~~~ drivers/of/unittest.c:284:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 size = snprintf(buf, buf_size - 2, fmt, np); ^~~~~~~~ drivers/of/unittest.c:295: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(buf, 0xff, buf_size); ^~~~~~ drivers/of/unittest.c:295: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(buf, 0xff, buf_size); ^~~~~~ drivers/of/unittest.c:296:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, size+1, fmt, np); ^~~~~~~~ drivers/of/unittest.c:296:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, size+1, fmt, np); ^~~~~~~~ drivers/of/unittest.c:400: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:400: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:454: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:454: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:463: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:463: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:488: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:488: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:513: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:513: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:580: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:580: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:638: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:638: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:644: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:644: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:657: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:657: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:670: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:670: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:1022: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:1022: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:1043: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:1043: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:1099: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(&args, 0, sizeof(args)); ^~~~~~ drivers/of/unittest.c:1099: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(&args, 0, sizeof(args)); ^~~~~~ >> drivers/of/unittest.c:1446: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(unittest_data_align, __dtb_testcases_begin, size); ^~~~~~ drivers/of/unittest.c:1446: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(unittest_data_align, __dtb_testcases_begin, size); ^~~~~~ Suppressed 46 warnings (46 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. 34 warnings generated. drivers/base/regmap/regcache.c:137:7: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] if (config->reg_defaults[i].reg % map->reg_stride) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/base/regmap/regcache.c:121:6: note: Assuming field 'cache_type' is not equal to REGCACHE_NONE if (map->cache_type == REGCACHE_NONE) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/base/regmap/regcache.c:121:2: note: Taking false branch if (map->cache_type == REGCACHE_NONE) { ^ drivers/base/regmap/regcache.c:130:6: note: Assuming field 'reg_defaults' is null if (config->reg_defaults && !config->num_reg_defaults) { ^~~~~~~~~~~~~~~~~~~~ drivers/base/regmap/regcache.c:130:27: note: Left side of '&&' is false if (config->reg_defaults && !config->num_reg_defaults) { ^ drivers/base/regmap/regcache.c:136:14: note: Assuming 'i' is < field 'num_reg_defaults' for (i = 0; i < config->num_reg_defaults; i++) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/base/regmap/regcache.c:136:2: note: Loop condition is true. Entering loop body for (i = 0; i < config->num_reg_defaults; i++) ^ drivers/base/regmap/regcache.c:137:7: note: Dereference of null pointer if (config->reg_defaults[i].reg % map->reg_stride) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 33 warnings (33 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. 35 warnings generated. drivers/base/regmap/regcache-rbtree.c:293: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(present + BITS_TO_LONGS(rbnode->blklen), 0, ^~~~~~ drivers/base/regmap/regcache-rbtree.c:293: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(present + BITS_TO_LONGS(rbnode->blklen), 0, ^~~~~~ drivers/base/regmap/regcache-rbtree.c:302:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(blk + offset * map->cache_word_size, ^~~~~~~ drivers/base/regmap/regcache-rbtree.c:302:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(blk + offset * map->cache_word_size, ^~~~~~~ Suppressed 33 warnings (33 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. 33 warnings generated. Suppressed 33 warnings (33 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. 41 warnings generated. drivers/base/regmap/regmap-debugfs.c:31:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(NULL, 0, "%x", max_val); ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:31:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(NULL, 0, "%x", max_val); ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:50:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(buf, PAGE_SIZE, "%s\n", name); ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:50:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(buf, PAGE_SIZE, "%s\n", name); ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:251:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf + buf_pos, count - buf_pos, "%.*x: ", ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:251:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf + buf_pos, count - buf_pos, "%.*x: ", ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:258:5: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf + buf_pos, count - buf_pos, ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:258:5: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf + buf_pos, count - buf_pos, ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:261:5: 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(buf + buf_pos, 'X', ^~~~~~ drivers/base/regmap/regmap-debugfs.c:261:5: 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(buf + buf_pos, 'X', ^~~~~~ drivers/base/regmap/regmap-debugfs.c:402:15: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] entry_len = snprintf(entry, PAGE_SIZE, "%x-%x\n", ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:402:15: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 entry_len = snprintf(entry, PAGE_SIZE, "%x-%x\n", ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:407:4: 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(buf + buf_pos, entry, entry_len); ^~~~~~ drivers/base/regmap/regmap-debugfs.c:407:4: 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(buf + buf_pos, entry, entry_len); ^~~~~~ include/linux/list.h:137:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] __list_del(entry->prev, entry->next); ^ drivers/base/regmap/regmap-debugfs.c:657:6: note: Assuming field 'debugfs' is non-null if (map->debugfs) { ^~~~~~~~~~~~ drivers/base/regmap/regmap-debugfs.c:657:2: note: Taking true branch if (map->debugfs) { ^ drivers/base/regmap/regmap-debugfs.c:660:3: note: Calling 'regmap_debugfs_free_dump_cache' regmap_debugfs_free_dump_cache(map); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/base/regmap/regmap-debugfs.c:71:2: note: Loop condition is true. Entering loop body while (!list_empty(&map->debugfs_off_cache)) { ^ drivers/base/regmap/regmap-debugfs.c:76:3: note: Memory is released kfree(c); ^~~~~~~~ drivers/base/regmap/regmap-debugfs.c:71:2: note: Loop condition is true. Entering loop body while (!list_empty(&map->debugfs_off_cache)) { ^ drivers/base/regmap/regmap-debugfs.c:75:3: note: Calling 'list_del' list_del(&c->list); ^~~~~~~~~~~~~~~~~~ include/linux/list.h:148:2: note: Calling '__list_del_entry' __list_del_entry(entry); ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:134:2: note: Taking false branch if (!__list_del_entry_valid(entry)) ^ include/linux/list.h:137:13: note: Use of memory after it is freed __list_del(entry->prev, entry->next); ^~~~~~~~~~~ Suppressed 33 warnings (33 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. 48 warnings generated. drivers/video/fbdev/s1d13xxxfb.c:681:2: warning: Value stored to 'is_dual' is never read [clang-analyzer-deadcode.DeadStores] is_dual = (panel & 0x02) != 0; ^ ~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/s1d13xxxfb.c:681:2: note: Value stored to 'is_dual' is never read is_dual = (panel & 0x02) != 0; ^ ~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/s1d13xxxfb.c:683:2: warning: Value stored to 'lcd_bpp' is never read [clang-analyzer-deadcode.DeadStores] lcd_bpp = s1d13xxxfb_width_tab[is_tft][(panel >> 4) & 3]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/s1d13xxxfb.c:683:2: note: Value stored to 'lcd_bpp' is never read lcd_bpp = s1d13xxxfb_width_tab[is_tft][(panel >> 4) & 3]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 50 warnings generated. >> fs/xfs/scrub/btree.c:147: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(&bs->lastrec, rec, cur->bc_ops->rec_len); ^~~~~~ fs/xfs/scrub/btree.c:147: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(&bs->lastrec, rec, cur->bc_ops->rec_len); ^~~~~~ fs/xfs/scrub/btree.c:194: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(&bs->lastkey[level - 1], key, cur->bc_ops->key_len); ^~~~~~ fs/xfs/scrub/btree.c:194: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(&bs->lastkey[level - 1], key, cur->bc_ops->key_len); ^~~~~~ Suppressed 48 warnings (48 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. 49 warnings generated. Suppressed 49 warnings (49 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 65 warnings generated. >> fs/hpfs/dnode.c:42:4: 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(ppos, hpfs_inode->i_rddir_off, i * sizeof(loff_t)); ^~~~~~ fs/hpfs/dnode.c:42:4: 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(ppos, hpfs_inode->i_rddir_off, i * sizeof(loff_t)); ^~~~~~ >> fs/hpfs/dnode.c:188:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove((char *)de + d_size, de, (char *)de_end - (char *)de); ^~~~~~~ fs/hpfs/dnode.c:188:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove((char *)de + d_size, de, (char *)de_end - (char *)de); ^~~~~~~ >> fs/hpfs/dnode.c:189: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(de, 0, d_size); ^~~~~~ fs/hpfs/dnode.c:189: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(de, 0, d_size); ^~~~~~ fs/hpfs/dnode.c:197: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(de->name, name, namelen); ^~~~~~ fs/hpfs/dnode.c:197: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(de->name, name, namelen); ^~~~~~ fs/hpfs/dnode.c:212:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(de, de_next_de(de), le32_to_cpu(d->first_free) + (char *)d - (char *)de); ^~~~~~~ fs/hpfs/dnode.c:212:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(de, de_next_de(de), le32_to_cpu(d->first_free) + (char *)d - (char *)de); ^~~~~~~ fs/hpfs/dnode.c:300: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(nd, d, le32_to_cpu(d->first_free)); ^~~~~~ fs/hpfs/dnode.c:300: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(nd, d, le32_to_cpu(d->first_free)); ^~~~~~ fs/hpfs/dnode.c:320: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(nname, de->name, de->namelen); ^~~~~~ fs/hpfs/dnode.c:320: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(nname, de->name, de->namelen); ^~~~~~ fs/hpfs/dnode.c:327:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove((char *)nd + 20, de, le32_to_cpu(nd->first_free) + (char *)nd - (char *)de); ^~~~~~~ fs/hpfs/dnode.c:327:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove((char *)nd + 20, de, le32_to_cpu(nd->first_free) + (char *)nd - (char *)de); ^~~~~~~ fs/hpfs/dnode.c:329: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(d, nd, le32_to_cpu(nd->first_free)); ^~~~~~ fs/hpfs/dnode.c:329: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(d, nd, le32_to_cpu(nd->first_free)); ^~~~~~ fs/hpfs/dnode.c:501: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(nde, de, le16_to_cpu(de->length)); ^~~~~~ fs/hpfs/dnode.c:501: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(nde, de, le16_to_cpu(de->length)); ^~~~~~ fs/hpfs/dnode.c:586:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(de_next_de(de), (char *)de_next_de(de) + 4, ^~~~~~~ fs/hpfs/dnode.c:586:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(de_next_de(de), (char *)de_next_de(de) + 4, ^~~~~~~ fs/hpfs/dnode.c:614:3: 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(de_cp, de, le16_to_cpu(de->length)); ^~~~~~ fs/hpfs/dnode.c:614:3: 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(de_cp, de, le16_to_cpu(de->length)); ^~~~~~ fs/hpfs/dnode.c:680:3: 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(de_cp, de_prev, le16_to_cpu(de_prev->length)); ^~~~~~ fs/hpfs/dnode.c:680:3: 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(de_cp, de_prev, le16_to_cpu(de_prev->length)); ^~~~~~ fs/hpfs/dnode.c:1018:3: 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(name2, name1, name1len = name2len = f->len); ^~~~~~ fs/hpfs/dnode.c:1018:3: 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(name2, name1, name1len = name2len = f->len); ^~~~~~ fs/hpfs/dnode.c:1020:3: 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(name2, name1, 15); ^~~~~~ fs/hpfs/dnode.c:1020:3: 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(name2, name1, 15); ^~~~~~ fs/hpfs/dnode.c:1021: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(name2 + 15, 0xff, 256 - 15); ^~~~~~ fs/hpfs/dnode.c:1021: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(name2 + 15, 0xff, 256 - 15); ^~~~~~ fs/hpfs/hpfs_fn.h:180:4: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] a = dst->down; ^ fs/hpfs/dnode.c:717:6: note: Assuming field 'first' is 0 if (de->first || de->last) { ^~~~~~~~~ fs/hpfs/dnode.c:717:6: note: Left side of '||' is false fs/hpfs/dnode.c:717:19: note: Assuming field 'last' is 0 if (de->first || de->last) { ^~~~~~~~ fs/hpfs/dnode.c:717:2: note: Taking false branch if (de->first || de->last) { ^ fs/hpfs/dnode.c:722:6: note: Assuming field 'down' is not equal to 0 if (de->down) down = de_down_pointer(de); ^~~~~~~~ fs/hpfs/dnode.c:722:2: note: Taking true branch -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:1479:2: note: '?' condition is false ASSERT(offset >= 0); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_ialloc.c:1480:2: note: '?' condition is false ASSERT(offset < XFS_INODES_PER_CHUNK); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_ialloc.c:1481:9: note: Assuming the condition is true ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % ^ fs/xfs/xfs_linux.h:215:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ~~~~~~~^~~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_ialloc.c:1481:2: note: '?' condition is true ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_ialloc.c:1488:18: note: The result of the left shift is undefined because the right operand is negative rec.ir_free &= ~XFS_INOBT_MASK(offset); ^ fs/xfs/libxfs/xfs_format.h:1329:46: note: expanded from macro 'XFS_INOBT_MASK' #define XFS_INOBT_MASK(i) ((xfs_inofree_t)1 << (i)) ^ ~~~ fs/xfs/libxfs/xfs_ialloc.c:2669:33: warning: The left operand of '>' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (error || irec.ir_startino > high) ^ fs/xfs/libxfs/xfs_ialloc.c:2704:9: note: Calling 'xfs_ialloc_has_inode_record' return xfs_ialloc_has_inode_record(cur, low, high, exists); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:2666:10: note: Calling 'xfs_inobt_lookup' error = xfs_inobt_lookup(cur, low, XFS_LOOKUP_LE, &has_record); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:46:9: note: Value assigned to 'has_record', which participates in a condition later return xfs_btree_lookup(cur, dir, stat); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:2666:10: note: Returning from 'xfs_inobt_lookup' error = xfs_inobt_lookup(cur, low, XFS_LOOKUP_LE, &has_record); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:2667:9: note: Assuming 'error' is equal to 0 while (error == 0 && has_record) { ^~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:2667:9: note: Left side of '&&' is true fs/xfs/libxfs/xfs_ialloc.c:2667:2: note: Loop condition is true. Entering loop body while (error == 0 && has_record) { ^ fs/xfs/libxfs/xfs_ialloc.c:2668:11: note: Calling 'xfs_inobt_get_rec' error = xfs_inobt_get_rec(cur, &irec, &has_record); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:114:6: note: Assuming 'error' is 0, which participates in a condition later if (error || *stat == 0) ^~~~~ fs/xfs/libxfs/xfs_ialloc.c:114:6: note: Left side of '||' is false fs/xfs/libxfs/xfs_ialloc.c:114:15: note: Assuming the condition is true if (error || *stat == 0) ^~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:114:2: note: Taking true branch if (error || *stat == 0) ^ fs/xfs/libxfs/xfs_ialloc.c:115:3: note: Returning without writing to 'irec->ir_startino' return error; ^ fs/xfs/libxfs/xfs_ialloc.c:115:3: note: Returning zero (loaded from 'error'), which participates in a condition later return error; ^~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:2668:11: note: Returning from 'xfs_inobt_get_rec' error = xfs_inobt_get_rec(cur, &irec, &has_record); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_ialloc.c:2669:7: note: 'error' is 0 if (error || irec.ir_startino > high) ^~~~~ fs/xfs/libxfs/xfs_ialloc.c:2669:7: note: Left side of '||' is false fs/xfs/libxfs/xfs_ialloc.c:2669:33: note: The left operand of '>' is a garbage value if (error || irec.ir_startino > high) ~~~~~~~~~~~~~~~~ ^ Suppressed 49 warnings (49 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. 47 warnings generated. Suppressed 47 warnings (47 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. 48 warnings generated. >> fs/erofs/dir.c:15: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(dbg_namebuf, de_name, de_namelen); ^~~~~~ fs/erofs/dir.c:15: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(dbg_namebuf, de_name, de_namelen); ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 31 warnings generated. drivers/base/component.c:317:3: 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(new, match->compare, sizeof(*new) * ^~~~~~ drivers/base/component.c:317:3: 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(new, match->compare, sizeof(*new) * ^~~~~~ Suppressed 30 warnings (30 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. 82 warnings generated. drivers/base/core.c:542:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); ^~~~~~~~ drivers/base/core.c:542:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); ^~~~~~~~ drivers/base/core.c:547:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); ^~~~~~~~ drivers/base/core.c:547:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); ^~~~~~~~ drivers/base/core.c:555:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); ^~~~~~~~ drivers/base/core.c:555:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); ^~~~~~~~ drivers/base/core.c:589:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); ^~~~~~~~ drivers/base/core.c:589:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); ^~~~~~~~ drivers/base/core.c:592:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); ^~~~~~~~ drivers/base/core.c:592:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); ^~~~~~~~ drivers/base/core.c:2690:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return print_dev_t(buf, dev->devt); ^ include/linux/kdev_t.h:15:2: note: expanded from macro 'print_dev_t' sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev)) ^~~~~~~ drivers/base/core.c:2690:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return print_dev_t(buf, dev->devt); ^ include/linux/kdev_t.h:15:2: note: expanded from macro 'print_dev_t' sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev)) ^~~~~~~ drivers/base/core.c:3229:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] format_dev_t(devt_str, dev->devt); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/base/core.c:3229:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 format_dev_t(devt_str, dev->devt); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/base/core.c:3242:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] format_dev_t(devt_str, dev->devt); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/base/core.c:3242:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 format_dev_t(devt_str, dev->devt); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/base/core.c:4558: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(dev_info, 0, sizeof(*dev_info)); ^~~~~~ drivers/base/core.c:4558: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(dev_info, 0, sizeof(*dev_info)); ^~~~~~ drivers/base/core.c:4584:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(dev_info->device, sizeof(dev_info->device), ^~~~~~~~ drivers/base/core.c:4584:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(dev_info->device, sizeof(dev_info->device), ^~~~~~~~ drivers/base/core.c:4589:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(dev_info->device, sizeof(dev_info->device), -- ^ fs/fat/namei_vfat.c:951:7: note: Assuming 'err' is 0 if (err) ^~~ fs/fat/namei_vfat.c:951:3: note: Taking false branch if (err) ^ fs/fat/namei_vfat.c:956:6: note: 'update_dotdot' is 0 if (update_dotdot) { ^~~~~~~~~~~~~ fs/fat/namei_vfat.c:956:2: note: Taking false branch if (update_dotdot) { ^ fs/fat/namei_vfat.c:971:6: note: Assuming 'err' is not equal to 0 if (err) ^~~ fs/fat/namei_vfat.c:971:2: note: Taking true branch if (err) ^ fs/fat/namei_vfat.c:972:3: note: Control jumps to line 996 goto error_dotdot; ^ fs/fat/namei_vfat.c:998:6: note: 'update_dotdot' is 0 if (update_dotdot) { ^~~~~~~~~~~~~ fs/fat/namei_vfat.c:998:2: note: Taking false branch if (update_dotdot) { ^ fs/fat/namei_vfat.c:1006:6: note: 'new_inode' is non-null if (new_inode) { ^~~~~~~~~ fs/fat/namei_vfat.c:1006:2: note: Taking true branch if (new_inode) { ^ fs/fat/namei_vfat.c:1008:7: note: 'corrupt' is 1 if (corrupt) ^~~~~~~ fs/fat/namei_vfat.c:1008:3: note: Taking true branch if (corrupt) ^ fs/fat/namei_vfat.c:1020:6: note: Assuming 'corrupt' is < 0 if (corrupt < 0) { ^~~~~~~~~~~ fs/fat/namei_vfat.c:1020:2: note: Taking true branch if (corrupt < 0) { ^ fs/fat/namei_vfat.c:1021:3: note: 5th function call argument is an uninitialized value fat_fs_error(new_dir->i_sb, ^ fs/fat/fat.h:433:2: note: expanded from macro 'fat_fs_error' __fat_fs_error(sb, 1, fmt , ## args) ^ ~~~~ Suppressed 48 warnings (48 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. 51 warnings generated. mm/z3fold.c:404: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(zhdr, 0, sizeof(*zhdr)); ^~~~~~ mm/z3fold.c:404: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(zhdr, 0, sizeof(*zhdr)); ^~~~~~ mm/z3fold.c:646:9: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return memmove(beg + (dst_chunk << CHUNK_SHIFT), ^~~~~~~ mm/z3fold.c:646:9: note: Call to function 'memmove' 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 'memmove_s' in case of C11 return memmove(beg + (dst_chunk << CHUNK_SHIFT), ^~~~~~~ mm/z3fold.c:724:3: 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(q, p, sz); ^~~~~~ mm/z3fold.c:724:3: 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(q, p, sz); ^~~~~~ mm/z3fold.c:1403:4: 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(slots.slot, 0, sizeof(slots.slot)); ^~~~~~ mm/z3fold.c:1403:4: 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(slots.slot, 0, sizeof(slots.slot)); ^~~~~~ mm/z3fold.c:1628: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(new_zhdr, zhdr, PAGE_SIZE); ^~~~~~ mm/z3fold.c:1628: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(new_zhdr, zhdr, PAGE_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 55 warnings generated. >> fs/minix/dir.c:269: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 (namx, name, namelen); ^~~~~~ fs/minix/dir.c:269: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 (namx, name, namelen); ^~~~~~ >> fs/minix/dir.c:271: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 (namx + namelen, 0, sbi->s_dirsize - namelen - 4); ^~~~~~ fs/minix/dir.c:271: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 (namx + namelen, 0, sbi->s_dirsize - namelen - 4); ^~~~~~ fs/minix/dir.c:274: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 (namx + namelen, 0, sbi->s_dirsize - namelen - 2); ^~~~~~ fs/minix/dir.c:274: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 (namx + namelen, 0, sbi->s_dirsize - namelen - 2); ^~~~~~ fs/minix/dir.c:331: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(kaddr, 0, PAGE_SIZE); ^~~~~~ fs/minix/dir.c:331: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(kaddr, 0, PAGE_SIZE); ^~~~~~ fs/minix/dir.c:337:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(de3->name, "."); ^~~~~~ fs/minix/dir.c:337:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(de3->name, "."); ^~~~~~ fs/minix/dir.c:340:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(de3->name, ".."); ^~~~~~ fs/minix/dir.c:340:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(de3->name, ".."); ^~~~~~ fs/minix/dir.c:345:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(de->name, "."); ^~~~~~ fs/minix/dir.c:345:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(de->name, "."); ^~~~~~ fs/minix/dir.c:348:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(de->name, ".."); ^~~~~~ fs/minix/dir.c:348:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(de->name, ".."); ^~~~~~ fs/minix/dir.c:429:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = dir_commit_chunk(page, pos, sbi->s_dirsize); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/minix/dir.c:429:3: note: Value stored to 'err' is never read err = dir_commit_chunk(page, pos, sbi->s_dirsize); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 39 warnings generated. >> drivers/staging/pi433/pi433_if.c:610: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(device->buffer, 0, size); ^~~~~~ drivers/staging/pi433/pi433_if.c:610: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(device->buffer, 0, size); ^~~~~~ drivers/staging/pi433/pi433_if.c:626:3: warning: Value stored to 'retval' is never read [clang-analyzer-deadcode.DeadStores] retval = kfifo_out(&device->tx_fifo, &device->buffer[position], ^ drivers/staging/pi433/pi433_if.c:626:3: note: Value stored to 'retval' is never read >> drivers/staging/pi433/pi433_if.c:899:3: 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(&instance->tx_cfg, &tx_cfg, sizeof(struct pi433_tx_cfg)); ^~~~~~ drivers/staging/pi433/pi433_if.c:899:3: 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(&instance->tx_cfg, &tx_cfg, sizeof(struct pi433_tx_cfg)); ^~~~~~ >> drivers/staging/pi433/pi433_if.c:987:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "DIO%d", i); ^~~~~~~~ drivers/staging/pi433/pi433_if.c:987:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "DIO%d", i); ^~~~~~~~ Suppressed 35 warnings (35 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. 23 warnings generated. include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << fls_long(n - 1); ^ lib/test_rhashtable.c:705:6: note: Assuming 'parm_entries' is >= 0 if (parm_entries < 0) ^~~~~~~~~~~~~~~~ lib/test_rhashtable.c:705:2: note: Taking false branch if (parm_entries < 0) ^ lib/test_rhashtable.c:708:12: note: Assuming '__UNIQUE_ID___x240' is < '__UNIQUE_ID___y241' entries = min(parm_entries, MAX_ENTRIES); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~~~~~~~~ lib/test_rhashtable.c:708:12: note: '?' condition is true entries = min(parm_entries, MAX_ENTRIES); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ lib/test_rhashtable.c:711:29: note: '?' condition is false test_rht_params.max_size = max_size ? : roundup_pow_of_two(entries); ^ lib/test_rhashtable.c:711:42: note: '?' condition is false test_rht_params.max_size = max_size ? : roundup_pow_of_two(entries); ^ include/linux/log2.h:176:2: note: expanded from macro 'roundup_pow_of_two' __builtin_constant_p(n) ? ( \ ^ lib/test_rhashtable.c:711:42: note: Calling '__roundup_pow_of_two' test_rht_params.max_size = max_size ? : roundup_pow_of_two(entries); ^ include/linux/log2.h:180:2: note: expanded from macro 'roundup_pow_of_two' __roundup_pow_of_two(n) \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Calling 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/bitops.h:154:2: note: Taking true branch if (sizeof(l) == 4) ^ include/linux/bitops.h:155:10: note: Calling 'fls' return fls(l); ^~~~~~ include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32 int r = 32; ^~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking false branch if (!x) ^ include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false if (!(x & 0xffff0000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:19:2: note: Taking false branch if (!(x & 0xffff0000u)) { ^ include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false if (!(x & 0xff000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:23:2: note: Taking false branch if (!(x & 0xff000000u)) { ^ include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false if (!(x & 0xf0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:27:2: note: Taking false branch if (!(x & 0xf0000000u)) { ^ include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false if (!(x & 0xc0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:31:2: note: Taking false branch if (!(x & 0xc0000000u)) { ^ include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false if (!(x & 0x80000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:35:2: note: Taking false branch if (!(x & 0x80000000u)) { ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ include/linux/bitops.h:155:10: note: Returning from 'fls' return fls(l); ^~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32 return fls(l); ^~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Returning from 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' return 1UL << fls_long(n - 1); ^ ~~~~~~~~~~~~~~~ lib/test_rhashtable.c:380:4: warning: Value stored to 'prand' is never read [clang-analyzer-deadcode.DeadStores] prand >>= 1; ^ ~ lib/test_rhashtable.c:380:4: note: Value stored to 'prand' is never read prand >>= 1; ^ ~ lib/test_rhashtable.c:396:4: warning: Value stored to 'prand' is never read [clang-analyzer-deadcode.DeadStores] prand >>= 1; ^ ~ lib/test_rhashtable.c:396:4: note: Value stored to 'prand' is never read prand >>= 1; ^ ~ lib/test_rhashtable.c:410:4: warning: Value stored to 'prand' is never read [clang-analyzer-deadcode.DeadStores] prand >>= 1; ^ ~ lib/test_rhashtable.c:410:4: note: Value stored to 'prand' is never read prand >>= 1; ^ ~ >> lib/test_rhashtable.c:505:14: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] offset += sprintf(buff + offset, "\nbucket[%d] -> ", i); ^~~~~~~ lib/test_rhashtable.c:505:14: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 offset += sprintf(buff + offset, "\nbucket[%d] -> ", i); ^~~~~~~ lib/test_rhashtable.c:510:14: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] offset += sprintf(buff + offset, "[["); ^~~~~~~ lib/test_rhashtable.c:510:14: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 offset += sprintf(buff + offset, "[["); ^~~~~~~ >> lib/test_rhashtable.c:516:15: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] offset += sprintf(buff + offset, " val %d (tid=%d)%s", p->value.id, p->value.tid, ^~~~~~~ lib/test_rhashtable.c:516:15: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 offset += sprintf(buff + offset, " val %d (tid=%d)%s", p->value.id, p->value.tid, ^~~~~~~ lib/test_rhashtable.c:523:5: warning: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'pos') [clang-analyzer-core.NullDereference] rht_dereference(pos->next, ht) : NULL; ^ include/linux/rhashtable.h:272:2: note: expanded from macro 'rht_dereference' rcu_dereference_protected(p, lockdep_rht_mutex_is_held(ht)) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:400:34: note: expanded from macro '__rcu_dereference_protected' ((typeof(*p) __force __kernel *)(p)); \ ^ lib/test_rhashtable.c:705:6: note: Assuming 'parm_entries' is >= 0 if (parm_entries < 0) ^~~~~~~~~~~~~~~~ lib/test_rhashtable.c:705:2: note: Taking false branch if (parm_entries < 0) ^ lib/test_rhashtable.c:708:12: note: Assuming '__UNIQUE_ID___x240' is >= '__UNIQUE_ID___y241' entries = min(parm_entries, MAX_ENTRIES); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~~~~~~~~ lib/test_rhashtable.c:708:12: note: '?' condition is false entries = min(parm_entries, MAX_ENTRIES); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ lib/test_rhashtable.c:711:29: note: '?' condition is false test_rht_params.max_size = max_size ? : roundup_pow_of_two(entries); ^ lib/test_rhashtable.c:711:42: note: '?' condition is false test_rht_params.max_size = max_size ? : roundup_pow_of_two(entries); ^ include/linux/log2.h:176:2: note: expanded from macro 'roundup_pow_of_two' __builtin_constant_p(n) ? ( \ ^ lib/test_rhashtable.c:716:6: note: Assuming 'objs' is non-null if (!objs) ^~~~~ lib/test_rhashtable.c:716:2: note: Taking false branch if (!objs) ^ lib/test_rhashtable.c:719:2: note: Left side of '&&' is true pr_info("Running rhashtable test nelem=%d, max_size=%d, shrinking=%d\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ lib/test_rhashtable.c:719:2: note: Taking true branch pr_info("Running rhashtable test nelem=%d, max_size=%d, shrinking=%d\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ lib/test_rhashtable.c:719:2: note: '?' condition is true pr_info("Running rhashtable test nelem=%d, max_size=%d, shrinking=%d\n", -- lib/test_rhashtable.c:513:12: note: Loop condition is false. Exiting loop list = rht_dereference(list->next, ht); ^ include/linux/rhashtable.h:272:2: note: expanded from macro 'rht_dereference' rcu_dereference_protected(p, lockdep_rht_mutex_is_held(ht)) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:317:2: note: expanded from macro 'RCU_LOCKDEP_WARN' do { \ ^ lib/test_rhashtable.c:517:6: note: Assuming 'list' is null list? ", " : " "); ^~~~ lib/test_rhashtable.c:517:6: note: '?' condition is false lib/test_rhashtable.c:511:4: note: Loop condition is false. Exiting loop do { ^ lib/test_rhashtable.c:521:4: note: Null pointer value stored to 'pos' pos = next, ^~~~~~~~~~ lib/test_rhashtable.c:522:12: note: Calling 'rht_is_a_nulls' next = !rht_is_a_nulls(pos) ? ^~~~~~~~~~~~~~~~~~~ include/linux/rhashtable.h:110:2: note: Returning zero, which participates in a condition later return ((unsigned long) ptr & 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/test_rhashtable.c:522:12: note: Returning from 'rht_is_a_nulls' next = !rht_is_a_nulls(pos) ? ^~~~~~~~~~~~~~~~~~~ lib/test_rhashtable.c:522:11: note: '?' condition is true next = !rht_is_a_nulls(pos) ? ^ lib/test_rhashtable.c:523:5: note: Assuming the condition is false rht_dereference(pos->next, ht) : NULL; ^ include/linux/rhashtable.h:272:2: note: expanded from macro 'rht_dereference' rcu_dereference_protected(p, lockdep_rht_mutex_is_held(ht)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:398:19: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:319:8: note: expanded from macro 'RCU_LOCKDEP_WARN' if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ ^ lib/test_rhashtable.c:523:5: note: Left side of '&&' is false rht_dereference(pos->next, ht) : NULL; ^ include/linux/rhashtable.h:272:2: note: expanded from macro 'rht_dereference' rcu_dereference_protected(p, lockdep_rht_mutex_is_held(ht)) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:319:11: note: expanded from macro 'RCU_LOCKDEP_WARN' if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ ^ lib/test_rhashtable.c:523:5: note: Loop condition is false. Exiting loop rht_dereference(pos->next, ht) : NULL; ^ include/linux/rhashtable.h:272:2: note: expanded from macro 'rht_dereference' rcu_dereference_protected(p, lockdep_rht_mutex_is_held(ht)) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:317:2: note: expanded from macro 'RCU_LOCKDEP_WARN' do { \ ^ lib/test_rhashtable.c:523:5: note: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'pos') rht_dereference(pos->next, ht) : NULL; ^ include/linux/rhashtable.h:272:2: note: expanded from macro 'rht_dereference' rcu_dereference_protected(p, lockdep_rht_mutex_is_held(ht)) ^ ~ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ ~ include/linux/rcupdate.h:400:34: note: expanded from macro '__rcu_dereference_protected' ((typeof(*p) __force __kernel *)(p)); \ ^~ lib/test_rhashtable.c:525:14: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] offset += sprintf(buff + offset, "]]%s", !rht_is_a_nulls(pos) ? " -> " : ""); ^~~~~~~ lib/test_rhashtable.c:525:14: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 offset += sprintf(buff + offset, "]]%s", !rht_is_a_nulls(pos) ? " -> " : ""); ^~~~~~~ >> lib/test_rhashtable.c:726: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(objs, 0, test_rht_params.max_size * sizeof(struct test_obj)); ^~~~~~ lib/test_rhashtable.c:726: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(objs, 0, test_rht_params.max_size * sizeof(struct test_obj)); ^~~~~~ Suppressed 13 warnings (12 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 48 warnings generated. fs/udf/dir.c:180:5: 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(nameptr, udf_get_fi_ident(fi), ^~~~~~ fs/udf/dir.c:180:5: 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(nameptr, udf_get_fi_ident(fi), ^~~~~~ fs/udf/dir.c:182:5: 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(nameptr + lfi - poffset, ^~~~~~ fs/udf/dir.c:182:5: 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(nameptr + lfi - poffset, ^~~~~~ Suppressed 46 warnings (46 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. 52 warnings generated. fs/xfs/xfs_buf_item_recover.c:505:3: 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(xfs_buf_offset(bp, ^~~~~~ fs/xfs/xfs_buf_item_recover.c:505:3: 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(xfs_buf_offset(bp, ^~~~~~ Suppressed 51 warnings (51 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. 52 warnings generated. fs/xfs/xfs_dquot_item_recover.c:148: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(ddq, recddq, item->ri_buf[1].i_len); ^~~~~~ fs/xfs/xfs_dquot_item_recover.c:148: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(ddq, recddq, item->ri_buf[1].i_len); ^~~~~~ Suppressed 51 warnings (51 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. 52 warnings generated. fs/ext4/balloc.c:198: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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ext4/balloc.c:198: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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ext4/balloc.c:692: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(&ar, 0, sizeof(ar)); ^~~~~~ fs/ext4/balloc.c:692: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(&ar, 0, sizeof(ar)); ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 51 warnings generated. fs/ext4/dir.c:482: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(new_fn->name, ent_name->name, ent_name->len); ^~~~~~ fs/ext4/dir.c:482: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(new_fn->name, ent_name->name, ent_name->len); ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 69 warnings generated. fs/ext4/extents.c:1011:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(ix + 1, ix, len * sizeof(struct ext4_extent_idx)); ^~~~~~~ fs/ext4/extents.c:1011:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(ix + 1, ix, len * sizeof(struct ext4_extent_idx)); ^~~~~~~ fs/ext4/extents.c:1019:15: warning: Access to field 'ei_block' results in a dereference of a null pointer (loaded from variable 'ix') [clang-analyzer-core.NullDereference] ix->ei_block = cpu_to_le32(logical); ^ fs/ext4/extents.c:1061:6: note: Assuming the condition is false if (flags & EXT4_EX_NOFAIL) ^~~~~~~~~~~~~~~~~~~~~~ fs/ext4/extents.c:1061:2: note: Taking false branch if (flags & EXT4_EX_NOFAIL) ^ fs/ext4/extents.c:1069:35: note: Assuming field 'eh_max' is 0 if (unlikely(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr))) { ^ fs/ext4/ext4_extents.h:174:3: note: expanded from macro 'EXT_MAX_EXTENT' ((le16_to_cpu((__hdr__)->eh_max)) ? \ ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ fs/ext4/extents.c:1069:35: note: '?' condition is false if (unlikely(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr))) { -- ^~~~~~ drivers/char/ipmi/ipmi_ipmb.c:257:3: 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(iidev->xmitmsg + 5, msg->data + 1, msg->data_size - 1); ^~~~~~ drivers/char/ipmi/ipmi_ipmb.c:257:3: 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(iidev->xmitmsg + 5, msg->data + 1, msg->data_size - 1); ^~~~~~ Suppressed 47 warnings (47 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. 51 warnings generated. drivers/char/ipmi/ipmb_dev_int.c:82: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(&msg, 0, sizeof(msg)); ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:82: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(&msg, 0, sizeof(msg)); ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:102: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(&msg, &queue_elem->request, sizeof(msg)); ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:102: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(&msg, &queue_elem->request, sizeof(msg)); ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:150:12: warning: The right operand of '<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (count < msg[0]) ^ ~~~~~~ drivers/char/ipmi/ipmb_dev_int.c:144:6: note: Assuming the condition is false if (count > sizeof(msg)) ^~~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmb_dev_int.c:144:2: note: Taking false branch if (count > sizeof(msg)) ^ drivers/char/ipmi/ipmb_dev_int.c:147:6: note: Calling 'copy_from_user' if (copy_from_user(&msg, buf, count)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/uaccess.h:191:13: note: Calling 'check_copy_size' if (likely(check_copy_size(to, n, false))) ^ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ include/linux/thread_info.h:221:15: note: Assuming 'sz' is >= 0 if (unlikely(sz >= 0 && sz < bytes)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/thread_info.h:221:15: note: Left side of '&&' is true if (unlikely(sz >= 0 && sz < bytes)) { ^ include/linux/thread_info.h:221:26: note: Assuming 'sz' is < 'bytes', which participates in a condition later if (unlikely(sz >= 0 && sz < bytes)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/thread_info.h:221:2: note: Taking true branch if (unlikely(sz >= 0 && sz < bytes)) { ^ include/linux/thread_info.h:222:3: note: Taking true branch if (!__builtin_constant_p(bytes)) ^ include/linux/uaccess.h:191:13: note: Returning from 'check_copy_size' if (likely(check_copy_size(to, n, false))) ^ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ include/linux/uaccess.h:191:2: note: Taking false branch if (likely(check_copy_size(to, n, false))) ^ include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), which participates in a condition later return n; ^~~~~~~~ drivers/char/ipmi/ipmb_dev_int.c:147:6: note: Returning from 'copy_from_user' if (copy_from_user(&msg, buf, count)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmb_dev_int.c:147:6: note: Assuming the condition is false if (copy_from_user(&msg, buf, count)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/char/ipmi/ipmb_dev_int.c:147:2: note: Taking false branch if (copy_from_user(&msg, buf, count)) ^ drivers/char/ipmi/ipmb_dev_int.c:150:12: note: The right operand of '<' is a garbage value if (count < msg[0]) ^ ~~~~~~ drivers/char/ipmi/ipmb_dev_int.c:215: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(&queue_elem->request, &ipmb_dev->request, ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:215: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(&queue_elem->request, &ipmb_dev->request, ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:259: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(&ipmb_dev->request, 0, sizeof(ipmb_dev->request)); ^~~~~~ drivers/char/ipmi/ipmb_dev_int.c:259: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(&ipmb_dev->request, 0, sizeof(ipmb_dev->request)); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/jffs2/erase.c:60: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(instr, 0, sizeof(*instr)); ^~~~~~ fs/jffs2/erase.c:60: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(instr, 0, sizeof(*instr)); ^~~~~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 47 warnings generated. >> fs/jffs2/fs.c:445: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(ri, 0, sizeof(*ri)); ^~~~~~ fs/jffs2/fs.c:445: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(ri, 0, sizeof(*ri)); ^~~~~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 64 warnings generated. drivers/misc/apds990x.c:588:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(chip->chipname, sizeof(chip->chipname), "APDS-990x"); ^~~~~~~~ drivers/misc/apds990x.c:588:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(chip->chipname, sizeof(chip->chipname), "APDS-990x"); ^~~~~~~~ drivers/misc/apds990x.c:644:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d.%d\n", ^~~~~~~ drivers/misc/apds990x.c:644:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d.%d\n", ^~~~~~~ drivers/misc/apds990x.c:656:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", APDS_RANGE); ^~~~~~~ drivers/misc/apds990x.c:656:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", APDS_RANGE); ^~~~~~~ drivers/misc/apds990x.c:664:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", APDS_CALIB_SCALER); ^~~~~~~ drivers/misc/apds990x.c:664:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", APDS_CALIB_SCALER); ^~~~~~~ drivers/misc/apds990x.c:675:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", chip->lux_calib); ^~~~~~~ drivers/misc/apds990x.c:675:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", chip->lux_calib); ^~~~~~~ drivers/misc/apds990x.c:705:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] pos += sprintf(buf + pos, "%d ", arates_hz[i]); ^~~~~~~ drivers/misc/apds990x.c:705:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 pos += sprintf(buf + pos, "%d ", arates_hz[i]); ^~~~~~~ drivers/misc/apds990x.c:706:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf + pos - 1, "\n"); ^~~~~~~ drivers/misc/apds990x.c:706:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf + pos - 1, "\n"); ^~~~~~~ drivers/misc/apds990x.c:715:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", chip->arate); ^~~~~~~ drivers/misc/apds990x.c:715:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", chip->arate); ^~~~~~~ drivers/misc/apds990x.c:779:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", chip->prox_data); ^~~~~~~ drivers/misc/apds990x.c:779:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", chip->prox_data); ^~~~~~~ drivers/misc/apds990x.c:789:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", APDS_PROX_RANGE); ^~~~~~~ drivers/misc/apds990x.c:789:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", APDS_PROX_RANGE); ^~~~~~~ drivers/misc/apds990x.c:799:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", chip->prox_en); ^~~~~~~ drivers/misc/apds990x.c:799:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", chip->prox_en); ^~~~~~~ drivers/misc/apds990x.c:840:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", ^~~~~~~ drivers/misc/apds990x.c:840:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", ^~~~~~~ drivers/misc/apds990x.c:866:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s %s\n", reporting_modes[0], reporting_modes[1]); ^~~~~~~ drivers/misc/apds990x.c:866:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s %s\n", reporting_modes[0], reporting_modes[1]); ^~~~~~~ drivers/misc/apds990x.c:878:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", chip->lux_thres_hi); ^~~~~~~ drivers/misc/apds990x.c:878:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", chip->lux_thres_hi); -- block/genhd.c:872:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ block/genhd.c:872:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ block/genhd.c:881:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ block/genhd.c:881:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ block/genhd.c:890:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ block/genhd.c:890:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ block/genhd.c:899:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", get_disk_ro(disk) ? 1 : 0); ^~~~~~~ block/genhd.c:899:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", get_disk_ro(disk) ? 1 : 0); ^~~~~~~ block/genhd.c:905:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%llu\n", bdev_nr_sectors(dev_to_bdev(dev))); ^~~~~~~ block/genhd.c:905:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%llu\n", bdev_nr_sectors(dev_to_bdev(dev))); ^~~~~~~ block/genhd.c:922:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, ^~~~~~~ block/genhd.c:922:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, ^~~~~~~ block/genhd.c:964:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%8u %8u\n", inflight[0], inflight[1]); ^~~~~~~ block/genhd.c:964:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%8u %8u\n", inflight[0], inflight[1]); ^~~~~~~ block/genhd.c:972:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%x\n", disk->flags); ^~~~~~~ block/genhd.c:972:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%x\n", disk->flags); ^~~~~~~ block/genhd.c:981:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", queue_alignment_offset(disk->queue)); ^~~~~~~ block/genhd.c:981:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", queue_alignment_offset(disk->queue)); ^~~~~~~ block/genhd.c:990:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue)); ^~~~~~~ block/genhd.c:990:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue)); ^~~~~~~ block/genhd.c:998:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%llu\n", disk->diskseq); ^~~~~~~ block/genhd.c:998:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%llu\n", disk->diskseq); ^~~~~~~ Suppressed 49 warnings (49 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. Suppressed 46 warnings (46 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. 52 warnings generated. include/linux/completion.h:86:10: warning: Access to field 'done' results in a dereference of a null pointer (loaded from variable 'x') [clang-analyzer-core.NullDereference] x->done = 0; ^ fs/xfs/xfs_sysfs.c:637:25: note: Passing value via 1st parameter 'kobj' error = xfs_sysfs_init(&mp->m_error_kobj, &xfs_error_ktype, ^~~~~~~~~~~~~~~~~ fs/xfs/xfs_sysfs.c:637:10: note: Calling 'xfs_sysfs_init' error = xfs_sysfs_init(&mp->m_error_kobj, &xfs_error_ktype, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_sysfs.h:37:11: note: Assuming 'parent_kobj' is null parent = parent_kobj ? &parent_kobj->kobject : NULL; ^~~~~~~~~~~ fs/xfs/xfs_sysfs.h:37:11: note: '?' condition is false fs/xfs/xfs_sysfs.h:38:18: note: Passing value via 1st parameter 'x' init_completion(&kobj->complete); ^~~~~~~~~~~~~~~ fs/xfs/xfs_sysfs.h:38:2: note: Calling 'init_completion' init_completion(&kobj->complete); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/completion.h:86:10: note: Access to field 'done' results in a dereference of a null pointer (loaded from variable 'x') x->done = 0; ~ ^ Suppressed 51 warnings (51 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. 51 warnings generated. Suppressed 51 warnings (51 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. 55 warnings generated. >> fs/hpfs/ea.c:89:4: 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(buf, ea_data(ea), ea_valuelen(ea)); ^~~~~~ fs/hpfs/ea.c:89:4: 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(buf, ea_data(ea), ea_valuelen(ea)); ^~~~~~ fs/hpfs/ea.c:146:4: 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(ret, ea_data(ea), ea_valuelen(ea)); ^~~~~~ fs/hpfs/ea.c:146:4: 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(ret, ea_data(ea), ea_valuelen(ea)); ^~~~~~ fs/hpfs/ea.c:207:5: 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(ea_data(ea), data, size); ^~~~~~ fs/hpfs/ea.c:207:5: 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(ea_data(ea), data, size); ^~~~~~ fs/hpfs/ea.c:260:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(ea->name, key); ^~~~~~ fs/hpfs/ea.c:260:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(ea->name, key); ^~~~~~ fs/hpfs/ea.c:261:3: 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(ea_data(ea), data, size); ^~~~~~ fs/hpfs/ea.c:261:3: 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(ea_data(ea), data, size); ^~~~~~ fs/hpfs/ea.c:276:3: 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, fnode_ea(fnode), le16_to_cpu(fnode->ea_size_s)); ^~~~~~ fs/hpfs/ea.c:276:3: 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, fnode_ea(fnode), le16_to_cpu(fnode->ea_size_s)); ^~~~~~ fs/hpfs/ea.c:332:6: 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(b2, b1, 512); ^~~~~~ fs/hpfs/ea.c:332:6: 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(b2, b1, 512); ^~~~~~ Suppressed 48 warnings (48 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. 35 warnings generated. Suppressed 35 warnings (35 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. 30 warnings generated. Suppressed 30 warnings (30 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. kernel/trace/trace_printk.c:77:5: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(fmt, *iter); ^~~~~~ kernel/trace/trace_printk.c:77:5: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(fmt, *iter); ^~~~~~ Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 37 warnings generated. Suppressed 37 warnings (35 in non-user code, 2 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 47 warnings generated. drivers/regulator/max8907-regulator.c:296: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(pmic->desc, max8907_regulators, sizeof(pmic->desc)); ^~~~~~ drivers/regulator/max8907-regulator.c:296: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(pmic->desc, max8907_regulators, sizeof(pmic->desc)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 50 warnings generated. drivers/regulator/max77802-regulator.c:102:36: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] rdev->desc->enable_mask, val << shift); ^ ~~~~~ drivers/regulator/max77802-regulator.c:98:14: note: Calling 'max77802_get_opmode_shift' int shift = max77802_get_opmode_shift(id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:6: note: Assuming 'id' is not equal to MAX77802_BUCK1 if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:6: note: Left side of '||' is false drivers/regulator/max77802-regulator.c:73:31: note: Assuming 'id' is < MAX77802_BUCK5 if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:52: note: Left side of '&&' is false -- if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:6: note: Left side of '||' is false drivers/regulator/max77802-regulator.c:73:31: note: Assuming 'id' is < MAX77802_BUCK5 if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:52: note: Left side of '&&' is false if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^ drivers/regulator/max77802-regulator.c:77:6: note: Assuming 'id' is < MAX77802_BUCK2 if (id >= MAX77802_BUCK2 && id <= MAX77802_BUCK4) ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:77:27: note: Left side of '&&' is false if (id >= MAX77802_BUCK2 && id <= MAX77802_BUCK4) ^ drivers/regulator/max77802-regulator.c:80:6: note: 'id' is < MAX77802_LDO1 if (id >= MAX77802_LDO1 && id <= MAX77802_LDO35) ^~ drivers/regulator/max77802-regulator.c:80:26: note: Left side of '&&' is false if (id >= MAX77802_LDO1 && id <= MAX77802_LDO35) ^ drivers/regulator/max77802-regulator.c:83:2: note: Returning the value -22 return -EINVAL; ^~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:165:14: note: Returning from 'max77802_get_opmode_shift' int shift = max77802_get_opmode_shift(id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:165:2: note: 'shift' initialized to -22 int shift = max77802_get_opmode_shift(id); ^~~~~~~~~ drivers/regulator/max77802-regulator.c:171:6: note: Assuming the condition is false if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:171:2: note: Taking false branch if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) { ^ drivers/regulator/max77802-regulator.c:177:2: note: Control jumps to 'case 8:' at line 178 switch (mode) { ^ drivers/regulator/max77802-regulator.c:184:7: note: Assuming the condition is true if (max77802->opmode[id] == MAX77802_OPMODE_NORMAL) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:184:3: note: Taking true branch if (max77802->opmode[id] == MAX77802_OPMODE_NORMAL) ^ drivers/regulator/max77802-regulator.c:188:3: note: Execution continues on line 205 break; ^ drivers/regulator/max77802-regulator.c:206:36: note: The result of the left shift is undefined because the right operand is negative rdev->desc->enable_mask, val << shift); ^ ~~~~~ drivers/regulator/max77802-regulator.c:220:28: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] max77802->opmode[id] << shift); ^ ~~~~~ drivers/regulator/max77802-regulator.c:213:14: note: Calling 'max77802_get_opmode_shift' int shift = max77802_get_opmode_shift(id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:6: note: Assuming 'id' is not equal to MAX77802_BUCK1 if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:6: note: Left side of '||' is false drivers/regulator/max77802-regulator.c:73:31: note: Assuming 'id' is < MAX77802_BUCK5 if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:73:52: note: Left side of '&&' is false if (id == MAX77802_BUCK1 || (id >= MAX77802_BUCK5 && ^ drivers/regulator/max77802-regulator.c:77:6: note: Assuming 'id' is < MAX77802_BUCK2 if (id >= MAX77802_BUCK2 && id <= MAX77802_BUCK4) ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:77:27: note: Left side of '&&' is false if (id >= MAX77802_BUCK2 && id <= MAX77802_BUCK4) ^ drivers/regulator/max77802-regulator.c:80:6: note: 'id' is < MAX77802_LDO1 if (id >= MAX77802_LDO1 && id <= MAX77802_LDO35) ^~ drivers/regulator/max77802-regulator.c:80:26: note: Left side of '&&' is false if (id >= MAX77802_LDO1 && id <= MAX77802_LDO35) ^ drivers/regulator/max77802-regulator.c:83:2: note: Returning the value -22 return -EINVAL; ^~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:213:14: note: Returning from 'max77802_get_opmode_shift' int shift = max77802_get_opmode_shift(id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:213:2: note: 'shift' initialized to -22 int shift = max77802_get_opmode_shift(id); ^~~~~~~~~ drivers/regulator/max77802-regulator.c:215:6: note: Assuming the condition is true if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/max77802-regulator.c:215:2: note: Taking true branch if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) ^ drivers/regulator/max77802-regulator.c:220:28: note: The result of the left shift is undefined because the right operand is negative max77802->opmode[id] << shift); ^ ~~~~~ Suppressed 46 warnings (46 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. 18 warnings generated. >> crypto/pcrypt.c:105: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(padata, 0, sizeof(struct padata_priv)); ^~~~~~ crypto/pcrypt.c:105: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(padata, 0, sizeof(struct padata_priv)); ^~~~~~ crypto/pcrypt.c:152: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(padata, 0, sizeof(struct padata_priv)); ^~~~~~ crypto/pcrypt.c:152: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(padata, 0, sizeof(struct padata_priv)); ^~~~~~ >> crypto/pcrypt.c:219:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ crypto/pcrypt.c:219:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, ^~~~~~~~ >> crypto/pcrypt.c:223: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(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); ^~~~~~ crypto/pcrypt.c:223: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(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); ^~~~~~ Suppressed 14 warnings (14 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 88 warnings generated. drivers/nvme/target/configfs.c:63:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%s\n", nvmet_addr_family[i].name); ^~~~~~~ drivers/nvme/target/configfs.c:63:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "%s\n", nvmet_addr_family[i].name); ^~~~~~~ drivers/nvme/target/configfs.c:66:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "\n"); ^~~~~~~ drivers/nvme/target/configfs.c:66:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "\n"); ^~~~~~~ drivers/nvme/target/configfs.c:98:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/nvme/target/configfs.c:98:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/nvme/target/configfs.c:127:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%s\n", ^~~~~~~~ drivers/nvme/target/configfs.c:127:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%s\n", ^~~~~~~~ drivers/nvme/target/configfs.c:144:6: warning: Call to function 'sscanf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(page, "%s\n", port->disc_addr.traddr) != 1) ^~~~~~ drivers/nvme/target/configfs.c:144:6: note: Call to function 'sscanf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 if (sscanf(page, "%s\n", port->disc_addr.traddr) != 1) ^~~~~~ drivers/nvme/target/configfs.c:165:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%s\n", nvmet_addr_treq[i].name); ^~~~~~~ drivers/nvme/target/configfs.c:165:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "%s\n", nvmet_addr_treq[i].name); ^~~~~~~ drivers/nvme/target/configfs.c:168:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "\n"); ^~~~~~~ drivers/nvme/target/configfs.c:168:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "\n"); ^~~~~~~ drivers/nvme/target/configfs.c:202:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%s\n", ^~~~~~~~ drivers/nvme/target/configfs.c:202:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%s\n", ^~~~~~~~ drivers/nvme/target/configfs.c:218:6: warning: Call to function 'sscanf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(page, "%s\n", port->disc_addr.trsvcid) != 1) ^~~~~~ drivers/nvme/target/configfs.c:218:6: note: Call to function 'sscanf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 if (sscanf(page, "%s\n", port->disc_addr.trsvcid) != 1) ^~~~~~ drivers/nvme/target/configfs.c:230:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%d\n", port->inline_data_size); ^~~~~~~~ drivers/nvme/target/configfs.c:230:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%d\n", port->inline_data_size); ^~~~~~~~ drivers/nvme/target/configfs.c:257:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%d\n", port->pi_enable); ^~~~~~~~ drivers/nvme/target/configfs.c:257:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%d\n", port->pi_enable); ^~~~~~~~ drivers/nvme/target/configfs.c:287:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%s\n", nvmet_transport[i].name); ^~~~~~~ drivers/nvme/target/configfs.c:287:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "%s\n", nvmet_transport[i].name); ^~~~~~~ drivers/nvme/target/configfs.c:290:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "\n"); -- ^~~~~~~~ drivers/scsi/raid_class.c:210:1: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 raid_attr_ro_state_fn(state); ^ drivers/scsi/raid_class.c:205:37: note: expanded from macro 'raid_attr_ro_state_fn' #define raid_attr_ro_state_fn(attr) raid_attr_ro_states(attr, attr, ATTR_CODE(attr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/raid_class.c:184:52: note: expanded from macro 'raid_attr_ro_states' #define raid_attr_ro_states(attr, states, code) \ ^ drivers/scsi/raid_class.c:181:9: note: expanded from macro '\raid_attr_show_internal' return snprintf(buf, 20, #fmt "\n", var); \ ^~~~~~~~ Suppressed 47 warnings (47 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. 36 warnings generated. drivers/dma-buf/dma-heap.c:167: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(kdata + in_size, 0, ksize - in_size); ^~~~~~ drivers/dma-buf/dma-heap.c:167: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(kdata + in_size, 0, ksize - in_size); ^~~~~~ Suppressed 35 warnings (35 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. 31 warnings generated. drivers/dma-buf/sync_file.c:138:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "%s-%s%llu-%lld", ^~~~~~~~ drivers/dma-buf/sync_file.c:138:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "%s-%s%llu-%lld", ^~~~~~~~ Suppressed 30 warnings (30 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. 38 warnings generated. drivers/dma-buf/sw_sync.c:163:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(str, size, "%lld", fence->seqno); ^~~~~~~~ drivers/dma-buf/sw_sync.c:163:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(str, size, "%lld", fence->seqno); ^~~~~~~~ drivers/dma-buf/sw_sync.c:171:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(str, size, "%d", parent->value); ^~~~~~~~ drivers/dma-buf/sw_sync.c:171:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(str, size, "%d", parent->value); ^~~~~~~~ Suppressed 36 warnings (36 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. 47 warnings generated. Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/video/backlight/bd6107.c:157: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(&props, 0, sizeof(props)); ^~~~~~ drivers/video/backlight/bd6107.c:157: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(&props, 0, sizeof(props)); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. drivers/video/backlight/gpio_backlight.c:75: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(&props, 0, sizeof(props)); ^~~~~~ drivers/video/backlight/gpio_backlight.c:75: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(&props, 0, sizeof(props)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/video/backlight/lm3533_bl.c:299: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(&props, 0, sizeof(props)); ^~~~~~ drivers/video/backlight/lm3533_bl.c:299: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(&props, 0, sizeof(props)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 50 warnings generated. Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 51 warnings generated. >> fs/orangefs/orangefs-bufmap.c:547: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(page_to, page_from, PAGE_SIZE); ^~~~~~ fs/orangefs/orangefs-bufmap.c:547: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(page_to, page_from, PAGE_SIZE); ^~~~~~ Suppressed 50 warnings (50 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. 68 warnings generated. fs/orangefs/orangefs-debugfs.c:207:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(k_buffer, kernel_debug_string); ^~~~~~ fs/orangefs/orangefs-debugfs.c:207:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(k_buffer, kernel_debug_string); ^~~~~~ fs/orangefs/orangefs-debugfs.c:208:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(k_buffer, "\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:208:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(k_buffer, "\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:210:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(k_buffer, "none\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:210:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(k_buffer, "none\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:313:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(c_buffer, client_debug_string); ^~~~~~ fs/orangefs/orangefs-debugfs.c:313:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(c_buffer, client_debug_string); ^~~~~~ fs/orangefs/orangefs-debugfs.c:314:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(c_buffer, "\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:314:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(c_buffer, "\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:316:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(c_buffer, "none\n"); ^~~~~~ fs/orangefs/orangefs-debugfs.c:316:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(c_buffer, "none\n"); ^~~~~~ >> fs/orangefs/orangefs-debugfs.c:375:16: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf_ret = sprintf(buf, "%s", (char *)file->private_data); ^~~~~~~ fs/orangefs/orangefs-debugfs.c:375:16: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf_ret = sprintf(buf, "%s", (char *)file->private_data); ^~~~~~~ >> fs/orangefs/orangefs-debugfs.c:469: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(new_op->upcall.req.param.s_value, ^~~~~~ fs/orangefs/orangefs-debugfs.c:469: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(new_op->upcall.req.param.s_value, ^~~~~~ >> fs/orangefs/orangefs-debugfs.c:472:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(new_op->upcall.req.param.s_value, ^~~~~~~ fs/orangefs/orangefs-debugfs.c:472:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(new_op->upcall.req.param.s_value, ^~~~~~~ fs/orangefs/orangefs-debugfs.c:493: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(s, 0, ORANGEFS_MAX_DEBUG_STRING_LEN); ^~~~~~ fs/orangefs/orangefs-debugfs.c:493: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(s, 0, ORANGEFS_MAX_DEBUG_STRING_LEN); ^~~~~~ fs/orangefs/orangefs-debugfs.c:494:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(s, "%s\n", debug_string); ^~~~~~~ fs/orangefs/orangefs-debugfs.c:494:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(s, "%s\n", debug_string); ^~~~~~~ >> fs/orangefs/orangefs-debugfs.c:558:3: warning: Call to function 'sscanf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sscanf(cds_head, ^~~~~~ fs/orangefs/orangefs-debugfs.c:558:3: note: Call to function 'sscanf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 sscanf(cds_head, ^~~~~~ fs/orangefs/orangefs-debugfs.c:671: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(debug_help_string, 0, DEBUG_HELP_STRING_SIZE); ^~~~~~ fs/orangefs/orangefs-debugfs.c:671: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(debug_help_string, 0, DEBUG_HELP_STRING_SIZE); ^~~~~~ fs/orangefs/orangefs-debugfs.c:703: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(debug_string, 0, ORANGEFS_MAX_DEBUG_STRING_LEN); ^~~~~~ fs/orangefs/orangefs-debugfs.c:703: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(debug_string, 0, ORANGEFS_MAX_DEBUG_STRING_LEN); ^~~~~~ fs/orangefs/orangefs-debugfs.c:750:5: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(kernel_debug_string, ^~~~~~ fs/orangefs/orangefs-debugfs.c:750:5: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(kernel_debug_string, ^~~~~~ fs/orangefs/orangefs-debugfs.c:752:5: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(kernel_debug_string, ","); ^~~~~~ fs/orangefs/orangefs-debugfs.c:752:5: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(kernel_debug_string, ","); ^~~~~~ fs/orangefs/orangefs-debugfs.c:777:5: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(client_debug_string, ^~~~~~ fs/orangefs/orangefs-debugfs.c:777:5: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(client_debug_string, ^~~~~~ fs/orangefs/orangefs-debugfs.c:779:5: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(client_debug_string, ","); ^~~~~~ fs/orangefs/orangefs-debugfs.c:779:5: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(client_debug_string, ","); ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 51 warnings generated. Suppressed 51 warnings (51 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. fs/ext4/xattr.c:368:3: 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((char *)buf + blocksize * i, bhs[i]->b_data, ^~~~~~ fs/ext4/xattr.c:368:3: 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((char *)buf + blocksize * i, bhs[i]->b_data, ^~~~~~ fs/ext4/xattr.c:563:4: 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(buffer, p, size); ^~~~~~ fs/ext4/xattr.c:563:4: 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(buffer, p, size); ^~~~~~ fs/ext4/xattr.c:618:4: 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(buffer, p, size); ^~~~~~ fs/ext4/xattr.c:618:4: 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(buffer, p, size); ^~~~~~ fs/ext4/xattr.c:678:5: 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(buffer, prefix, prefix_len); ^~~~~~ fs/ext4/xattr.c:678:5: 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(buffer, prefix, prefix_len); ^~~~~~ fs/ext4/xattr.c:680:5: 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(buffer, entry->e_name, entry->e_name_len); ^~~~~~ fs/ext4/xattr.c:680:5: 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(buffer, entry->e_name, entry->e_name_len); ^~~~~~ fs/ext4/xattr.c:1382:3: 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(bh->b_data, buf, csize); ^~~~~~ fs/ext4/xattr.c:1382:3: 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(bh->b_data, buf, csize); ^~~~~~ fs/ext4/xattr.c:1582:4: 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(val, 0, new_size); ^~~~~~ fs/ext4/xattr.c:1582:4: 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(val, 0, new_size); ^~~~~~ fs/ext4/xattr.c:1584:4: 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(val, i->value, i->value_len); ^~~~~~ fs/ext4/xattr.c:1584:4: 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(val, i->value, i->value_len); ^~~~~~ fs/ext4/xattr.c:1586:4: 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(val + i->value_len, 0, new_size - i->value_len); -- ^~~~~~ fs/ext4/xattr.c:1699: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(first_val, 0, old_size); ^~~~~~ fs/ext4/xattr.c:1719:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(here, (void *)here + size, ^~~~~~~ fs/ext4/xattr.c:1719:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(here, (void *)here + size, ^~~~~~~ fs/ext4/xattr.c:1721: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(last, 0, size); ^~~~~~ fs/ext4/xattr.c:1721: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(last, 0, size); ^~~~~~ fs/ext4/xattr.c:1727:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove((void *)here + size, here, rest); ^~~~~~~ fs/ext4/xattr.c:1727:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove((void *)here + size, here, rest); ^~~~~~~ fs/ext4/xattr.c:1728: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(here, 0, size); ^~~~~~ fs/ext4/xattr.c:1728: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(here, 0, size); ^~~~~~ fs/ext4/xattr.c:1731:3: 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(here->e_name, i->name, name_len); ^~~~~~ fs/ext4/xattr.c:1731:3: 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(here->e_name, i->name, name_len); ^~~~~~ fs/ext4/xattr.c:1748:5: 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(val, 0, new_size); ^~~~~~ fs/ext4/xattr.c:1748:5: 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(val, 0, new_size); ^~~~~~ fs/ext4/xattr.c:1750:5: 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(val, i->value, i->value_len); ^~~~~~ fs/ext4/xattr.c:1750:5: 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(val, i->value, i->value_len); ^~~~~~ fs/ext4/xattr.c:1752:5: 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(val + i->value_len, 0, ^~~~~~ fs/ext4/xattr.c:1752:5: 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(val + i->value_len, 0, ^~~~~~ fs/ext4/xattr.c:1902:4: 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(s->base, BHDR(bs->bh), bs->bh->b_size); ^~~~~~ fs/ext4/xattr.c:1902:4: 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(s->base, BHDR(bs->bh), bs->bh->b_size); ^~~~~~ fs/ext4/xattr.c:2108:4: 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(new_bh->b_data, s->base, new_bh->b_size); ^~~~~~ fs/ext4/xattr.c:2108:4: 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(new_bh->b_data, s->base, new_bh->b_size); ^~~~~~ fs/ext4/xattr.c:2325: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(raw_inode, 0, EXT4_SB(inode->i_sb)->s_inode_size); ^~~~~~ fs/ext4/xattr.c:2325: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(raw_inode, 0, EXT4_SB(inode->i_sb)->s_inode_size); ^~~~~~ fs/ext4/xattr.c:2517:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(to, from, n); ^~~~~~~ fs/ext4/xattr.c:2517:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(to, from, n); ^~~~~~~ fs/ext4/xattr.c:2561:3: 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(buffer, (void *)IFIRST(header) + value_offs, value_size); ^~~~~~ fs/ext4/xattr.c:2561:3: 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(buffer, (void *)IFIRST(header) + value_offs, value_size); ^~~~~~ fs/ext4/xattr.c:2564: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(b_entry_name, entry->e_name, entry->e_name_len); ^~~~~~ fs/ext4/xattr.c:2564: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(b_entry_name, entry->e_name, entry->e_name_len); ^~~~~~ fs/ext4/xattr.c:2813:3: 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(new_array, *ea_inode_array, ^~~~~~ fs/ext4/xattr.c:2813:3: 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(new_array, *ea_inode_array, ^~~~~~ Suppressed 50 warnings (50 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/ecryptfs/debug.c:37:3: 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(sig, auth_tok->token.password.signature, ^~~~~~ fs/ecryptfs/debug.c:37:3: 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(sig, auth_tok->token.password.signature, ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. >> fs/ecryptfs/miscdev.c:161: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(msg_ctx->msg->data, data, data_size); ^~~~~~ fs/ecryptfs/miscdev.c:161: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(msg_ctx->msg->data, data, data_size); ^~~~~~ fs/ecryptfs/miscdev.c:417:3: 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(&counter_nbo, &data[PKT_CTR_OFFSET], PKT_CTR_SIZE); ^~~~~~ fs/ecryptfs/miscdev.c:417:3: 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(&counter_nbo, &data[PKT_CTR_OFFSET], PKT_CTR_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 50 warnings generated. >> fs/xfs/scrub/refcount.c:132:3: 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(&frag->rm, rec, sizeof(frag->rm)); ^~~~~~ fs/xfs/scrub/refcount.c:132:3: 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(&frag->rm, rec, sizeof(frag->rm)); ^~~~~~ >> fs/xfs/scrub/refcount.c:291: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(&low, 0, sizeof(low)); ^~~~~~ fs/xfs/scrub/refcount.c:291: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(&low, 0, sizeof(low)); ^~~~~~ fs/xfs/scrub/refcount.c:293: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(&high, 0xFF, sizeof(high)); ^~~~~~ fs/xfs/scrub/refcount.c:293: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(&high, 0xFF, sizeof(high)); ^~~~~~ Suppressed 47 warnings (47 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 56 warnings generated. >> fs/xfs/scrub/agheader_repair.c:199: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(old_agf, agf, sizeof(*old_agf)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:199: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(old_agf, agf, sizeof(*old_agf)); ^~~~~~ >> fs/xfs/scrub/agheader_repair.c:200: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(agf, 0, BBTOB(agf_bp->b_length)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:200: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(agf, 0, BBTOB(agf_bp->b_length)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:442: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(agf, &old_agf, sizeof(old_agf)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:442: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(agf, &old_agf, sizeof(old_agf)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:604: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(agfl, 0xFF, BBTOB(agfl_bp->b_length)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:604: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(agfl, 0xFF, BBTOB(agfl_bp->b_length)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:780: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(old_agi, agi, sizeof(*old_agi)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:780: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(old_agi, agi, sizeof(*old_agi)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:781: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(agi, 0, BBTOB(agi_bp->b_length)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:781: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(agi, 0, BBTOB(agi_bp->b_length)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:793: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(&agi->agi_unlinked, &old_agi->agi_unlinked, ^~~~~~ fs/xfs/scrub/agheader_repair.c:793: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(&agi->agi_unlinked, &old_agi->agi_unlinked, ^~~~~~ fs/xfs/scrub/agheader_repair.c:952: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(agi, &old_agi, sizeof(old_agi)); ^~~~~~ fs/xfs/scrub/agheader_repair.c:952: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(agi, &old_agi, sizeof(old_agi)); ^~~~~~ Suppressed 48 warnings (48 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. 61 warnings generated. fs/ext4/inline.c:183: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(buffer, (void *)(raw_inode->i_block), cp_len); ^~~~~~ fs/ext4/inline.c:183: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(buffer, (void *)(raw_inode->i_block), cp_len); ^~~~~~ fs/ext4/inline.c:197: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(buffer, ^~~~~~ fs/ext4/inline.c:197: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(buffer, ^~~~~~ fs/ext4/inline.c:231:3: 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((void *)raw_inode->i_block + pos, buffer, cp_len); ^~~~~~ fs/ext4/inline.c:231:3: 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((void *)raw_inode->i_block + pos, buffer, cp_len); ^~~~~~ fs/ext4/inline.c:246: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((void *)IFIRST(header) + le16_to_cpu(entry->e_value_offs) + pos, ^~~~~~ fs/ext4/inline.c:246: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((void *)IFIRST(header) + le16_to_cpu(entry->e_value_offs) + pos, ^~~~~~ fs/ext4/inline.c:299: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((void *)ext4_raw_inode(&is.iloc)->i_block, ^~~~~~ fs/ext4/inline.c:299: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((void *)ext4_raw_inode(&is.iloc)->i_block, ^~~~~~ fs/ext4/inline.c:442: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((void *)ext4_raw_inode(&is.iloc)->i_block, ^~~~~~ fs/ext4/inline.c:442: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((void *)ext4_raw_inode(&is.iloc)->i_block, ^~~~~~ fs/ext4/inline.c:444: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(ei->i_data, 0, EXT4_MIN_INLINE_DATA_SIZE); ^~~~~~ fs/ext4/inline.c:444: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(ei->i_data, 0, EXT4_MIN_INLINE_DATA_SIZE); ^~~~~~ fs/ext4/inline.c:1164: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((void *)de, buf + EXT4_INLINE_DOTDOT_SIZE, ^~~~~~ fs/ext4/inline.c:1164: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((void *)de, buf + EXT4_INLINE_DOTDOT_SIZE, ^~~~~~ fs/ext4/inline.c:1250: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_bh->b_data, 0, inode->i_sb->s_blocksize); ^~~~~~ fs/ext4/inline.c:1250: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_bh->b_data, 0, inode->i_sb->s_blocksize); ^~~~~~ fs/ext4/inline.c:1253:3: 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_bh->b_data, buf, inline_size); -- fs/fat/cache.c:92:7: note: Assuming 'fclus' is >= field 'fcluster' if (p->fcluster <= fclus && hit->fcluster < p->fcluster) { ^~~~~~~~~~~~~~~~~~~~ fs/fat/cache.c:92:7: note: Left side of '&&' is true fs/fat/cache.c:92:31: note: Assuming 'hit->fcluster' is < 'p->fcluster' if (p->fcluster <= fclus && hit->fcluster < p->fcluster) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fat/cache.c:92:3: note: Taking true branch if (p->fcluster <= fclus && hit->fcluster < p->fcluster) { ^ fs/fat/cache.c:94:8: note: Assuming the condition is false if ((hit->fcluster + hit->nr_contig) < fclus) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fat/cache.c:94:4: note: Taking false branch if ((hit->fcluster + hit->nr_contig) < fclus) { ^ fs/fat/cache.c:98:5: note: Execution continues on line 102 break; ^ fs/fat/cache.c:102:6: note: Assuming the condition is false if (hit != &nohit) { ^~~~~~~~~~~~~ fs/fat/cache.c:102:2: note: Taking false branch if (hit != &nohit) { ^ fs/fat/cache.c:114:2: note: Returning without writing to 'cid->nr_contig' return offset; ^ fs/fat/cache.c:247:6: note: Returning from 'fat_cache_lookup' if (fat_cache_lookup(inode, cluster, &cid, fclus, dclus) < 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fat/cache.c:247:6: note: Assuming the condition is false if (fat_cache_lookup(inode, cluster, &cid, fclus, dclus) < 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fat/cache.c:247:2: note: Taking false branch if (fat_cache_lookup(inode, cluster, &cid, fclus, dclus) < 0) { ^ fs/fat/cache.c:256:2: note: Loop condition is true. Entering loop body while (*fclus < cluster) { ^ fs/fat/cache.c:258:7: note: Assuming the condition is false if (*fclus > limit) { ^~~~~~~~~~~~~~ fs/fat/cache.c:258:3: note: Taking false branch if (*fclus > limit) { ^ fs/fat/cache.c:267:7: note: Assuming 'nr' is >= 0 if (nr < 0) ^~~~~~ fs/fat/cache.c:267:3: note: Taking false branch if (nr < 0) ^ fs/fat/cache.c:269:12: note: Assuming 'nr' is not equal to FAT_ENT_FREE else if (nr == FAT_ENT_FREE) { ^~~~~~~~~~~~~~~~~~ fs/fat/cache.c:269:8: note: Taking false branch else if (nr == FAT_ENT_FREE) { ^ fs/fat/cache.c:275:14: note: Assuming 'nr' is not equal to FAT_ENT_EOF } else if (nr == FAT_ENT_EOF) { ^~~~~~~~~~~~~~~~~ fs/fat/cache.c:275:10: note: Taking false branch } else if (nr == FAT_ENT_EOF) { ^ fs/fat/cache.c:281:8: note: Calling 'cache_contiguous' if (!cache_contiguous(&cid, *dclus)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/fat/cache.c:213:2: note: The expression is an uninitialized value. The computed value will also be garbage cid->nr_contig++; ^~~~~~~~~~~~~~ Suppressed 48 warnings (48 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. 47 warnings generated. drivers/phy/phy-core.c:307:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = 0; /* Override possible ret == -ENOTSUPP */ ^ ~ drivers/phy/phy-core.c:307:2: note: Value stored to 'ret' is never read ret = 0; /* Override possible ret == -ENOTSUPP */ ^ ~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> drivers/regulator/cpcap-regulator.c:531: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(&config, 0, sizeof(config)); ^~~~~~ drivers/regulator/cpcap-regulator.c:531: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(&config, 0, sizeof(config)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/qnx4/inode.c:311: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(qnx4_inode, raw_inode, QNX4_DIR_ENTRY_SIZE); ^~~~~~ fs/qnx4/inode.c:311: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(qnx4_inode, raw_inode, QNX4_DIR_ENTRY_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 51 warnings generated. >> fs/adfs/dir.c:30:3: 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(dst, dir->bhs[index]->b_data + offset, remain); ^~~~~~ fs/adfs/dir.c:30:3: 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, dir->bhs[index]->b_data + offset, remain); ^~~~~~ fs/adfs/dir.c:37: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(dst, dir->bhs[index]->b_data + offset, len); ^~~~~~ fs/adfs/dir.c:37: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, dir->bhs[index]->b_data + offset, len); ^~~~~~ fs/adfs/dir.c:55:3: 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(dir->bhs[index]->b_data + offset, src, remain); ^~~~~~ fs/adfs/dir.c:55:3: 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(dir->bhs[index]->b_data + offset, src, remain); ^~~~~~ fs/adfs/dir.c:62: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(dir->bhs[index]->b_data + offset, src, len); ^~~~~~ fs/adfs/dir.c:62: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(dir->bhs[index]->b_data + offset, src, len); ^~~~~~ fs/adfs/dir.c:115:4: 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(bhs, dir->bhs, dir->nr_buffers * sizeof(*bhs)); ^~~~~~ fs/adfs/dir.c:115:4: 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(bhs, dir->bhs, dir->nr_buffers * sizeof(*bhs)); ^~~~~~ Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. 23 warnings generated. Suppressed 23 warnings (23 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. 23 warnings generated. Suppressed 23 warnings (23 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. 31 warnings generated. Suppressed 31 warnings (31 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. 12 warnings generated. Suppressed 12 warnings (12 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. 108 warnings generated. drivers/spi/spi.c:66:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s%s\n", SPI_MODULE_PREFIX, spi->modalias); ^~~~~~~ drivers/spi/spi.c:66:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s%s\n", SPI_MODULE_PREFIX, spi->modalias); ^~~~~~~ drivers/spi/spi.c:109:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, PAGE_SIZE, "%s\n", spi->driver_override ? : ""); ^~~~~~~~ drivers/spi/spi.c:109:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, PAGE_SIZE, "%s\n", spi->driver_override ? : ""); ^~~~~~~~ drivers/spi/spi.c:157:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_SHOW(messages, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:157:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 SPI_STATISTICS_SHOW(messages, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:158:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_SHOW(transfers, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:158:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 SPI_STATISTICS_SHOW(transfers, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:159:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_SHOW(errors, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:188:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_TRANSFER_BYTES_HISTO(14, "16384-32767"); ^ drivers/spi/spi.c:171:2: note: expanded from macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO' SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:188:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 SPI_STATISTICS_TRANSFER_BYTES_HISTO(14, "16384-32767"); ^ drivers/spi/spi.c:171:2: note: expanded from macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO' SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:189:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_TRANSFER_BYTES_HISTO(15, "32768-65535"); ^ drivers/spi/spi.c:171:2: note: expanded from macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO' SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:189:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 SPI_STATISTICS_TRANSFER_BYTES_HISTO(15, "32768-65535"); ^ drivers/spi/spi.c:171:2: note: expanded from macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO' SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:190:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_TRANSFER_BYTES_HISTO(16, "65536+"); ^ drivers/spi/spi.c:171:2: note: expanded from macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO' SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:190:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 SPI_STATISTICS_TRANSFER_BYTES_HISTO(16, "65536+"); ^ drivers/spi/spi.c:171:2: note: expanded from macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO' SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:192:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] SPI_STATISTICS_SHOW(transfers_split_maxsize, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:192:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 SPI_STATISTICS_SHOW(transfers_split_maxsize, "%lu"); ^ drivers/spi/spi.c:154:2: note: expanded from macro 'SPI_STATISTICS_SHOW' SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi.c:147:8: note: expanded from macro 'SPI_STATISTICS_SHOW_NAME' len = sprintf(buf, format_string, stat->field); \ ^~~~~~~ drivers/spi/spi.c:836:3: 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(&bi->board_info, info, sizeof(*info)); ^~~~~~ drivers/spi/spi.c:836:3: 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(&bi->board_info, info, sizeof(*info)); ^~~~~~ drivers/spi/spi.c:1832: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] kthread_init_work(&ctlr->pump_messages, spi_pump_messages); ^ include/linux/kthread.h:195:3: note: expanded from macro 'kthread_init_work' memset((work), 0, sizeof(struct kthread_work)); \ ^~~~~~ drivers/spi/spi.c:1832: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 kthread_init_work(&ctlr->pump_messages, spi_pump_messages); ^ include/linux/kthread.h:195:3: note: expanded from macro 'kthread_init_work' memset((work), 0, sizeof(struct kthread_work)); \ ^~~~~~ drivers/spi/spi.c:2558:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", ^~~~~~~ drivers/spi/spi.c:2558:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", ^~~~~~~ >> drivers/spi/spi.c:2572:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] rc = sscanf(buf, "%31s", name); ^~~~~~ drivers/spi/spi.c:2572:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 rc = sscanf(buf, "%31s", name); ^~~~~~ drivers/spi/spi.c:3262:3: 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(xfer, xfer_first, sizeof(*xfer)); ^~~~~~ drivers/spi/spi.c:3262:3: 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(xfer, xfer_first, sizeof(*xfer)); ^~~~~~ drivers/spi/spi.c:3568:3: 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(&xfer->word_delay, &spi->word_delay, ^~~~~~ drivers/spi/spi.c:3568:3: 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(&xfer->word_delay, &spi->word_delay, ^~~~~~ drivers/spi/spi.c:4086: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(x, 0, sizeof(x)); ^~~~~~ drivers/spi/spi.c:4086: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(x, 0, sizeof(x)); ^~~~~~ drivers/spi/spi.c:4096: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(local_buf, txbuf, n_tx); ^~~~~~ drivers/spi/spi.c:4096: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(local_buf, txbuf, n_tx); ^~~~~~ drivers/spi/spi.c:4103:3: 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(rxbuf, x[1].rx_buf, n_rx); ^~~~~~ drivers/spi/spi.c:4103:3: 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(rxbuf, x[1].rx_buf, n_rx); ^~~~~~ Suppressed 69 warnings (69 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 39 warnings generated. drivers/bus/moxtet.c:64:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DEF_MODULE_ATTR(id, "0x%x\n", mdev->id); ^ drivers/bus/moxtet.c:60:9: note: expanded from macro 'DEF_MODULE_ATTR' return sprintf(buf, (fmt), __VA_ARGS__); \ ^~~~~~~ drivers/bus/moxtet.c:64:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 DEF_MODULE_ATTR(id, "0x%x\n", mdev->id); ^ drivers/bus/moxtet.c:60:9: note: expanded from macro 'DEF_MODULE_ATTR' return sprintf(buf, (fmt), __VA_ARGS__); \ ^~~~~~~ drivers/bus/moxtet.c:65:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DEF_MODULE_ATTR(name, "%s\n", mox_module_name(mdev->id)); ^ drivers/bus/moxtet.c:60:9: note: expanded from macro 'DEF_MODULE_ATTR' return sprintf(buf, (fmt), __VA_ARGS__); \ ^~~~~~~ drivers/bus/moxtet.c:65:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 DEF_MODULE_ATTR(name, "%s\n", mox_module_name(mdev->id)); ^ drivers/bus/moxtet.c:60:9: note: expanded from macro 'DEF_MODULE_ATTR' return sprintf(buf, (fmt), __VA_ARGS__); \ ^~~~~~~ drivers/bus/moxtet.c:66:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DEF_MODULE_ATTR(description, "%s\n", ^ drivers/bus/moxtet.c:60:9: note: expanded from macro 'DEF_MODULE_ATTR' return sprintf(buf, (fmt), __VA_ARGS__); \ ^~~~~~~ drivers/bus/moxtet.c:66:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 DEF_MODULE_ATTR(description, "%s\n", ^ drivers/bus/moxtet.c:60:9: note: expanded from macro 'DEF_MODULE_ATTR' return sprintf(buf, (fmt), __VA_ARGS__); \ ^~~~~~~ drivers/bus/moxtet.c:338: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(cnts, 0, sizeof(cnts)); ^~~~~~ drivers/bus/moxtet.c:338: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(cnts, 0, sizeof(cnts)); ^~~~~~ Suppressed 35 warnings (35 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. 49 warnings generated. >> fs/jffs2/readinode.c:652:3: 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(&fd->name[0], &rd->name[0], ^~~~~~ fs/jffs2/readinode.c:652:3: 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(&fd->name[0], &rd->name[0], ^~~~~~ >> fs/jffs2/readinode.c:1157: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(&rii, 0, sizeof(rii)); ^~~~~~ fs/jffs2/readinode.c:1157: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(&rii, 0, sizeof(rii)); ^~~~~~ fs/jffs2/readinode.c:1378: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(f->inocache, 0, sizeof(struct jffs2_inode_cache)); ^~~~~~ fs/jffs2/readinode.c:1378: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(f->inocache, 0, sizeof(struct jffs2_inode_cache)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 49 warnings generated. Suppressed 49 warnings (49 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. 49 warnings generated. drivers/misc/apds9802als.c:42:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "4095\n"); ^~~~~~~ drivers/misc/apds9802als.c:42:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "4095\n"); ^~~~~~~ drivers/misc/apds9802als.c:44:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "65535\n"); ^~~~~~~ drivers/misc/apds9802als.c:44:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "65535\n"); ^~~~~~~ drivers/misc/apds9802als.c:101:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp); ^~~~~~~ drivers/misc/apds9802als.c:101:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp); ^~~~~~~ Suppressed 46 warnings (46 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. 51 warnings generated. >> drivers/misc/isl29003.c:189:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%i\n", isl29003_get_range(client)); ^~~~~~~ drivers/misc/isl29003.c:189:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%i\n", isl29003_get_range(client)); ^~~~~~~ drivers/misc/isl29003.c:225:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", isl29003_get_resolution(client)); ^~~~~~~ drivers/misc/isl29003.c:225:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", isl29003_get_resolution(client)); ^~~~~~~ drivers/misc/isl29003.c:259:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", isl29003_get_mode(client)); ^~~~~~~ drivers/misc/isl29003.c:259:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", isl29003_get_mode(client)); ^~~~~~~ drivers/misc/isl29003.c:294:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", isl29003_get_power_state(client)); ^~~~~~~ drivers/misc/isl29003.c:294:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", isl29003_get_power_state(client)); ^~~~~~~ drivers/misc/isl29003.c:330:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", isl29003_get_adc_value(client)); ^~~~~~~ drivers/misc/isl29003.c:330:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", isl29003_get_adc_value(client)); ^~~~~~~ Suppressed 46 warnings (46 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. 85 warnings generated. drivers/scsi/scsi_transport_sas.c:131:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sas_bitfield_name_search(device_type, sas_device_type_names) ^ drivers/scsi/scsi_transport_sas.c:113:11: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "%s", \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:131:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sas_bitfield_name_search(device_type, sas_device_type_names) ^ drivers/scsi/scsi_transport_sas.c:113:11: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "%s", \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:131:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sas_bitfield_name_search(device_type, sas_device_type_names) ^ drivers/scsi/scsi_transport_sas.c:118:9: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "\n"); \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:131:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sas_bitfield_name_search(device_type, sas_device_type_names) ^ drivers/scsi/scsi_transport_sas.c:118:9: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "\n"); \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:143:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sas_bitfield_name_match(protocol, sas_protocol_names) ^ drivers/scsi/scsi_transport_sas.c:77:11: note: expanded from macro 'sas_bitfield_name_match' len += sprintf(buf + len, "%s%s", \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:143:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sas_bitfield_name_match(protocol, sas_protocol_names) ^ drivers/scsi/scsi_transport_sas.c:77:11: note: expanded from macro 'sas_bitfield_name_match' len += sprintf(buf + len, "%s%s", \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:143:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sas_bitfield_name_match(protocol, sas_protocol_names) ^ drivers/scsi/scsi_transport_sas.c:82:9: note: expanded from macro 'sas_bitfield_name_match' len += sprintf(buf + len, "\n"); \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:143:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sas_bitfield_name_match(protocol, sas_protocol_names) ^ drivers/scsi/scsi_transport_sas.c:82:9: note: expanded from macro 'sas_bitfield_name_match' len += sprintf(buf + len, "\n"); \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:159:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sas_bitfield_name_search(linkspeed, sas_linkspeed_names) ^ drivers/scsi/scsi_transport_sas.c:113:11: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "%s", \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:159:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sas_bitfield_name_search(linkspeed, sas_linkspeed_names) ^ drivers/scsi/scsi_transport_sas.c:113:11: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "%s", \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:159:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sas_bitfield_name_search(linkspeed, sas_linkspeed_names) ^ drivers/scsi/scsi_transport_sas.c:118:9: note: expanded from macro 'sas_bitfield_name_search' len += sprintf(buf + len, "\n"); \ ^~~~~~~ drivers/scsi/scsi_transport_sas.c:159:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sas_bitfield_name_search(linkspeed, sas_linkspeed_names) -- ^ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ~~~~~~~~~~~~~~^~~~~~~~ Suppressed 62 warnings (62 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. 31 warnings generated. drivers/pinctrl/devicetree.c:380: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(out_args, 0, sizeof(*out_args)); ^~~~~~ drivers/pinctrl/devicetree.c:380: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(out_args, 0, sizeof(*out_args)); ^~~~~~ Suppressed 30 warnings (30 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. drivers/pinctrl/pinctrl-ocelot.c:1282:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = 0; ^ ~ drivers/pinctrl/pinctrl-ocelot.c:1282:3: note: Value stored to 'ret' is never read ret = 0; ^ ~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 37 warnings generated. drivers/of/property.c:582: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(endpoint, 0, sizeof(*endpoint)); ^~~~~~ drivers/of/property.c:582: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(endpoint, 0, sizeof(*endpoint)); ^~~~~~ drivers/of/property.c:920:19: warning: Access to field 'full_name' results in a dereference of a null pointer [clang-analyzer-core.NullDereference] return kbasename(to_of_node(fwnode)->full_name); ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ drivers/of/property.c:920:19: note: '?' condition is false return kbasename(to_of_node(fwnode)->full_name); ^ include/linux/of.h:164:3: note: expanded from macro 'to_of_node' is_of_node(__to_of_node_fwnode) ? \ ^ drivers/of/property.c:920:19: note: Access to field 'full_name' results in a dereference of a null pointer return kbasename(to_of_node(fwnode)->full_name); ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ drivers/of/property.c:926:7: warning: Access to field 'parent' results in a dereference of a null pointer [clang-analyzer-core.NullDereference] if (!to_of_node(fwnode)->parent) ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ drivers/of/property.c:926:7: note: '?' condition is false if (!to_of_node(fwnode)->parent) ^ include/linux/of.h:164:3: note: expanded from macro 'to_of_node' is_of_node(__to_of_node_fwnode) ? \ ^ drivers/of/property.c:926:7: note: Access to field 'parent' results in a dereference of a null pointer if (!to_of_node(fwnode)->parent) ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ Suppressed 34 warnings (34 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. 18 warnings generated. Suppressed 18 warnings (18 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. 48 warnings generated. >> fs/ufs/util.c:158:3: 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 (mem, ubh->bh[bhno]->b_data, len); ^~~~~~ fs/ufs/util.c:158:3: 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 (mem, ubh->bh[bhno]->b_data, len); ^~~~~~ fs/ufs/util.c:174:3: 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 (ubh->bh[bhno]->b_data, mem, len); ^~~~~~ fs/ufs/util.c:174:3: 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 (ubh->bh[bhno]->b_data, mem, len); ^~~~~~ Suppressed 46 warnings (46 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. 33 warnings generated. >> fs/jffs2/compr.c:268:3: 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_out, cdata_in, datalen); ^~~~~~ fs/jffs2/compr.c:268:3: 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_out, cdata_in, datalen); ^~~~~~ >> fs/jffs2/compr.c:272: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(data_out, 0, datalen); ^~~~~~ fs/jffs2/compr.c:272: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(data_out, 0, datalen); ^~~~~~ Suppressed 31 warnings (31 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. 31 warnings generated. Suppressed 31 warnings (31 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. >> lib/test_user_copy.c:81: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:81: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:123: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(umem_src, 0x3e, size); ^~~~~~ lib/test_user_copy.c:123: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(umem_src, 0x3e, size); ^~~~~~ >> lib/test_user_copy.c:131: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(expected, umem_src, ksize); ^~~~~~ lib/test_user_copy.c:131: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(expected, umem_src, ksize); ^~~~~~ lib/test_user_copy.c:133: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:133: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:143: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(expected, umem_src, usize); ^~~~~~ lib/test_user_copy.c:143: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(expected, umem_src, usize); ^~~~~~ lib/test_user_copy.c:144: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(expected + usize, 0x0, ksize - usize); ^~~~~~ lib/test_user_copy.c:144: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(expected + usize, 0x0, ksize - usize); ^~~~~~ lib/test_user_copy.c:146: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:146: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:156: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:156: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:164: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(expected, umem_src, ksize); ^~~~~~ lib/test_user_copy.c:164: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(expected, umem_src, ksize); ^~~~~~ lib/test_user_copy.c:168: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:168: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(kmem, 0x0, size); ^~~~~~ lib/test_user_copy.c:213: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(kmem, 0x3a, PAGE_SIZE * 2); ^~~~~~ lib/test_user_copy.c:213: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(kmem, 0x3a, PAGE_SIZE * 2); ^~~~~~ lib/test_user_copy.c:216: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(kmem, 0x0, PAGE_SIZE); ^~~~~~ lib/test_user_copy.c:216: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(kmem, 0x0, PAGE_SIZE); ^~~~~~ lib/test_user_copy.c:257: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(kmem, 0x5a, PAGE_SIZE); ^~~~~~ lib/test_user_copy.c:257: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(kmem, 0x5a, PAGE_SIZE); ^~~~~~ lib/test_user_copy.c:258: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(kmem + PAGE_SIZE, 0, PAGE_SIZE); ^~~~~~ lib/test_user_copy.c:258: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(kmem + PAGE_SIZE, 0, PAGE_SIZE); ^~~~~~ Suppressed 31 warnings (31 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 41 warnings generated. drivers/crypto/inside-secure/safexcel.c:139:36: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] val = EIP197_CS_RC_NEXT(i + 1) | EIP197_CS_RC_PREV(i - 1); ^ drivers/crypto/inside-secure/safexcel.h:492:37: note: expanded from macro 'EIP197_CS_RC_PREV' #define EIP197_CS_RC_PREV(x) ((x) << 10) ^ drivers/crypto/inside-secure/safexcel.c:1408:6: note: Assuming field 'context_pool' is non-null if (!priv->context_pool) ^~~~~~~~~~~~~~~~~~~ drivers/crypto/inside-secure/safexcel.c:1408:2: note: Taking false branch if (!priv->context_pool) ^ drivers/crypto/inside-secure/safexcel.c:1416:12: note: Loop condition is false. Exiting loop version = readl(priv->base + EIP97_HIA_AIC_BASE + EIP197_HIA_VERSION); ^ arch/riscv/include/asm/mmio.h:140:30: note: expanded from macro 'readl' #define readl(c) ({ u32 __v; __io_br(); __v = readl_cpu(c); __io_ar(__v); __v; }) ^ arch/riscv/include/asm/mmio.h:133:19: note: expanded from macro '__io_br' #define __io_br() do {} while (0) -- ^~~~~~ Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 22 warnings generated. Suppressed 22 warnings (22 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. 35 warnings generated. Suppressed 35 warnings (35 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. 22 warnings generated. Suppressed 22 warnings (22 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 38 warnings generated. drivers/gpio/gpiolib.c:3736:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(prop_name, sizeof(prop_name), "%s-%s", ^~~~~~~~ drivers/gpio/gpiolib.c:3736:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(prop_name, sizeof(prop_name), "%s-%s", ^~~~~~~~ drivers/gpio/gpiolib.c:3739:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(prop_name, sizeof(prop_name), "%s", ^~~~~~~~ drivers/gpio/gpiolib.c:3739:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(prop_name, sizeof(prop_name), "%s", ^~~~~~~~ drivers/gpio/gpiolib.c:3994:20: warning: Value stored to 'desc' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct gpio_desc *desc = ERR_PTR(-ENODEV); ^~~~ ~~~~~~~~~~~~~~~~ drivers/gpio/gpiolib.c:3994:20: note: Value stored to 'desc' during its initialization is never read struct gpio_desc *desc = ERR_PTR(-ENODEV); ^~~~ ~~~~~~~~~~~~~~~~ drivers/gpio/gpiolib.c:4171:4: 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(array, descs, ^~~~~~ drivers/gpio/gpiolib.c:4171:4: 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(array, descs, ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 48 warnings generated. Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. 48 warnings generated. Suppressed 48 warnings (48 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 38 warnings generated. >> crypto/async_tx/raid6test.c:131: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(page_address(recovi), 0xf0, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:131: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(page_address(recovi), 0xf0, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:132: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(page_address(recovj), 0xba, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:132: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(page_address(recovj), 0xba, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:167: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(page_address(data[disks-2]), 0xee, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:167: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(page_address(data[disks-2]), 0xee, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:168: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(page_address(data[disks-1]), 0xee, PAGE_SIZE); ^~~~~~ crypto/async_tx/raid6test.c:168: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(page_address(data[disks-1]), 0xee, PAGE_SIZE); ^~~~~~ Suppressed 34 warnings (34 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. 50 warnings generated. fs/libfs.c:837: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(to, from + pos, count); ^~~~~~ fs/libfs.c:837: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(to, from + pos, count); ^~~~~~ Suppressed 49 warnings (49 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. 19 warnings generated. Suppressed 19 warnings (19 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. 52 warnings generated. drivers/auxdisplay/ht16k33.c:146: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(buf, &priv->seg.map, priv->seg.map_size); ^~~~~~ drivers/auxdisplay/ht16k33.c:146: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(buf, &priv->seg.map, priv->seg.map_size); ^~~~~~ drivers/auxdisplay/ht16k33.c:158: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(&priv->seg.map, buf, cnt); ^~~~~~ drivers/auxdisplay/ht16k33.c:158: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(&priv->seg.map, buf, cnt); ^~~~~~ drivers/auxdisplay/ht16k33.c:285:3: 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(p1, p2, len); ^~~~~~ drivers/auxdisplay/ht16k33.c:285:3: 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(p1, p2, len); ^~~~~~ drivers/auxdisplay/ht16k33.c:297: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)); ^~~~~~ drivers/auxdisplay/ht16k33.c:297: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)); ^~~~~~ drivers/auxdisplay/ht16k33.c:404: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(keypad->last_key_state, new_state, sizeof(u16) * keypad->cols); ^~~~~~ drivers/auxdisplay/ht16k33.c:404: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(keypad->last_key_state, new_state, sizeof(u16) * keypad->cols); ^~~~~~ drivers/auxdisplay/ht16k33.c:599: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(&bl_props, 0, sizeof(struct backlight_properties)); ^~~~~~ drivers/auxdisplay/ht16k33.c:599: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(&bl_props, 0, sizeof(struct backlight_properties)); ^~~~~~ Suppressed 46 warnings (46 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. 49 warnings generated. fs/xfs/libxfs/xfs_dir2.c:327: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(args->value, name, len); ^~~~~~ fs/xfs/libxfs/xfs_dir2.c:327: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(args->value, name, len); ^~~~~~ Suppressed 48 warnings (48 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. 57 warnings generated. fs/xfs/libxfs/xfs_dir2_block.c:175: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(hdr3, 0, sizeof(*hdr3)); ^~~~~~ fs/xfs/libxfs/xfs_dir2_block.c:175: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(hdr3, 0, sizeof(*hdr3)); ^~~~~~ fs/xfs/libxfs/xfs_dir2_block.c:501:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(blp, &blp[1], mid * sizeof(*blp)); ^~~~~~~ fs/xfs/libxfs/xfs_dir2_block.c:501:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(blp, &blp[1], mid * sizeof(*blp)); ^~~~~~~ fs/xfs/libxfs/xfs_dir2_block.c:529:5: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&blp[lowstale], &blp[lowstale + 1], -- ^ fs/io_uring.c:10467:6: note: Assuming 'entries' is <= IORING_MAX_ENTRIES if (entries > IORING_MAX_ENTRIES) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/io_uring.c:10467:2: note: Taking false branch if (entries > IORING_MAX_ENTRIES) { ^ fs/io_uring.c:10481:18: note: '?' condition is false p->sq_entries = roundup_pow_of_two(entries); ^ include/linux/log2.h:176:2: note: expanded from macro 'roundup_pow_of_two' __builtin_constant_p(n) ? ( \ ^ fs/io_uring.c:10481:18: note: Calling '__roundup_pow_of_two' p->sq_entries = roundup_pow_of_two(entries); ^ include/linux/log2.h:180:2: note: expanded from macro 'roundup_pow_of_two' __roundup_pow_of_two(n) \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Calling 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/bitops.h:154:2: note: Taking true branch if (sizeof(l) == 4) ^ include/linux/bitops.h:155:10: note: Calling 'fls' return fls(l); ^~~~~~ include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32 int r = 32; ^~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking false branch if (!x) ^ include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false if (!(x & 0xffff0000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:19:2: note: Taking false branch if (!(x & 0xffff0000u)) { ^ include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false if (!(x & 0xff000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:23:2: note: Taking false branch if (!(x & 0xff000000u)) { ^ include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false if (!(x & 0xf0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:27:2: note: Taking false branch if (!(x & 0xf0000000u)) { ^ include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false if (!(x & 0xc0000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:31:2: note: Taking false branch if (!(x & 0xc0000000u)) { ^ include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false if (!(x & 0x80000000u)) { ^~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:35:2: note: Taking false branch if (!(x & 0x80000000u)) { ^ include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r') return r; ^~~~~~~~ include/linux/bitops.h:155:10: note: Returning from 'fls' return fls(l); ^~~~~~ include/linux/bitops.h:155:3: note: Returning the value 32 return fls(l); ^~~~~~~~~~~~~ include/linux/log2.h:57:16: note: Returning from 'fls_long' return 1UL << fls_long(n - 1); ^~~~~~~~~~~~~~~ include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' return 1UL << fls_long(n - 1); ^ ~~~~~~~~~~~~~~~ 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. 35 warnings generated. lib/mpi/mpiutil.c:154:3: 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(p, a->d, a->alloced * sizeof(mpi_limb_t)); ^~~~~~ lib/mpi/mpiutil.c:154:3: 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(p, a->d, a->alloced * sizeof(mpi_limb_t)); ^~~~~~ Suppressed 34 warnings (34 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. 31 warnings generated. Suppressed 31 warnings (31 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. 31 warnings generated. Suppressed 31 warnings (31 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. 48 warnings generated. >> drivers/staging/fbtft/fbtft-sysfs.c:132: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(par->gamma.curves, tmp_curves, ^~~~~~ drivers/staging/fbtft/fbtft-sysfs.c:132: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(par->gamma.curves, tmp_curves, ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 48 warnings generated. Suppressed 48 warnings (48 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. 17 warnings generated. lib/crypto/curve25519-fiat32.c:205:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(h, f, sizeof(u32) * 10); ^~~~~~~ lib/crypto/curve25519-fiat32.c:205:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(h, f, sizeof(u32) * 10); ^~~~~~~ lib/crypto/curve25519-fiat32.c:210:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(h, f, sizeof(u32) * 10); ^~~~~~~ lib/crypto/curve25519-fiat32.c:210:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(h, f, sizeof(u32) * 10); ^~~~~~~ lib/crypto/curve25519-fiat32.c:216: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(h, 0, sizeof(u32) * 10); ^~~~~~ lib/crypto/curve25519-fiat32.c:216: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(h, 0, sizeof(u32) * 10); ^~~~~~ lib/crypto/curve25519-fiat32.c:222: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(h, 0, sizeof(u32) * 10); ^~~~~~ lib/crypto/curve25519-fiat32.c:222: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(h, 0, sizeof(u32) * 10); ^~~~~~ lib/crypto/curve25519-fiat32.c:766: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(e, scalar, 32); ^~~~~~ lib/crypto/curve25519-fiat32.c:766: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(e, scalar, 32); ^~~~~~ Suppressed 12 warnings (12 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. Suppressed 46 warnings (46 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. 48 warnings generated. >> drivers/video/backlight/pcf50633-backlight.c:106: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(&bl_props, 0, sizeof(bl_props)); ^~~~~~ drivers/video/backlight/pcf50633-backlight.c:106: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(&bl_props, 0, sizeof(bl_props)); ^~~~~~ drivers/video/backlight/pcf50633-backlight.c:130:55: warning: Access to field 'ramp_time' results in a dereference of a null pointer (loaded from variable 'pdata') [clang-analyzer-core.NullDereference] pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time); ^~~~~ drivers/video/backlight/pcf50633-backlight.c:99:2: note: 'pdata' initialized here struct pcf50633_bl_platform_data *pdata = pcf50633_data->backlight_data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pcf50633-backlight.c:103:6: note: Assuming 'pcf_bl' is non-null if (!pcf_bl) ^~~~~~~ drivers/video/backlight/pcf50633-backlight.c:103:2: note: Taking false branch if (!pcf_bl) ^ drivers/video/backlight/pcf50633-backlight.c:111:6: note: Assuming 'pdata' is null if (pdata) { ^~~~~ drivers/video/backlight/pcf50633-backlight.c:111:2: note: Taking false branch if (pdata) { ^ drivers/video/backlight/pcf50633-backlight.c:125:6: note: Calling 'IS_ERR' if (IS_ERR(pcf_bl->bl)) ^~~~~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/pcf50633-backlight.c:125:6: note: Returning from 'IS_ERR' if (IS_ERR(pcf_bl->bl)) ^~~~~~~~~~~~~~~~~~ drivers/video/backlight/pcf50633-backlight.c:125:2: note: Taking false branch if (IS_ERR(pcf_bl->bl)) ^ drivers/video/backlight/pcf50633-backlight.c:130:55: note: Access to field 'ramp_time' results in a dereference of a null pointer (loaded from variable 'pdata') pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time); ^~~~~ Suppressed 46 warnings (46 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. 52 warnings generated. >> fs/orangefs/acl.c:129: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/acl.c:129: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/acl.c:190: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/acl.c:190: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(&iattr, 0, sizeof iattr); ^~~~~~ Suppressed 50 warnings (50 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. 51 warnings generated. fs/orangefs/file.c:276:3: warning: Value stored to 'buffer_index' is never read [clang-analyzer-deadcode.DeadStores] buffer_index = -1; ^ ~~ fs/orangefs/file.c:276:3: note: Value stored to 'buffer_index' is never read buffer_index = -1; ^ ~~ Suppressed 50 warnings (50 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 23 warnings generated. Suppressed 23 warnings (23 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. Suppressed 46 warnings (46 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. 13 warnings generated. kernel/kheaders.c:37: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(buf, &kernel_headers_data + off, len); ^~~~~~ kernel/kheaders.c:37: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(buf, &kernel_headers_data + off, len); ^~~~~~ Suppressed 12 warnings (12 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. 49 warnings generated. Suppressed 49 warnings (49 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. 51 warnings generated. drivers/block/null_blk/zoned.c:87:3: warning: The result of the right shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] >> ilog2(dev->zone_size_sects); ^ drivers/block/null_blk/zoned.c:65:7: note: Calling 'is_power_of_2' if (!is_power_of_2(dev->zone_size)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:47:10: note: Assuming 'n' is not equal to 0 return (n != 0 && ((n & (n - 1)) == 0)); ^~~~~~ include/linux/log2.h:47:10: note: Left side of '&&' is true include/linux/log2.h:47:21: note: Assuming the condition is true return (n != 0 && ((n & (n - 1)) == 0)); ^~~~~~~~~~~~~~~~~~ include/linux/log2.h:47:2: note: Returning the value 1, which participates in a condition later return (n != 0 && ((n & (n - 1)) == 0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:65:7: note: Returning from 'is_power_of_2' if (!is_power_of_2(dev->zone_size)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:65:2: note: Taking false branch if (!is_power_of_2(dev->zone_size)) { ^ drivers/block/null_blk/zoned.c:69:6: note: Assuming field 'zone_size' is <= field 'size' if (dev->zone_size > dev->size) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:69:2: note: Taking false branch if (dev->zone_size > dev->size) { ^ drivers/block/null_blk/zoned.c:74:6: note: Assuming field 'zone_capacity' is not equal to 0 if (!dev->zone_capacity) ^~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:74:2: note: Taking false branch if (!dev->zone_capacity) ^ drivers/block/null_blk/zoned.c:77:6: note: Assuming field 'zone_capacity' is <= field 'zone_size' if (dev->zone_capacity > dev->zone_size) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:77:2: note: Taking false branch if (dev->zone_capacity > dev->zone_size) { ^ drivers/block/null_blk/zoned.c:87:6: note: '?' condition is false >> ilog2(dev->zone_size_sects); ^ include/linux/log2.h:158:2: note: expanded from macro 'ilog2' __builtin_constant_p(n) ? \ ^ drivers/block/null_blk/zoned.c:87:6: note: '?' condition is false >> ilog2(dev->zone_size_sects); ^ include/linux/log2.h:161:2: note: expanded from macro 'ilog2' (sizeof(n) <= 4) ? \ ^ drivers/block/null_blk/zoned.c:87:6: note: Calling '__ilog2_u64' >> ilog2(dev->zone_size_sects); ^ include/linux/log2.h:163:2: note: expanded from macro 'ilog2' __ilog2_u64(n) \ ^~~~~~~~~~~~~~ include/linux/log2.h:32:2: note: Returning the value -1 return fls64(n) - 1; ^~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:87:6: note: Returning from '__ilog2_u64' >> ilog2(dev->zone_size_sects); ^ include/linux/log2.h:163:2: note: expanded from macro 'ilog2' __ilog2_u64(n) \ ^~~~~~~~~~~~~~ drivers/block/null_blk/zoned.c:87:3: note: The result of the right shift is undefined because the right operand is negative >> ilog2(dev->zone_size_sects); ^ >> drivers/block/null_blk/zoned.c:203: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(&blkz, 0, sizeof(struct blk_zone)); ^~~~~~ drivers/block/null_blk/zoned.c:203: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(&blkz, 0, sizeof(struct blk_zone)); ^~~~~~ Suppressed 49 warnings (49 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. 47 warnings generated. >> fs/jffs2/file.c:161: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(&ri, 0, sizeof(ri)); ^~~~~~ fs/jffs2/file.c:161: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(&ri, 0, sizeof(ri)); ^~~~~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 57 warnings generated. drivers/md/dm-thin-metadata.c:369: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(&v1_le, value1_le, sizeof(v1_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:369: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(&v1_le, value1_le, sizeof(v1_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:370: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(&v2_le, value2_le, sizeof(v2_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:370: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(&v2_le, value2_le, sizeof(v2_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:401: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(&v1_le, value1_le, sizeof(v1_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:401: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(&v1_le, value1_le, sizeof(v1_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:402: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(&v2_le, value2_le, sizeof(v2_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:402: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(&v2_le, value2_le, sizeof(v2_le)); ^~~~~~ drivers/md/dm-thin-metadata.c:487: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(&pmd->nb_info, &pmd->info, sizeof(pmd->nb_info)); ^~~~~~ drivers/md/dm-thin-metadata.c:487: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(&pmd->nb_info, &pmd->info, sizeof(pmd->nb_info)); ^~~~~~ drivers/md/dm-thin-metadata.c:538: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(&disk->metadata_space_map_root, ^~~~~~ drivers/md/dm-thin-metadata.c:538: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(&disk->metadata_space_map_root, ^~~~~~ drivers/md/dm-thin-metadata.c:542: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(&disk->data_space_map_root, ^~~~~~ drivers/md/dm-thin-metadata.c:542: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(&disk->data_space_map_root, ^~~~~~ drivers/md/dm-thin-metadata.c:575: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(disk_super->uuid, 0, sizeof(disk_super->uuid)); ^~~~~~ drivers/md/dm-thin-metadata.c:575: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(disk_super->uuid, 0, sizeof(disk_super->uuid)); ^~~~~~ drivers/md/dm-thin-metadata.c:1342: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(&disk_super->data_space_map_root, 0, ^~~~~~ drivers/md/dm-thin-metadata.c:1342: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(&disk_super->data_space_map_root, 0, ^~~~~~ drivers/md/dm-thin-metadata.c:1344: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(&disk_super->metadata_space_map_root, 0, ^~~~~~ drivers/md/dm-thin-metadata.c:1344: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(&disk_super->metadata_space_map_root, 0, ^~~~~~ Suppressed 47 warnings (47 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. 48 warnings generated. drivers/regulator/rtq2134-regulator.c:90:6: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] val <<= ffs(desc->mode_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/rtq2134-regulator.c:83:6: note: Assuming 'mode' is equal to REGULATOR_MODE_NORMAL if (mode == REGULATOR_MODE_NORMAL) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/rtq2134-regulator.c:83:2: note: Taking true branch if (mode == REGULATOR_MODE_NORMAL) ^ drivers/regulator/rtq2134-regulator.c:90:6: note: Assigned value is garbage or undefined val <<= ffs(desc->mode_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/rtq2134-regulator.c:160:6: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] val <<= ffs(desc->suspend_mode_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/rtq2134-regulator.c:153:6: note: Assuming 'mode' is equal to REGULATOR_MODE_NORMAL if (mode == REGULATOR_MODE_NORMAL) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/rtq2134-regulator.c:153:2: note: Taking true branch if (mode == REGULATOR_MODE_NORMAL) ^ drivers/regulator/rtq2134-regulator.c:160:6: note: Assigned value is garbage or undefined val <<= ffs(desc->suspend_mode_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. -- ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2059: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(&state->altpath, &state->path, sizeof(state->path)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2183: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(xfs_attr3_leaf_name(leaf, args->index), 0, entsize); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2183: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(xfs_attr3_leaf_name(leaf, args->index), 0, entsize); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2190:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(entry, entry + 1, tmp); ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2190:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(entry, entry + 1, tmp); ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2196: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(entry, 0, sizeof(xfs_attr_leaf_entry_t)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2196: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(entry, 0, sizeof(xfs_attr_leaf_entry_t)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2243:29: warning: Value stored to 'drop_leaf' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct xfs_attr_leafblock *drop_leaf = drop_blk->bp->b_addr; ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2243:29: note: Value stored to 'drop_leaf' during its initialization is never read struct xfs_attr_leafblock *drop_leaf = drop_blk->bp->b_addr; ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2244:29: warning: Value stored to 'save_leaf' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct xfs_attr_leafblock *save_leaf = save_blk->bp->b_addr; ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2244:29: note: Value stored to 'save_leaf' during its initialization is never read struct xfs_attr_leafblock *save_leaf = save_blk->bp->b_addr; ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2299:3: 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(tmp_leaf, save_leaf, xfs_attr3_leaf_hdr_size(save_leaf)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2299:3: 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(tmp_leaf, save_leaf, xfs_attr3_leaf_hdr_size(save_leaf)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2301: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(&tmphdr, 0, sizeof(tmphdr)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2301: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(&tmphdr, 0, sizeof(tmphdr)); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2330:3: 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(save_leaf, tmp_leaf, state->args->geo->blksize); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2330:3: 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(save_leaf, tmp_leaf, state->args->geo->blksize); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2564:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(entry_d, entry_s, tmp); ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2564:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(entry_d, entry_s, tmp); ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2600:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(xfs_attr3_leaf_name(leaf_d, desti), ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2600:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(xfs_attr3_leaf_name(leaf_d, desti), ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2604:4: 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(xfs_attr3_leaf_name(leaf_s, start_s + i), 0, tmp); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2604:4: 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(xfs_attr3_leaf_name(leaf_s, start_s + i), 0, tmp); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2625: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(entry_s, 0, tmp); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2625: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(entry_s, 0, tmp); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2634:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(entry_d, entry_s, tmp); ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2634:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(entry_d, entry_s, tmp); ^~~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2640: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(entry_s, 0, tmp); ^~~~~~ fs/xfs/libxfs/xfs_attr_leaf.c:2640: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(entry_s, 0, tmp); ^~~~~~ Suppressed 49 warnings (49 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. 49 warnings generated. fs/hpfs/super.c:589:8: warning: Although the value stored to 'bootblock' is used in the enclosing expression, the value is never actually read from 'bootblock' [clang-analyzer-deadcode.DeadStores] if (!(bootblock = hpfs_map_sector(s, 0, &bh0, 0))) goto bail1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/hpfs/super.c:589:8: note: Although the value stored to 'bootblock' is used in the enclosing expression, the value is never actually read from 'bootblock' if (!(bootblock = hpfs_map_sector(s, 0, &bh0, 0))) goto bail1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 48 warnings (48 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. 47 warnings generated. >> fs/ufs/balloc.c:334: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(bh->b_data, 0, inode->i_sb->s_blocksize); ^~~~~~ fs/ufs/balloc.c:334: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(bh->b_data, 0, inode->i_sb->s_blocksize); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 70 warnings generated. drivers/power/supply/bq2415x_charger.c:1062:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ret); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1062:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ret); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1101:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", bq->timer_error); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1101:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", bq->timer_error); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1104:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "auto\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1104:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "auto\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1105:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "off\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1105:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "off\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1178:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "auto ("); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1178:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "auto ("); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1182:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "off"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1182:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "off"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1185:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "none"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1185:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "none"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1188:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "host"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1188:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "host"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1191:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "dedicated"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1191:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "dedicated"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1194:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "boost"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1194:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "boost"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1199:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, ")"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1199:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, ")"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1201:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret += sprintf(buf+ret, "\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1201:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret += sprintf(buf+ret, "\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1218:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "off\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1218:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "off\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1220:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "none\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1220:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "none\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1222:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "host\n"); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1222:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "host\n"); -- ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1501:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(revstr, "1.%d", ret); ^~~~~~~ drivers/power/supply/bq2415x_charger.c:1622:3: 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(&bq->init_data, pdata, sizeof(bq->init_data)); ^~~~~~ drivers/power/supply/bq2415x_charger.c:1622:3: 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(&bq->init_data, pdata, sizeof(bq->init_data)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 50 warnings generated. drivers/regulator/tps6524x-regulator.c:151: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(t, 0, sizeof(t)); ^~~~~~ drivers/regulator/tps6524x-regulator.c:151: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(t, 0, sizeof(t)); ^~~~~~ drivers/regulator/tps6524x-regulator.c:204: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(t, 0, sizeof(t)); ^~~~~~ drivers/regulator/tps6524x-regulator.c:204: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(t, 0, sizeof(t)); ^~~~~~ drivers/regulator/tps6524x-regulator.c:601: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(hw, 0, sizeof(struct tps6524x)); ^~~~~~ drivers/regulator/tps6524x-regulator.c:601: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(hw, 0, sizeof(struct tps6524x)); ^~~~~~ Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 49 warnings generated. fs/xfs/libxfs/xfs_refcount_btree.c:66: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(&args, 0, sizeof(args)); ^~~~~~ fs/xfs/libxfs/xfs_refcount_btree.c:66: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(&args, 0, sizeof(args)); ^~~~~~ Suppressed 48 warnings (48 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. 55 warnings generated. fs/xfs/libxfs/xfs_sb.c:506: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(&to->sb_uuid, &from->sb_uuid, sizeof(to->sb_uuid)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:506: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(&to->sb_uuid, &from->sb_uuid, sizeof(to->sb_uuid)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:520: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(&to->sb_fname, &from->sb_fname, sizeof(to->sb_fname)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:520: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(&to->sb_fname, &from->sb_fname, sizeof(to->sb_fname)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:655: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(&to->sb_uuid, &from->sb_uuid, sizeof(to->sb_uuid)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:655: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(&to->sb_uuid, &from->sb_uuid, sizeof(to->sb_uuid)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:669: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(&to->sb_fname, &from->sb_fname, sizeof(to->sb_fname)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:669: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(&to->sb_fname, &from->sb_fname, sizeof(to->sb_fname)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:1070: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(geo, 0, sizeof(struct xfs_fsop_geom)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:1070: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(geo, 0, sizeof(struct xfs_fsop_geom)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:1085: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(geo->uuid, &sbp->sb_uuid, sizeof(sbp->sb_uuid)); ^~~~~~ fs/xfs/libxfs/xfs_sb.c:1085: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(geo->uuid, &sbp->sb_uuid, sizeof(sbp->sb_uuid)); ^~~~~~ Suppressed 49 warnings (49 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. 50 warnings generated. >> fs/jffs2/write.c:33: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(ic, 0, sizeof(*ic)); ^~~~~~ fs/jffs2/write.c:33: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(ic, 0, sizeof(*ic)); ^~~~~~ fs/jffs2/write.c:154:5: warning: Value stored to 'flash_ofs' is never read [clang-analyzer-deadcode.DeadStores] flash_ofs = write_ofs(c); ^ fs/jffs2/write.c:154:5: note: Value stored to 'flash_ofs' is never read >> fs/jffs2/write.c:250: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(fd->name, name, namelen); ^~~~~~ fs/jffs2/write.c:250: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(fd->name, name, namelen); ^~~~~~ fs/jffs2/write.c:306:5: warning: Value stored to 'flash_ofs' is never read [clang-analyzer-deadcode.DeadStores] flash_ofs = write_ofs(c); ^ fs/jffs2/write.c:306:5: note: Value stored to 'flash_ofs' is never read Suppressed 46 warnings (46 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. 51 warnings generated. fs/jffs2/scan.c:457:2: warning: Value stored to 'ofs' is never read [clang-analyzer-deadcode.DeadStores] ofs = jeb->offset; ^ ~~~~~~~~~~~ fs/jffs2/scan.c:457:2: note: Value stored to 'ofs' is never read ofs = jeb->offset; ^ ~~~~~~~~~~~ >> fs/jffs2/scan.c:524:6: 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(sumptr + sumlen - buf_len, buf + buf_size - buf_len, buf_len); ^~~~~~ fs/jffs2/scan.c:524:6: 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(sumptr + sumlen - buf_len, buf + buf_size - buf_len, buf_len); ^~~~~~ fs/jffs2/scan.c:572:25: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] while(ofs < max_ofs && *(uint32_t *)(&buf[ofs]) == 0xFFFFFFFF) ^~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/scan.c:460:2: note: 0 is < 1 jffs2_dbg(1, "%s(): Scanning block@0x%x\n", __func__, ofs); ^ fs/jffs2/debug.h:69:6: note: expanded from macro 'jffs2_dbg' if (CONFIG_JFFS2_FS_DEBUG >= level) \ ^~~~~~~~~~~~~~~~~~~~~ ./include/generated/autoconf.h:495:31: note: expanded from macro 'CONFIG_JFFS2_FS_DEBUG' #define CONFIG_JFFS2_FS_DEBUG 0 ^ fs/jffs2/scan.c:460:2: note: Taking false branch jffs2_dbg(1, "%s(): Scanning block at 0x%x\n", __func__, ofs); ^ fs/jffs2/debug.h:69:2: note: expanded from macro 'jffs2_dbg' if (CONFIG_JFFS2_FS_DEBUG >= level) \ ^ fs/jffs2/scan.c:460:2: note: Loop condition is false. Exiting loop jffs2_dbg(1, "%s(): Scanning block at 0x%x\n", __func__, ofs); ^ fs/jffs2/debug.h:67:37: note: expanded from macro 'jffs2_dbg' #define jffs2_dbg(level, fmt, ...) \ ^ fs/jffs2/scan.c:463:28: note: Assuming field 'type' is not equal to 4 if (jffs2_cleanmarker_oob(c)) { ^ fs/jffs2/os-linux.h:111:35: note: expanded from macro 'jffs2_cleanmarker_oob' #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/scan.c:463:2: note: Taking false branch if (jffs2_cleanmarker_oob(c)) { ^ fs/jffs2/scan.c:483:2: note: Taking true branch if (jffs2_sum_active()) { ^ fs/jffs2/scan.c:488:7: note: Assuming 'buf_size' is 0 if (!buf_size) { ^~~~~~~~~ fs/jffs2/scan.c:488:3: note: Taking true branch if (!buf_size) { ^ fs/jffs2/scan.c:491:8: note: Assuming field 'v32' is equal to JFFS2_SUM_MAGIC if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { ^ fs/jffs2/nodelist.h:44:24: note: expanded from macro 'je32_to_cpu' #define je32_to_cpu(x) ((x).v32) ^ fs/jffs2/scan.c:491:4: note: Taking true branch if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { ^ fs/jffs2/scan.c:541:7: note: Assuming 'sumptr' is null if (sumptr) { ^~~~~~ fs/jffs2/scan.c:541:3: note: Taking false branch if (sumptr) { ^ fs/jffs2/scan.c:558:7: note: 'buf_size' is 0 if (!buf_size) { ^~~~~~~~ fs/jffs2/scan.c:558:2: note: Taking true branch if (!buf_size) { ^ fs/jffs2/scan.c:572:8: note: 'ofs' is < 'max_ofs' while(ofs < max_ofs && *(uint32_t *)(&buf[ofs]) == 0xFFFFFFFF) ^~~ fs/jffs2/scan.c:572:8: note: Left side of '&&' is true fs/jffs2/scan.c:572:25: note: Dereference of null pointer while(ofs < max_ofs && *(uint32_t *)(&buf[ofs]) == 0xFFFFFFFF) ^~~~~~~~~~~~~~~~~~~~~~~~ >> fs/jffs2/scan.c:979: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(ic, 0, sizeof(*ic)); ^~~~~~ fs/jffs2/scan.c:979: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(ic, 0, sizeof(*ic)); ^~~~~~ fs/jffs2/scan.c:1079: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(&fd->name, rd->name, checkedlen); ^~~~~~ fs/jffs2/scan.c:1079: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(&fd->name, rd->name, checkedlen); ^~~~~~ Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 34 warnings generated. Suppressed 34 warnings (34 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. 39 warnings generated. drivers/char/hw_random/cctrng.c:136:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &(drvdata->pdev->dev); ^~~ ~~~~~~~~~~~~~~~~~~~~~ drivers/char/hw_random/cctrng.c:136:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &(drvdata->pdev->dev); ^~~ ~~~~~~~~~~~~~~~~~~~~~ drivers/char/hw_random/cctrng.c:165:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &(drvdata->pdev->dev); ^~~ ~~~~~~~~~~~~~~~~~~~~~ drivers/char/hw_random/cctrng.c:165:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &(drvdata->pdev->dev); ^~~ ~~~~~~~~~~~~~~~~~~~~~ drivers/char/hw_random/cctrng.c:232: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, &(buf[drvdata->circ.tail]), size); ^~~~~~ drivers/char/hw_random/cctrng.c:232: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, &(buf[drvdata->circ.tail]), size); ^~~~~~ drivers/char/hw_random/cctrng.c:241:3: 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, &(buf[drvdata->circ.tail]), size); ^~~~~~ drivers/char/hw_random/cctrng.c:241:3: 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, &(buf[drvdata->circ.tail]), size); ^~~~~~ drivers/char/hw_random/cctrng.c:278:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &(drvdata->pdev->dev); ^~~ ~~~~~~~~~~~~~~~~~~~~~ drivers/char/hw_random/cctrng.c:278:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &(drvdata->pdev->dev); ^~~ ~~~~~~~~~~~~~~~~~~~~~ Suppressed 34 warnings (34 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. 60 warnings generated. drivers/md/persistent-data/dm-btree-remove.c:68:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(key_ptr(n, 0), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:68:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(key_ptr(n, 0), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:71:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(value_ptr(n, 0), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:71:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(value_ptr(n, 0), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:76:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(key_ptr(n, shift), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:76:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(key_ptr(n, shift), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:79:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(value_ptr(n, shift), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:79:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(value_ptr(n, shift), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:102:3: 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(key_ptr(left, nr_left), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:102:3: 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(key_ptr(left, nr_left), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:105:3: 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(value_ptr(left, nr_left), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:105:3: 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(value_ptr(left, nr_left), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:114:3: 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(key_ptr(right, 0), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:114:3: 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(key_ptr(right, 0), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:117:3: 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(value_ptr(right, 0), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:117:3: 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(value_ptr(right, 0), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:135:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(key_ptr(n, index), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:135:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(key_ptr(n, index), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:139:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(value_ptr(n, index), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:139:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(value_ptr(n, index), ^~~~~~~ drivers/md/persistent-data/dm-btree-remove.c:495:3: 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(n, dm_block_data(child), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:495:3: 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(n, dm_block_data(child), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:559:4: 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(value_ptr(dm_block_data(shadow_parent(s)), i), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:559:4: 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(value_ptr(dm_block_data(shadow_parent(s)), i), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:652:4: 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(value_ptr(dm_block_data(shadow_parent(s)), i), ^~~~~~ drivers/md/persistent-data/dm-btree-remove.c:652:4: 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(value_ptr(dm_block_data(shadow_parent(s)), i), ^~~~~~ Suppressed 47 warnings (47 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. 54 warnings generated. fs/xfs/xfs_extfree_item.c:197:3: 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((char *)dst_efi_fmt, (char*)src_efi_fmt, len); ^~~~~~ fs/xfs/xfs_extfree_item.c:197:3: 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((char *)dst_efi_fmt, (char*)src_efi_fmt, len); ^~~~~~ fs/xfs/xfs_extfree_item.c:679: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(efdp->efd_format.efd_extents, extp, count * sizeof(*extp)); ^~~~~~ fs/xfs/xfs_extfree_item.c:679: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(efdp->efd_format.efd_extents, extp, count * sizeof(*extp)); ^~~~~~ fs/xfs/xfs_extfree_item.c:683: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(efip->efi_format.efi_extents, extp, count * sizeof(*extp)); ^~~~~~ fs/xfs/xfs_extfree_item.c:683: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(efip->efi_format.efi_extents, extp, count * sizeof(*extp)); ^~~~~~ Suppressed 51 warnings (51 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. 51 warnings generated. Suppressed 51 warnings (51 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. 54 warnings generated. fs/xfs/xfs_inode_item.c:376: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(to->di_pad, 0, sizeof(to->di_pad)); ^~~~~~ fs/xfs/xfs_inode_item.c:376: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(to->di_pad, 0, sizeof(to->di_pad)); ^~~~~~ fs/xfs/xfs_inode_item.c:377: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(to->di_pad3, 0, sizeof(to->di_pad3)); ^~~~~~ fs/xfs/xfs_inode_item.c:377: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(to->di_pad3, 0, sizeof(to->di_pad3)); ^~~~~~ fs/xfs/xfs_inode_item.c:407: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(to->di_pad2, 0, sizeof(to->di_pad2)); ^~~~~~ fs/xfs/xfs_inode_item.c:407: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(to->di_pad2, 0, sizeof(to->di_pad2)); ^~~~~~ fs/xfs/xfs_inode_item.c:472: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(&ilf->ilf_u, 0, sizeof(ilf->ilf_u)); ^~~~~~ fs/xfs/xfs_inode_item.c:472: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(&ilf->ilf_u, 0, sizeof(ilf->ilf_u)); ^~~~~~ fs/xfs/xfs_inode_item.c:887: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(&in_f->ilf_u, &in_f32->ilf_u, sizeof(in_f->ilf_u)); ^~~~~~ fs/xfs/xfs_inode_item.c:887: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(&in_f->ilf_u, &in_f32->ilf_u, sizeof(in_f->ilf_u)); ^~~~~~ Suppressed 49 warnings (49 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. 51 warnings generated. >> fs/orangefs/dcache.c:36:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.lookup.d_name, ^~~~~~~ fs/orangefs/dcache.c:36:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.lookup.d_name, ^~~~~~~ Suppressed 50 warnings (50 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. 53 warnings generated. fs/orangefs/inode.c:836:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = posix_acl_chmod(&init_user_ns, inode, inode->i_mode); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/orangefs/inode.c:836:3: note: Value stored to 'ret' is never read ret = posix_acl_chmod(&init_user_ns, inode, inode->i_mode); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> fs/orangefs/inode.c:914: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(&iattr, 0, sizeof iattr); ^~~~~~ fs/orangefs/inode.c:914: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(&iattr, 0, sizeof iattr); ^~~~~~ Suppressed 51 warnings (51 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. 51 warnings generated. >> fs/orangefs/orangefs-sysfs.c:630:9: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] rc = sscanf(buf, "%d %d", &val1, &val2); ^~~~~~ fs/orangefs/orangefs-sysfs.c:630:9: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 rc = sscanf(buf, "%d %d", &val1, &val2); ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 59 warnings generated. >> fs/orangefs/super.c:118: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(&orangefs_inode->refn.khandle, 0, 16); ^~~~~~ fs/orangefs/super.c:118: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(&orangefs_inode->refn.khandle, 0, 16); ^~~~~~ fs/orangefs/super.c:121: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(orangefs_inode->link_target, 0, sizeof(orangefs_inode->link_target)); ^~~~~~ fs/orangefs/super.c:121: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(orangefs_inode->link_target, 0, sizeof(orangefs_inode->link_target)); ^~~~~~ >> fs/orangefs/super.c:204: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(&buf->f_fsid, &ORANGEFS_SB(sb)->fs_id, sizeof(buf->f_fsid)); ^~~~~~ fs/orangefs/super.c:204: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(&buf->f_fsid, &ORANGEFS_SB(sb)->fs_id, sizeof(buf->f_fsid)); ^~~~~~ >> fs/orangefs/super.c:256:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.fs_mount.orangefs_config_server, ^~~~~~~ fs/orangefs/super.c:256:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.fs_mount.orangefs_config_server, ^~~~~~~ fs/orangefs/super.c:403:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(op->upcall.req.fs_umount.orangefs_config_server, ^~~~~~~ fs/orangefs/super.c:403:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(op->upcall.req.fs_umount.orangefs_config_server, ^~~~~~~ fs/orangefs/super.c:480:22: warning: Value stored to 'sb' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct super_block *sb = ERR_PTR(-EINVAL); ^~ ~~~~~~~~~~~~~~~~ fs/orangefs/super.c:480:22: note: Value stored to 'sb' during its initialization is never read struct super_block *sb = ERR_PTR(-EINVAL); ^~ ~~~~~~~~~~~~~~~~ fs/orangefs/super.c:497:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(new_op->upcall.req.fs_mount.orangefs_config_server, ^~~~~~~ fs/orangefs/super.c:497:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(new_op->upcall.req.fs_mount.orangefs_config_server, ^~~~~~~ fs/orangefs/super.c:546:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(ORANGEFS_SB(sb)->devname, ^~~~~~~ fs/orangefs/super.c:546:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(ORANGEFS_SB(sb)->devname, ^~~~~~~ fs/orangefs/super.c:573:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = service_operation(new_op, "orangefs_features", 0); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/orangefs/super.c:573:3: note: Value stored to 'ret' is never read ret = service_operation(new_op, "orangefs_features", 0); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 50 warnings (50 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. 48 warnings generated. drivers/phy/cadence/phy-cadence-salvo.c:227:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores] value |= RXDET_IN_P3_32KHZ; ^ drivers/phy/cadence/phy-cadence-salvo.c:227:2: note: Value stored to 'value' is never read Suppressed 47 warnings (46 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 67 warnings generated. Suppressed 67 warnings (67 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 48 warnings generated. drivers/gpio/gpio-adnp.c:385:28: warning: The result of the left shift is undefined due to shifting by '4294967292', which is greater or equal to the width of type 'int' [clang-analyzer-core.UndefinedBinaryOperatorResult] unsigned int num_regs = 1 << adnp->reg_shift, i; ^ drivers/gpio/gpio-adnp.c:497:6: note: 'err' is >= 0 if (err < 0) ^~~ drivers/gpio/gpio-adnp.c:497:2: note: Taking false branch if (err < 0) ^ drivers/gpio/gpio-adnp.c:501:6: note: Assuming field 'irq' is not equal to 0 if (!client->irq) ^~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:501:2: note: Taking false branch if (!client->irq) ^ drivers/gpio/gpio-adnp.c:505:6: note: Assuming 'adnp' is non-null if (!adnp) ^~~~~ drivers/gpio/gpio-adnp.c:505:2: note: Taking false branch if (!adnp) ^ drivers/gpio/gpio-adnp.c:508:2: note: Loop condition is false. Exiting loop mutex_init(&adnp->i2c_lock); ^ include/linux/mutex.h:101:32: note: expanded from macro 'mutex_init' #define mutex_init(mutex) \ ^ drivers/gpio/gpio-adnp.c:511:8: note: Calling 'adnp_gpio_setup' err = adnp_gpio_setup(adnp, num_gpios, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:446:2: note: The value 4294967292 is assigned to field 'reg_shift' adnp->reg_shift = get_count_order(num_gpios) - 3; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:454:2: note: Taking true branch if (IS_ENABLED(CONFIG_DEBUG_FS)) ^ drivers/gpio/gpio-adnp.c:463:6: note: 'is_irq_controller' is true if (is_irq_controller) { ^~~~~~~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:463:2: note: Taking true branch if (is_irq_controller) { ^ drivers/gpio/gpio-adnp.c:466:9: note: Calling 'adnp_irq_setup' err = adnp_irq_setup(adnp); ^~~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:385:28: note: The result of the left shift is undefined due to shifting by '4294967292', which is greater or equal to the width of type 'int' -- ^ drivers/gpio/gpio-adnp.c:463:6: note: 'is_irq_controller' is true if (is_irq_controller) { ^~~~~~~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:463:2: note: Taking true branch if (is_irq_controller) { ^ drivers/gpio/gpio-adnp.c:466:9: note: Calling 'adnp_irq_setup' err = adnp_irq_setup(adnp); ^~~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-adnp.c:385:28: note: The result of the left shift is undefined due to shifting by '4294967293', which is greater or equal to the width of type 'int' unsigned int num_regs = 1 << adnp->reg_shift, i; ^ ~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. Suppressed 46 warnings (46 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. 50 warnings generated. drivers/mfd/tps65010.c:90:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "%02x%s%s%s%s%s%s%s%s\n", ^~~~~~~~ drivers/mfd/tps65010.c:90:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "%02x%s%s%s%s%s%s%s%s\n", ^~~~~~~~ drivers/mfd/tps65010.c:106:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "%02x %s%s%s%s%s%s%s%s\n", ^~~~~~~~ drivers/mfd/tps65010.c:106:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "%02x %s%s%s%s%s%s%s%s\n", ^~~~~~~~ drivers/mfd/tps65010.c:128:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, len, "%02x %s%s%s AC=%d%% USB=%dmA %sCharge\n", ^~~~~~~~ drivers/mfd/tps65010.c:128:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, len, "%02x %s%s%s AC=%d%% USB=%dmA %sCharge\n", ^~~~~~~~ drivers/mfd/tps65010.c:650:5: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = 0; ^ ~ drivers/mfd/tps65010.c:650:5: note: Value stored to 'status' is never read status = 0; ^ ~ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 13 warnings generated. lib/lzo/lzo1x_decompress_safe.c:178:5: 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(op, 0, t); ^~~~~~ lib/lzo/lzo1x_decompress_safe.c:178:5: 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(op, 0, t); ^~~~~~ Suppressed 12 warnings (12 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. 49 warnings generated. lib/raid6/algos.c:255:3: 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(p, raid6_gfmul, 65536); ^~~~~~ lib/raid6/algos.c:255:3: 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(p, raid6_gfmul, 65536); ^~~~~~ lib/raid6/algos.c:260:3: 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(p, raid6_gfmul, (disks - 2) * PAGE_SIZE % 65536); ^~~~~~ lib/raid6/algos.c:260:3: 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(p, raid6_gfmul, (disks - 2) * PAGE_SIZE % 65536); ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/ecryptfs/mmap.c:129:4: 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(page_virt, 0, PAGE_SIZE); ^~~~~~ fs/ecryptfs/mmap.c:129:4: 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(page_virt, 0, PAGE_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. >> fs/ecryptfs/read_write.c:154:4: 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(((char *)ecryptfs_page_virt ^~~~~~ fs/ecryptfs/read_write.c:154:4: 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(((char *)ecryptfs_page_virt ^~~~~~ >> fs/ecryptfs/read_write.c:161:4: 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(((char *)ecryptfs_page_virt ^~~~~~ fs/ecryptfs/read_write.c:161:4: 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(((char *)ecryptfs_page_virt ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 60 warnings generated. drivers/crypto/inside-secure/safexcel_cipher.c:86:3: 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(&cdesc->control_data.token[1], iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:86:3: 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(&cdesc->control_data.token[1], iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:95:3: 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(&cdesc->control_data.token[0], &iv[4], 12); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:95:3: 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(&cdesc->control_data.token[0], &iv[4], 12); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:102: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(cdesc->control_data.token, iv, ctx->blocksz); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:102: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(cdesc->control_data.token, iv, ctx->blocksz); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:143:3: 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(&cdesc->control_data.token[1], iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:143:3: 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(&cdesc->control_data.token[1], iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:151:3: 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(&cdesc->control_data.token[0], iv, 12); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:151:3: 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(&cdesc->control_data.token[0], iv, 12); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:158: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(cdesc->control_data.token, iv, ctx->blocksz); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:158: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(cdesc->control_data.token, iv, ctx->blocksz); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:192:4: 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(&cdesc->control_data.token[1], iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:192:4: 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(&cdesc->control_data.token[1], iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:193:4: 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(cbcmaciv + 4, iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:193:4: 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(cbcmaciv + 4, iv, 8); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:200:4: 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(final_iv, iv, 15 - iv[0]); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:200:4: 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(final_iv, iv, 15 - iv[0]); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:201:4: 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(cbcmaciv, iv, 15 - iv[0]); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:201:4: 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(cbcmaciv, iv, 15 - iv[0]); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:203:4: 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(final_iv + 15 - iv[0], 0, iv[0] + 1); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:203:4: 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(final_iv + 15 - iv[0], 0, iv[0] + 1); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:204:4: 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(cbcmaciv + 15 - iv[0], 0, iv[0] - 1); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:204:4: 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(cbcmaciv + 15 - iv[0], 0, iv[0] - 1); ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:703:3: 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(ctx->base.ctxr->data + ctx->key_len / sizeof(u32), ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:703:3: 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(ctx->base.ctxr->data + ctx->key_len / sizeof(u32), ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:706:4: 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(ctx->base.ctxr->data + (ctx->key_len + ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:706:4: 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(ctx->base.ctxr->data + (ctx->key_len + ^~~~~~ drivers/crypto/inside-secure/safexcel_cipher.c:759: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(ctx->base.ctxr->data, ctx->key, ctx->key_len); -- drivers/target/target_core_fabric_configfs.c:1012:2: note: Control jumps to 'case SE_COMPL_AFFINITY_CPUID:' at line 1013 switch (compl_val) { ^ drivers/target/target_core_fabric_configfs.c:1014:27: note: Access to field 'cmd_compl_affinity' results in a dereference of a null pointer (loaded from variable 'wwn') wwn->cmd_compl_affinity = compl_val; ~~~ ^ drivers/target/target_core_fabric_configfs.c:1017:27: warning: Access to field 'cmd_compl_affinity' results in a dereference of a null pointer (loaded from variable 'wwn') [clang-analyzer-core.NullDereference] wwn->cmd_compl_affinity = WORK_CPU_UNBOUND; ~~~ ^ drivers/target/target_core_fabric_configfs.c:1005:2: note: 'wwn' initialized to a null pointer value struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn, ^~~~~~~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1009:6: note: Assuming the condition is false if (kstrtoint(page, 0, &compl_val)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1009:2: note: Taking false branch if (kstrtoint(page, 0, &compl_val)) ^ drivers/target/target_core_fabric_configfs.c:1012:2: note: Control jumps to 'case SE_COMPL_AFFINITY_CURR_CPU:' at line 1016 switch (compl_val) { ^ drivers/target/target_core_fabric_configfs.c:1017:27: note: Access to field 'cmd_compl_affinity' results in a dereference of a null pointer (loaded from variable 'wwn') wwn->cmd_compl_affinity = WORK_CPU_UNBOUND; ~~~ ^ drivers/target/target_core_fabric_configfs.c:1027:27: warning: Access to field 'cmd_compl_affinity' results in a dereference of a null pointer (loaded from variable 'wwn') [clang-analyzer-core.NullDereference] wwn->cmd_compl_affinity = compl_val; ~~~ ^ drivers/target/target_core_fabric_configfs.c:1005:2: note: 'wwn' initialized to a null pointer value struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn, ^~~~~~~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1009:6: note: Assuming the condition is false if (kstrtoint(page, 0, &compl_val)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1009:2: note: Taking false branch if (kstrtoint(page, 0, &compl_val)) ^ drivers/target/target_core_fabric_configfs.c:1012:2: note: Control jumps to the 'default' case at line 1019 switch (compl_val) { ^ drivers/target/target_core_fabric_configfs.c:1020:7: note: Assuming 'compl_val' is >= 0 if (compl_val < 0 || compl_val >= nr_cpu_ids || ^~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1020:7: note: Left side of '||' is false drivers/target/target_core_fabric_configfs.c:1020:24: note: Assuming 'compl_val' is < 'nr_cpu_ids' if (compl_val < 0 || compl_val >= nr_cpu_ids || ^~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1020:7: note: Left side of '||' is false if (compl_val < 0 || compl_val >= nr_cpu_ids || ^ drivers/target/target_core_fabric_configfs.c:1021:7: note: Assuming the condition is false !cpu_online(compl_val)) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_fabric_configfs.c:1020:3: note: Taking false branch if (compl_val < 0 || compl_val >= nr_cpu_ids || ^ drivers/target/target_core_fabric_configfs.c:1027:27: note: Access to field 'cmd_compl_affinity' results in a dereference of a null pointer (loaded from variable 'wwn') wwn->cmd_compl_affinity = compl_val; ~~~ ^ Suppressed 35 warnings (35 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. 35 warnings generated. drivers/char/ipmi/ipmi_si_hotmod.c:205: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(&h, 0, sizeof(h)); ^~~~~~ drivers/char/ipmi/ipmi_si_hotmod.c:205: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(&h, 0, sizeof(h)); ^~~~~~ Suppressed 34 warnings (34 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. 36 warnings generated. drivers/char/ipmi/ipmi_si_hardcode.c:67: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(&p, 0, sizeof(p)); ^~~~~~ drivers/char/ipmi/ipmi_si_hardcode.c:67: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(&p, 0, sizeof(p)); ^~~~~~ drivers/char/ipmi/ipmi_si_hardcode.c:99: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(si_type, 0, sizeof(si_type)); ^~~~~~ drivers/char/ipmi/ipmi_si_hardcode.c:99: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(si_type, 0, sizeof(si_type)); ^~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 13 warnings generated. Suppressed 13 warnings (13 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. 55 warnings generated. >> drivers/md/dm-verity-fec.c:350: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(fio->bufs[n], 0, v->fec->rsn << DM_VERITY_FEC_BUF_RS_BITS); ^~~~~~ drivers/md/dm-verity-fec.c:350: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(fio->bufs[n], 0, v->fec->rsn << DM_VERITY_FEC_BUF_RS_BITS); ^~~~~~ drivers/md/dm-verity-fec.c:352: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(fio->erasures, 0, sizeof(fio->erasures)); ^~~~~~ drivers/md/dm-verity-fec.c:352: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(fio->erasures, 0, sizeof(fio->erasures)); ^~~~~~ >> drivers/md/dm-verity-fec.c:408: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, &fio->output[fio->output_pos], len); ^~~~~~ drivers/md/dm-verity-fec.c:408: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, &fio->output[fio->output_pos], len); ^~~~~~ drivers/md/dm-verity-fec.c:471:3: 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(dest, fio->output, 1 << v->data_dev_block_bits); ^~~~~~ drivers/md/dm-verity-fec.c:471:3: 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(dest, fio->output, 1 << v->data_dev_block_bits); ^~~~~~ drivers/md/dm-verity-fec.c:516: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(fio->bufs, 0, sizeof(fio->bufs)); ^~~~~~ drivers/md/dm-verity-fec.c:516: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(fio->bufs, 0, sizeof(fio->bufs)); ^~~~~~ >> drivers/md/dm-verity-fec.c:617:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(arg_value, "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-fec.c:617:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(arg_value, "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-fec.c:626:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(arg_value, "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-fec.c:626:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(arg_value, "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-fec.c:635:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(arg_value, "%hhu%c", &num_c, &dummy) != 1 || !num_c || ^~~~~~ drivers/md/dm-verity-fec.c:635:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(arg_value, "%hhu%c", &num_c, &dummy) != 1 || !num_c || ^~~~~~ Suppressed 47 warnings (47 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. 66 warnings generated. Suppressed 66 warnings (66 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. 37 warnings generated. Suppressed 37 warnings (37 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. 49 warnings generated. drivers/misc/xilinx_sdfec.c:298: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(&status, 0, sizeof(status)); ^~~~~~ drivers/misc/xilinx_sdfec.c:298: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(&status, 0, sizeof(status)); ^~~~~~ drivers/misc/xilinx_sdfec.c:444: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(&turbo_params, 0, sizeof(turbo_params)); ^~~~~~ drivers/misc/xilinx_sdfec.c:444: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(&turbo_params, 0, sizeof(turbo_params)); ^~~~~~ drivers/misc/xilinx_sdfec.c:1416:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(xsdfec->dev_name, DEV_NAME_LEN, "xsdfec%d", xsdfec->dev_id); ^~~~~~~~ drivers/misc/xilinx_sdfec.c:1416:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(xsdfec->dev_name, DEV_NAME_LEN, "xsdfec%d", xsdfec->dev_id); ^~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 51 warnings generated. >> fs/hpfs/alloc.c:443: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(d, 0, 2048); ^~~~~~ fs/hpfs/alloc.c:443: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(d, 0, 2048); ^~~~~~ fs/hpfs/alloc.c:463: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(f, 0, 512); ^~~~~~ fs/hpfs/alloc.c:463: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(f, 0, 512); ^~~~~~ fs/hpfs/alloc.c:480: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(a, 0, 512); ^~~~~~ fs/hpfs/alloc.c:480: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(a, 0, 512); ^~~~~~ Suppressed 48 warnings (48 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. 52 warnings generated. >> fs/orangefs/waitqueue.c:214: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(&op->upcall, 0, sizeof(op->upcall)); ^~~~~~ fs/orangefs/waitqueue.c:214: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(&op->upcall, 0, sizeof(op->upcall)); ^~~~~~ fs/orangefs/waitqueue.c:215: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(&op->downcall, 0, sizeof(op->downcall)); ^~~~~~ fs/orangefs/waitqueue.c:215: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(&op->downcall, 0, sizeof(op->downcall)); ^~~~~~ Suppressed 50 warnings (50 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. Suppressed 46 warnings (46 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. 49 warnings generated. drivers/leds/flash/leds-lm3601x.c:226:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = regmap_update_bits(led->regmap, LM3601X_CFG_REG, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/flash/leds-lm3601x.c:226:3: note: Value stored to 'ret' is never read ret = regmap_update_bits(led->regmap, LM3601X_CFG_REG, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/flash/leds-lm3601x.c:230:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/flash/leds-lm3601x.c:230:3: note: Value stored to 'ret' is never read ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/flash/leds-lm3601x.c:234:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/flash/leds-lm3601x.c:234:3: note: Value stored to 'ret' is never read ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 52 warnings generated. fs/xfs/xfs_icache.c:99: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(&ip->i_imap, 0, sizeof(struct xfs_imap)); ^~~~~~ fs/xfs/xfs_icache.c:99: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(&ip->i_imap, 0, sizeof(struct xfs_imap)); ^~~~~~ fs/xfs/xfs_icache.c:102: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(&ip->i_df, 0, sizeof(ip->i_df)); ^~~~~~ fs/xfs/xfs_icache.c:102: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(&ip->i_df, 0, sizeof(ip->i_df)); ^~~~~~ fs/xfs/xfs_icache.c:727:2: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores] error = 0; ^ ~ fs/xfs/xfs_icache.c:727:2: note: Value stored to 'error' is never read error = 0; ^ ~ fs/xfs/xfs_icache.c:1649:2: warning: Value stored to 'nr_found' is never read [clang-analyzer-deadcode.DeadStores] nr_found = 0; ^ ~ fs/xfs/xfs_icache.c:1649:2: note: Value stored to 'nr_found' is never read nr_found = 0; ^ ~ Suppressed 48 warnings (48 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. 57 warnings generated. fs/xfs/xfs_ioctl.c:97: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(&handle.ha_fsid, ip->i_mount->m_fixedfsid, sizeof(xfs_fsid_t)); ^~~~~~ fs/xfs/xfs_ioctl.c:97: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(&handle.ha_fsid, ip->i_mount->m_fixedfsid, sizeof(xfs_fsid_t)); ^~~~~~ fs/xfs/xfs_ioctl.c:103: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(&handle.ha_fid, 0, sizeof(handle.ha_fid)); ^~~~~~ fs/xfs/xfs_ioctl.c:103: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(&handle.ha_fid, 0, sizeof(handle.ha_fid)); ^~~~~~ fs/xfs/xfs_ioctl.c:167: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(&fid, 0, sizeof(struct fid)); ^~~~~~ fs/xfs/xfs_ioctl.c:167: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(&fid, 0, sizeof(struct fid)); ^~~~~~ fs/xfs/xfs_ioctl.c:342: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(aep->a_name, name, namelen); ^~~~~~ fs/xfs/xfs_ioctl.c:342: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(aep->a_name, name, namelen); ^~~~~~ fs/xfs/xfs_ioctl.c:1741: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(label, 0, sizeof(label)); ^~~~~~ fs/xfs/xfs_ioctl.c:1741: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(label, 0, sizeof(label)); ^~~~~~ fs/xfs/xfs_ioctl.c:1743:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(label, sbp->sb_fname, XFSLABEL_MAX); -- 47 warnings generated. drivers/i2c/i2c-core-of.c:28: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(info, 0, sizeof(*info)); ^~~~~~ drivers/i2c/i2c-core-of.c:28: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(info, 0, sizeof(*info)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 49 warnings generated. drivers/i2c/i2c-mux.c:328:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(priv->adap.name, sizeof(priv->adap.name), ^~~~~~~~ drivers/i2c/i2c-mux.c:328:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(priv->adap.name, sizeof(priv->adap.name), ^~~~~~~~ drivers/i2c/i2c-mux.c:424:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(symlink_name, sizeof(symlink_name), "channel-%u", chan_id); ^~~~~~~~ drivers/i2c/i2c-mux.c:424:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(symlink_name, sizeof(symlink_name), "channel-%u", chan_id); ^~~~~~~~ drivers/i2c/i2c-mux.c:451:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(symlink_name, sizeof(symlink_name), ^~~~~~~~ drivers/i2c/i2c-mux.c:451:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(symlink_name, sizeof(symlink_name), ^~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 12 warnings generated. Suppressed 12 warnings (12 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. 17 warnings generated. lib/lz4/lz4_compress.c:449:3: 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] LZ4_memcpy(op, anchor, lastRun); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_compress.c:449:3: 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 LZ4_memcpy(op, anchor, lastRun); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_compress.c:711:3: 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] LZ4_memcpy(op, anchor, lastRunSize); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_compress.c:711:3: 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 LZ4_memcpy(op, anchor, lastRunSize); ^ lib/lz4/lz4defs.h:150:36: note: expanded from macro 'LZ4_memcpy' #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) ^~~~~~~~~~~~~~~~ lib/lz4/lz4_compress.c:772: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(LZ4_stream, 0, sizeof(LZ4_stream_t)); ^~~~~~ lib/lz4/lz4_compress.c:772: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(LZ4_stream, 0, sizeof(LZ4_stream_t)); ^~~~~~ lib/lz4/lz4_compress.c:848:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(safeBuffer, previousDictEnd - dictSize, dictSize); ^~~~~~~ lib/lz4/lz4_compress.c:848:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(safeBuffer, previousDictEnd - dictSize, dictSize); ^~~~~~~ Suppressed 13 warnings (12 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 47 warnings generated. drivers/regulator/bd9571mwv-regulator.c:91:6: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] val >>= ffs(rdev->desc->vsel_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/bd9571mwv-regulator.c:83:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ drivers/regulator/bd9571mwv-regulator.c:83:2: note: Taking false branch if (ret < 0) ^ drivers/regulator/bd9571mwv-regulator.c:87:6: note: Assuming 'ret' is equal to 0 if (ret != 0) ^~~~~~~~ drivers/regulator/bd9571mwv-regulator.c:87:2: note: Taking false branch if (ret != 0) ^ drivers/regulator/bd9571mwv-regulator.c:91:6: note: Assigned value is garbage or undefined val >>= ffs(rdev->desc->vsel_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. >> drivers/regulator/da9063-regulator.c:937: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(&config, 0, sizeof(config)); ^~~~~~ drivers/regulator/da9063-regulator.c:937: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(&config, 0, sizeof(config)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 52 warnings generated. drivers/md/dm-zoned-target.c:818:4: warning: Division by zero [clang-analyzer-core.DivideZero] DIV_ROUND_UP_SECTOR_T(reg_dev->capacity, ^ include/linux/math.h:45:38: note: expanded from macro 'DIV_ROUND_UP_SECTOR_T' # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) ^ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ^ drivers/md/dm-zoned-target.c:839:6: note: Assuming 'argc' is >= 1 if (argc < 1) { ^~~~~~~~ drivers/md/dm-zoned-target.c:839:2: note: Taking false branch if (argc < 1) { ^ drivers/md/dm-zoned-target.c:846:6: note: Assuming 'dmz' is non-null if (!dmz) { ^~~~ drivers/md/dm-zoned-target.c:846:2: note: Taking false branch if (!dmz) { ^ drivers/md/dm-zoned-target.c:851:6: note: Assuming field 'dev' is non-null if (!dmz->dev) { ^~~~~~~~~ drivers/md/dm-zoned-target.c:851:2: note: Taking false branch if (!dmz->dev) { ^ drivers/md/dm-zoned-target.c:857:6: note: Assuming field 'ddev' is non-null if (!dmz->ddev) { ^~~~~~~~~~ drivers/md/dm-zoned-target.c:857:2: note: Taking false branch if (!dmz->ddev) { ^ drivers/md/dm-zoned-target.c:867:14: note: 'i' is < 'argc' for (i = 0; i < argc; i++) { ^ drivers/md/dm-zoned-target.c:867:2: note: Loop condition is true. Entering loop body for (i = 0; i < argc; i++) { ^ drivers/md/dm-zoned-target.c:869:7: note: 'ret' is 0 if (ret) ^~~ drivers/md/dm-zoned-target.c:869:3: note: Taking false branch if (ret) ^ drivers/md/dm-zoned-target.c:867:2: note: Loop condition is false. Execution continues on line 872 for (i = 0; i < argc; i++) { ^ drivers/md/dm-zoned-target.c:872:8: note: Calling 'dmz_fixup_devices' ret = dmz_fixup_devices(ti); ^~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:778:6: note: Assuming field 'nr_ddevs' is > 1 if (dmz->nr_ddevs > 1) { ^~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:778:2: note: Taking true branch if (dmz->nr_ddevs > 1) { ^ drivers/md/dm-zoned-target.c:780:7: note: Assuming the condition is false if (!(reg_dev->flags & DMZ_BDEV_REGULAR)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:780:3: note: Taking false branch if (!(reg_dev->flags & DMZ_BDEV_REGULAR)) { ^ drivers/md/dm-zoned-target.c:784:15: note: 'i' is < field 'nr_ddevs' for (i = 1; i < dmz->nr_ddevs; i++) { ^ drivers/md/dm-zoned-target.c:784:3: note: Loop condition is true. Entering loop body for (i = 1; i < dmz->nr_ddevs; i++) { -- ^ drivers/md/dm-zoned-target.c:818:4: note: Taking true branch DIV_ROUND_UP_SECTOR_T(reg_dev->capacity, ^ include/linux/math.h:45:38: note: expanded from macro 'DIV_ROUND_UP_SECTOR_T' # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) ^ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^ include/asm-generic/div64.h:234:9: note: expanded from macro 'do_div' } else if (likely(((n) >> 32) == 0)) { \ ^ drivers/md/dm-zoned-target.c:818:4: note: Division by zero DIV_ROUND_UP_SECTOR_T(reg_dev->capacity, ^ include/linux/math.h:45:38: note: expanded from macro 'DIV_ROUND_UP_SECTOR_T' # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^~~~~~~~~~~~~~~ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ~~~~~~~~~~~~~~^~~~~~~~ drivers/md/dm-zoned-target.c:1077:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn] return r; ^ ~ drivers/md/dm-zoned-target.c:1069:9: note: 'r' declared without an initial value int i, r; ^ drivers/md/dm-zoned-target.c:1071:14: note: Assuming 'i' is >= field 'nr_ddevs' for (i = 0; i < dmz->nr_ddevs; i++) { ^~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:1071:2: note: Loop condition is false. Execution continues on line 1077 for (i = 0; i < dmz->nr_ddevs; i++) { ^ drivers/md/dm-zoned-target.c:1077:2: note: Undefined or garbage value returned to caller return r; ^ ~ drivers/md/dm-zoned-target.c:1113:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] format_dev_t(buf, dev->bdev->bd_dev); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/md/dm-zoned-target.c:1113:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 format_dev_t(buf, dev->bdev->bd_dev); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/md/dm-zoned-target.c:1117:4: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] format_dev_t(buf, dev->bdev->bd_dev); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ drivers/md/dm-zoned-target.c:1117:4: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 format_dev_t(buf, dev->bdev->bd_dev); ^ include/linux/kdev_t.h:19:3: note: expanded from macro 'format_dev_t' sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ ^~~~~~~ include/linux/bio.h:619:20: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] struct bio *bio = bl->head; ^ drivers/md/dm-zoned-target.c:488:2: note: Loop condition is true. Entering loop body while ((bio = bio_list_pop(&cw->bio_list))) { ^ drivers/md/dm-zoned-target.c:492:3: note: Calling 'dmz_put_chunk_work' dmz_put_chunk_work(cw); ^~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:469:6: note: Assuming the condition is true if (refcount_dec_and_test(&cw->refcount)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:469:2: note: Taking true branch if (refcount_dec_and_test(&cw->refcount)) { ^ drivers/md/dm-zoned-target.c:472:3: note: Memory is released kfree(cw); ^~~~~~~~~ drivers/md/dm-zoned-target.c:492:3: note: Returning; memory was released via 1st parameter dmz_put_chunk_work(cw); ^~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-zoned-target.c:488:16: note: Calling 'bio_list_pop' while ((bio = bio_list_pop(&cw->bio_list))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/bio.h:619:20: note: Use of memory after it is freed struct bio *bio = bl->head; ^~~~~~~~ Suppressed 47 warnings (47 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. 72 warnings generated. >> drivers/nvme/target/loop.c:179: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(&iod->cmd, 0, sizeof(iod->cmd)); ^~~~~~ drivers/nvme/target/loop.c:179: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(&iod->cmd, 0, sizeof(iod->cmd)); ^~~~~~ drivers/nvme/target/loop.c:353: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(&ctrl->admin_tag_set, 0, sizeof(ctrl->admin_tag_set)); ^~~~~~ drivers/nvme/target/loop.c:353: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(&ctrl->admin_tag_set, 0, sizeof(ctrl->admin_tag_set)); ^~~~~~ drivers/nvme/target/loop.c:529: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(&ctrl->tag_set, 0, sizeof(ctrl->tag_set)); ^~~~~~ drivers/nvme/target/loop.c:529: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(&ctrl->tag_set, 0, sizeof(ctrl->tag_set)); ^~~~~~ Suppressed 69 warnings (69 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. drivers/spi/spi-axi-spi-engine.c:324:4: warning: Array access (from variable 'buf') results in a null pointer dereference [clang-analyzer-core.NullDereference] writel_relaxed(buf[i], addr); ^ arch/riscv/include/asm/mmio.h:120:45: note: expanded from macro 'writel_relaxed' #define writel_relaxed(v, c) ({ __io_rbw(); writel_cpu((v), (c)); __io_raw(); }) ^ arch/riscv/include/asm/mmio.h:93:59: note: expanded from macro 'writel_cpu' #define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c))) ^ include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32' #define cpu_to_le32 __cpu_to_le32 ^ include/uapi/linux/byteorder/little_endian.h:34:50: note: expanded from macro '__cpu_to_le32' #define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) ^ drivers/spi/spi-axi-spi-engine.c:425:2: note: Calling 'spi_engine_compile_message' spi_engine_compile_message(spi_engine, msg, true, &p_dry); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:215:2: note: Loop condition is false. Execution continues on line 238 list_for_each_entry(xfer, &msg->transfers, transfer_list) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ drivers/spi/spi-axi-spi-engine.c:238:2: note: Returning without writing to 'spi_engine->tx_length', which participates in a condition later return 0; ^ drivers/spi/spi-axi-spi-engine.c:238:2: note: Returning without writing to 'spi_engine->tx_buf' drivers/spi/spi-axi-spi-engine.c:425:2: note: Returning from 'spi_engine_compile_message' spi_engine_compile_message(spi_engine, msg, true, &p_dry); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:429:6: note: Assuming 'p' is non-null if (!p) ^~ drivers/spi/spi-axi-spi-engine.c:429:2: note: Taking false branch if (!p) ^ drivers/spi/spi-axi-spi-engine.c:431:2: note: Calling 'spi_engine_compile_message' spi_engine_compile_message(spi_engine, msg, false, p); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:215:2: note: Loop condition is false. Execution continues on line 238 list_for_each_entry(xfer, &msg->transfers, transfer_list) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ drivers/spi/spi-axi-spi-engine.c:238:2: note: Returning without writing to 'spi_engine->tx_length', which participates in a condition later return 0; ^ drivers/spi/spi-axi-spi-engine.c:238:2: note: Returning without writing to 'spi_engine->tx_buf' drivers/spi/spi-axi-spi-engine.c:431:2: note: Returning from 'spi_engine_compile_message' spi_engine_compile_message(spi_engine, msg, false, p); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:433:2: note: Loop condition is false. Exiting loop spin_lock_irqsave(&spi_engine->lock, flags); ^ include/linux/spinlock.h:379:2: note: expanded from macro 'spin_lock_irqsave' raw_spin_lock_irqsave(spinlock_check(lock), flags); \ ^ include/linux/spinlock.h:240:2: note: expanded from macro 'raw_spin_lock_irqsave' do { \ ^ drivers/spi/spi-axi-spi-engine.c:433:2: note: Loop condition is false. Exiting loop spin_lock_irqsave(&spi_engine->lock, flags); ^ include/linux/spinlock.h:377:43: note: expanded from macro 'spin_lock_irqsave' #define spin_lock_irqsave(lock, flags) \ ^ drivers/spi/spi-axi-spi-engine.c:443:6: note: Calling 'spi_engine_write_cmd_fifo' if (spi_engine_write_cmd_fifo(spi_engine)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:299:6: note: Loop condition is false. Exiting loop n = readl_relaxed(spi_engine->base + SPI_ENGINE_REG_CMD_FIFO_ROOM); ^ -- arch/riscv/include/asm/mmio.h:116:38: note: expanded from macro 'readl_relaxed' #define readl_relaxed(c) ({ u32 __v; __io_rbr(); __v = readl_cpu(c); __io_rar(); __v; }) ^ arch/riscv/include/asm/mmio.h:109:21: note: expanded from macro '__io_rbr' #define __io_rbr() do {} while (0) ^ drivers/spi/spi-axi-spi-engine.c:319:6: note: Loop condition is false. Exiting loop n = readl_relaxed(spi_engine->base + SPI_ENGINE_REG_SDO_FIFO_ROOM); ^ arch/riscv/include/asm/mmio.h:116:70: note: expanded from macro 'readl_relaxed' #define readl_relaxed(c) ({ u32 __v; __io_rbr(); __v = readl_cpu(c); __io_rar(); __v; }) ^ arch/riscv/include/asm/mmio.h:110:21: note: expanded from macro '__io_rar' #define __io_rar() do {} while (0) ^ drivers/spi/spi-axi-spi-engine.c:320:9: note: Assuming 'n' is not equal to 0 while (n && spi_engine->tx_length) { ^ drivers/spi/spi-axi-spi-engine.c:320:9: note: Left side of '&&' is true drivers/spi/spi-axi-spi-engine.c:320:2: note: Loop condition is true. Entering loop body while (n && spi_engine->tx_length) { ^ drivers/spi/spi-axi-spi-engine.c:321:7: note: Assuming '__UNIQUE_ID___x244' is >= '__UNIQUE_ID___y245' m = min(n, spi_engine->tx_length); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:321:7: note: '?' condition is false m = min(n, spi_engine->tx_length); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/spi/spi-axi-spi-engine.c:322:3: note: Null pointer value stored to 'buf' buf = spi_engine->tx_buf; ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-axi-spi-engine.c:323:15: note: 'i' is < 'm' for (i = 0; i < m; i++) ^ drivers/spi/spi-axi-spi-engine.c:323:3: note: Loop condition is true. Entering loop body for (i = 0; i < m; i++) ^ drivers/spi/spi-axi-spi-engine.c:324:4: note: Loop condition is false. Exiting loop writel_relaxed(buf[i], addr); ^ arch/riscv/include/asm/mmio.h:120:33: note: expanded from macro 'writel_relaxed' #define writel_relaxed(v, c) ({ __io_rbw(); writel_cpu((v), (c)); __io_raw(); }) ^ arch/riscv/include/asm/mmio.h:111:21: note: expanded from macro '__io_rbw' #define __io_rbw() do {} while (0) ^ drivers/spi/spi-axi-spi-engine.c:324:4: note: Array access (from variable 'buf') results in a null pointer dereference writel_relaxed(buf[i], addr); ^ arch/riscv/include/asm/mmio.h:120:45: note: expanded from macro 'writel_relaxed' #define writel_relaxed(v, c) ({ __io_rbw(); writel_cpu((v), (c)); __io_raw(); }) ^ ~ arch/riscv/include/asm/mmio.h:93:59: note: expanded from macro 'writel_cpu' #define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c))) ^ ~ include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32' #define cpu_to_le32 __cpu_to_le32 ^ include/uapi/linux/byteorder/little_endian.h:34:50: note: expanded from macro '__cpu_to_le32' #define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) ^~ Suppressed 35 warnings (35 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. 50 warnings generated. fs/ufs/dir.c:102:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = ufs_commit_chunk(page, pos, len); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/dir.c:102:2: note: Value stored to 'err' is never read err = ufs_commit_chunk(page, pos, len); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/dir.c:179:2: warning: Value stored to 'p' is never read [clang-analyzer-deadcode.DeadStores] p = (struct ufs_dir_entry *)(kaddr + offs); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ufs/dir.c:179:2: note: Value stored to 'p' is never read p = (struct ufs_dir_entry *)(kaddr + offs); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> fs/ufs/dir.c:389: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(de->d_name, name, namelen + 1); ^~~~~~ fs/ufs/dir.c:389: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(de->d_name, name, namelen + 1); ^~~~~~ >> fs/ufs/dir.c:564: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(base, 0, PAGE_SIZE); ^~~~~~ fs/ufs/dir.c:564: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(base, 0, PAGE_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 36 warnings generated. drivers/clocksource/timer-of.c:191:3: warning: Value stored to 'flags' is never read [clang-analyzer-deadcode.DeadStores] flags |= TIMER_OF_IRQ; ^ drivers/clocksource/timer-of.c:191:3: note: Value stored to 'flags' is never read Suppressed 35 warnings (35 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. 22 warnings generated. Suppressed 22 warnings (22 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. 21 warnings generated. Suppressed 21 warnings (21 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. 23 warnings generated. Suppressed 23 warnings (23 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. 35 warnings generated. Suppressed 35 warnings (35 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. 58 warnings generated. fs/f2fs/dir.c:112: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(fname, 0, sizeof(*fname)); ^~~~~~ fs/f2fs/dir.c:112: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(fname, 0, sizeof(*fname)); ^~~~~~ fs/f2fs/dir.c:505: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(ri->i_name, fname->disk_name.name, fname->disk_name.len); ^~~~~~ fs/f2fs/dir.c:505: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(ri->i_name, fname->disk_name.name, fname->disk_name.len); ^~~~~~ fs/f2fs/dir.c:695: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(d->filename[bit_pos], name->name, name->len); ^~~~~~ fs/f2fs/dir.c:695: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(d->filename[bit_pos], name->name, name->len); ^~~~~~ Suppressed 55 warnings (55 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. 12 warnings generated. Suppressed 12 warnings (12 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. 12 warnings generated. Suppressed 12 warnings (12 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. 20 warnings generated. >> lib/test_uuid.c:75:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf, "%pUl", &le); ^~~~~~~ lib/test_uuid.c:75:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf, "%pUl", &le); ^~~~~~~ lib/test_uuid.c:86:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(buf, "%pUb", &be); ^~~~~~~ lib/test_uuid.c:86:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(buf, "%pUb", &be); ^~~~~~~ Suppressed 18 warnings (18 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. 36 warnings generated. lib/test_lockup.c:231:32: warning: The right operand of '-' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] s64 cur_wait = local_clock() - wait_start; ^ ~~~~~~~~~~ lib/test_lockup.c:171:2: note: 'wait_start' declared without an initial value u64 wait_start; ^~~~~~~~~~~~~~ lib/test_lockup.c:173:6: note: Assuming 'measure_lock_wait' is false if (measure_lock_wait) ^~~~~~~~~~~~~~~~~ lib/test_lockup.c:173:2: note: Taking false branch if (measure_lock_wait) ^ lib/test_lockup.c:176:6: note: Assuming 'lock_mutex_ptr' is not equal to 0 if (lock_mutex_ptr && master) { ^~~~~~~~~~~~~~ lib/test_lockup.c:176:6: note: Left side of '&&' is true lib/test_lockup.c:176:24: note: Assuming 'master' is true if (lock_mutex_ptr && master) { ^~~~~~ lib/test_lockup.c:176:2: note: Taking true branch if (lock_mutex_ptr && master) { ^ lib/test_lockup.c:177:7: note: Assuming 'verbose' is false if (verbose) ^~~~~~~ lib/test_lockup.c:177:3: note: Taking false branch if (verbose) ^ lib/test_lockup.c:182:6: note: Assuming 'lock_rwsem_ptr' is 0 if (lock_rwsem_ptr && master) { ^~~~~~~~~~~~~~ lib/test_lockup.c:182:21: note: Left side of '&&' is false if (lock_rwsem_ptr && master) { ^ lib/test_lockup.c:192:6: note: Assuming 'lock_mmap_sem' is false if (lock_mmap_sem && master) { ^~~~~~~~~~~~~ lib/test_lockup.c:192:20: note: Left side of '&&' is false if (lock_mmap_sem && master) { ^ lib/test_lockup.c:201:6: note: Assuming 'test_disable_irq' is false if (test_disable_irq) ^~~~~~~~~~~~~~~~ lib/test_lockup.c:201:2: note: Taking false branch if (test_disable_irq) ^ lib/test_lockup.c:204:6: note: Assuming 'disable_softirq' is false if (disable_softirq) ^~~~~~~~~~~~~~~ lib/test_lockup.c:204:2: note: Taking false branch if (disable_softirq) ^ lib/test_lockup.c:207:6: note: Assuming 'disable_preempt' is false if (disable_preempt) ^~~~~~~~~~~~~~~ lib/test_lockup.c:207:2: note: Taking false branch if (disable_preempt) ^ lib/test_lockup.c:210:6: note: Assuming 'lock_rcu' is false if (lock_rcu) ^~~~~~~~ lib/test_lockup.c:210:2: note: Taking false branch if (lock_rcu) ^ lib/test_lockup.c:213:6: note: Assuming 'lock_spinlock_ptr' is 0 if (lock_spinlock_ptr && master) { ^~~~~~~~~~~~~~~~~ lib/test_lockup.c:213:24: note: Left side of '&&' is false if (lock_spinlock_ptr && master) { ^ lib/test_lockup.c:220:6: note: Assuming 'lock_rwlock_ptr' is 0 if (lock_rwlock_ptr && master) { ^~~~~~~~~~~~~~~ lib/test_lockup.c:220:22: note: Left side of '&&' is false if (lock_rwlock_ptr && master) { ^ lib/test_lockup.c:230:6: note: Assuming 'measure_lock_wait' is true if (measure_lock_wait) { ^~~~~~~~~~~~~~~~~ lib/test_lockup.c:230:2: note: Taking true branch if (measure_lock_wait) { ^ lib/test_lockup.c:231:32: note: The right operand of '-' is a garbage value s64 cur_wait = local_clock() - wait_start; ^ ~~~~~~~~~~ lib/test_lockup.c:323:2: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] -- ^ drivers/mtd/maps/physmap-core.c:522:3: note: Taking true branch dev_notice(&dev->dev, "physmap platform flash device: %pR\n", ^ include/linux/dev_printk.h:148:2: note: expanded from macro 'dev_notice' dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/mtd/maps/physmap-core.c:522:3: note: '?' condition is true dev_notice(&dev->dev, "physmap platform flash device: %pR\n", ^ include/linux/dev_printk.h:148:2: note: expanded from macro 'dev_notice' dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ drivers/mtd/maps/physmap-core.c:522:3: note: '?' condition is true dev_notice(&dev->dev, "physmap platform flash device: %pR\n", ^ include/linux/dev_printk.h:148:2: note: expanded from macro 'dev_notice' dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ drivers/mtd/maps/physmap-core.c:522:3: note: Loop condition is false. Exiting loop dev_notice(&dev->dev, "physmap platform flash device: %pR\n", ^ include/linux/dev_printk.h:148:2: note: expanded from macro 'dev_notice' dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ drivers/mtd/maps/physmap-core.c:525:7: note: Assuming field 'name' is non-null if (!info->maps[i].name) ^~~~~~~~~~~~~~~~~~~ drivers/mtd/maps/physmap-core.c:525:3: note: Taking false branch if (!info->maps[i].name) ^ drivers/mtd/maps/physmap-core.c:528:7: note: Assuming field 'phys' is not equal to 0 if (!info->maps[i].phys) ^~~~~~~~~~~~~~~~~~~ drivers/mtd/maps/physmap-core.c:528:3: note: Taking false branch if (!info->maps[i].phys) ^ drivers/mtd/maps/physmap-core.c:533:14: note: Field 'gpios' is null (info->gpios ? ^ drivers/mtd/maps/physmap-core.c:533:8: note: '?' condition is false (info->gpios ? ^ drivers/mtd/maps/physmap-core.c:532:24: note: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'unsigned long' info->maps[i].size = BIT(info->win_order + ^ include/vdso/bits.h:7:26: note: expanded from macro 'BIT' #define BIT(nr) (UL(1) << (nr)) ^ ~~~~ Suppressed 25 warnings (25 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. 48 warnings generated. >> fs/ufs/ialloc.c:145: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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ufs/ialloc.c:145: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(bh->b_data, 0, sb->s_blocksize); ^~~~~~ fs/ufs/ialloc.c:302: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(&ufsi->i_u1, 0, sizeof(ufsi->i_u1)); ^~~~~~ fs/ufs/ialloc.c:302: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(&ufsi->i_u1, 0, sizeof(ufsi->i_u1)); ^~~~~~ Suppressed 46 warnings (46 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. 25 warnings generated. drivers/mtd/nand/ecc.c:538: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(tweak->databuf.in, 0xFF, ctx->page_buffer_size); ^~~~~~ drivers/mtd/nand/ecc.c:538: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(tweak->databuf.in, 0xFF, ctx->page_buffer_size); ^~~~~~ drivers/mtd/nand/ecc.c:546: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(tweak->oobbuf.in, 0xFF, ctx->oob_buffer_size); ^~~~~~ drivers/mtd/nand/ecc.c:546: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(tweak->oobbuf.in, 0xFF, ctx->oob_buffer_size); ^~~~~~ drivers/mtd/nand/ecc.c:552:4: 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((void *)tweak->databuf.out + orig->dataoffs, ^~~~~~ drivers/mtd/nand/ecc.c:552:4: 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((void *)tweak->databuf.out + orig->dataoffs, ^~~~~~ drivers/mtd/nand/ecc.c:556:4: 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((void *)tweak->oobbuf.out + orig->ooboffs, ^~~~~~ drivers/mtd/nand/ecc.c:556:4: 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((void *)tweak->oobbuf.out + orig->ooboffs, ^~~~~~ drivers/mtd/nand/ecc.c:573:4: 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(orig->databuf.in, ^~~~~~ drivers/mtd/nand/ecc.c:573:4: 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(orig->databuf.in, ^~~~~~ drivers/mtd/nand/ecc.c:578:4: 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(orig->oobbuf.in, ^~~~~~ drivers/mtd/nand/ecc.c:578:4: 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(orig->oobbuf.in, ^~~~~~ Suppressed 19 warnings (19 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. 52 warnings generated. fs/xfs/libxfs/xfs_dir2_data.c:256:27: warning: Access to field 'count' results in a dereference of a null pointer (loaded from variable 'btp') [clang-analyzer-core.NullDereference] for (i = stale = 0; i < be32_to_cpu(btp->count); i++) { ^ include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu' #define be32_to_cpu __be32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:41:58: note: expanded from macro '__be32_to_cpu' #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) ^~ include/uapi/linux/swab.h:118:32: note: expanded from macro '__swab32' (__builtin_constant_p((__u32)(x)) ? \ ^ fs/xfs/libxfs/xfs_dir2_data.c:104:2: note: 'btp' initialized to a null pointer value xfs_dir2_block_tail_t *btp=NULL; /* block tail */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_data.c:123:6: note: Assuming 'dp' is null if (dp && !S_ISDIR(VFS_I(dp)->i_mode)) ^~ fs/xfs/libxfs/xfs_dir2_data.c:123:9: note: Left side of '&&' is false if (dp && !S_ISDIR(VFS_I(dp)->i_mode)) ^ fs/xfs/libxfs/xfs_dir2_data.c:129:2: note: Control jumps to 'case 860111960:' at line 139 switch (hdr->magic) { ^ fs/xfs/libxfs/xfs_dir2_data.c:141:3: note: Execution continues on line 145 break; ^ fs/xfs/libxfs/xfs_dir2_data.c:145:8: note: Calling 'xfs_dir3_data_end_offset' end = xfs_dir3_data_end_offset(geo, hdr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_data.c:1212:2: note: Control jumps to 'case 860111960:' at line 1217 switch (hdr->magic) { ^ fs/xfs/libxfs/xfs_dir2_data.c:1219:3: note: Returning without writing to 'geo->blksize', which participates in a condition later return geo->blksize; ^ fs/xfs/libxfs/xfs_dir2_data.c:1219:3: note: Returning value, which participates in a condition later return geo->blksize; ^~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_data.c:145:8: note: Returning from 'xfs_dir3_data_end_offset' end = xfs_dir3_data_end_offset(geo, hdr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_data.c:146:6: note: Assuming 'end' is not equal to 0 if (!end) ^~~~ fs/xfs/libxfs/xfs_dir2_data.c:146:2: note: Taking false branch if (!end) -- ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1009:1: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DECLARE_EVT(capacity_change_reported, CAPACITY_CHANGE_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1009:1: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 DECLARE_EVT(capacity_change_reported, CAPACITY_CHANGE_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1010:1: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DECLARE_EVT(soft_threshold_reached, SOFT_THRESHOLD_REACHED_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1010:1: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 DECLARE_EVT(soft_threshold_reached, SOFT_THRESHOLD_REACHED_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1011:1: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DECLARE_EVT(mode_parameter_change_reported, MODE_PARAMETER_CHANGE_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1011:1: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 DECLARE_EVT(mode_parameter_change_reported, MODE_PARAMETER_CHANGE_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1012:1: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] DECLARE_EVT(lun_change_reported, LUN_CHANGE_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1012:1: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 DECLARE_EVT(lun_change_reported, LUN_CHANGE_REPORTED) ^ drivers/scsi/scsi_sysfs.c:1001:2: note: expanded from macro 'DECLARE_EVT' DECLARE_EVT_SHOW(name, Cap_name) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_sysfs.c:981:9: note: expanded from macro 'DECLARE_EVT_SHOW' return snprintf(buf, 20, "%d\n", val); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1038:1: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sdev_show_function(queue_depth, "%d\n"); ^ drivers/scsi/scsi_sysfs.c:596:9: note: expanded from macro 'sdev_show_function' return snprintf (buf, 20, format_string, sdev->field); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1038:1: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 sdev_show_function(queue_depth, "%d\n"); ^ drivers/scsi/scsi_sysfs.c:596:9: note: expanded from macro 'sdev_show_function' return snprintf (buf, 20, format_string, sdev->field); \ ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1193:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, 20, "%u\n", ^~~~~~~~ drivers/scsi/scsi_sysfs.c:1193:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, 20, "%u\n", ^~~~~~~~ Suppressed 47 warnings (47 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. 52 warnings generated. >> fs/hpfs/anode.c:137:4: 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(&anode->u, &btree->u, btree->n_used_nodes * 12); ^~~~~~ fs/hpfs/anode.c:137:4: 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(&anode->u, &btree->u, btree->n_used_nodes * 12); ^~~~~~ fs/hpfs/anode.c:241: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(&ranode->btree, btree, le16_to_cpu(btree->first_free)); ^~~~~~ fs/hpfs/anode.c:241: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(&ranode->btree, btree, le16_to_cpu(btree->first_free)); ^~~~~~ fs/hpfs/anode.c:354:3: 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(buf, data + (pos & 0x1ff), l); ^~~~~~ fs/hpfs/anode.c:354:3: 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(buf, data + (pos & 0x1ff), l); ^~~~~~ fs/hpfs/anode.c:377:3: 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 + (pos & 0x1ff), buf, l); ^~~~~~ fs/hpfs/anode.c:377:3: 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 + (pos & 0x1ff), buf, l); ^~~~~~ Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. drivers/regulator/mp886x.c:134:6: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] val >>= ffs(rdev->desc->vsel_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/mp886x.c:123:6: note: Assuming 'ret' is 0 if (ret) ^~~ drivers/regulator/mp886x.c:123:2: note: Taking false branch if (ret) ^ drivers/regulator/mp886x.c:127:6: note: Assuming 'fbloop' is false if (fbloop) { ^~~~~~ drivers/regulator/mp886x.c:127:2: note: Taking false branch if (fbloop) { ^ drivers/regulator/mp886x.c:134:6: note: Assigned value is garbage or undefined val >>= ffs(rdev->desc->vsel_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/mp886x.c:207:6: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] val >>= ffs(rdev->desc->vsel_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/mp886x.c:201:6: note: Assuming 'ret' is 0 if (ret) ^~~ drivers/regulator/mp886x.c:201:2: note: Taking false branch if (ret) ^ drivers/regulator/mp886x.c:207:6: note: Assigned value is garbage or undefined val >>= ffs(rdev->desc->vsel_mask) - 1; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. drivers/crypto/virtio/virtio_crypto_core.c:82:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(vi->data_vq[i].name, sizeof(vi->data_vq[i].name), ^~~~~~~~ drivers/crypto/virtio/virtio_crypto_core.c:82:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(vi->data_vq[i].name, sizeof(vi->data_vq[i].name), ^~~~~~~~ Suppressed 34 warnings (34 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. 47 warnings generated. Suppressed 47 warnings (47 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. 49 warnings generated. fs/xfs/libxfs/xfs_ialloc_btree.c:103: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(&args, 0, sizeof(args)); ^~~~~~ fs/xfs/libxfs/xfs_ialloc_btree.c:103: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(&args, 0, sizeof(args)); ^~~~~~ Suppressed 48 warnings (48 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. 50 warnings generated. fs/xfs/libxfs/xfs_iext_tree.c:528:18: warning: Array access (via field 'keys') results in a null pointer dereference [clang-analyzer-core.NullDereference] node->keys[pos] = offset; ^ fs/xfs/libxfs/xfs_iext_tree.c:638:6: note: Assuming field 'if_height' is not equal to 0 if (ifp->if_height == 0) ^~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:638:2: note: Taking false branch if (ifp->if_height == 0) -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:648:2: note: Taking true branch if (nr_entries == RECS_PER_LEAF) ^ fs/xfs/libxfs/xfs_iext_tree.c:655:19: note: 'new' is equal to field 'leaf' if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) { ^~~ fs/xfs/libxfs/xfs_iext_tree.c:655:23: note: Left side of '&&' is false if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) { ^ fs/xfs/libxfs/xfs_iext_tree.c:660:2: note: Loop condition is false. Execution continues on line 662 for (i = nr_entries; i > cur->pos; i--) ^ fs/xfs/libxfs/xfs_iext_tree.c:667:6: note: 'new' is non-null if (new) ^~~ fs/xfs/libxfs/xfs_iext_tree.c:667:2: note: Taking true branch if (new) ^ fs/xfs/libxfs/xfs_iext_tree.c:668:3: note: Calling 'xfs_iext_insert_node' xfs_iext_insert_node(ifp, xfs_iext_leaf_key(new, 0), new, 2); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:503:6: note: Assuming 'level' is <= field 'if_height' if (ifp->if_height < level) ^~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:503:2: note: Taking false branch if (ifp->if_height < level) ^ fs/xfs/libxfs/xfs_iext_tree.c:507:2: note: Value assigned to 'node' node = xfs_iext_find_level(ifp, offset, level); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:511:9: note: Assuming 'pos' is >= 'nr_entries' ASSERT(pos >= nr_entries || xfs_iext_key_cmp(node, pos, offset) != 0); ^ fs/xfs/xfs_linux.h:215:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_iext_tree.c:511:27: note: Left side of '||' is true ASSERT(pos >= nr_entries || xfs_iext_key_cmp(node, pos, offset) != 0); ^ fs/xfs/libxfs/xfs_iext_tree.c:511:2: note: '?' condition is true ASSERT(pos >= nr_entries || xfs_iext_key_cmp(node, pos, offset) != 0); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_iext_tree.c:512:9: note: Assuming 'nr_entries' is <= KEYS_PER_NODE ASSERT(nr_entries <= KEYS_PER_NODE); ^ fs/xfs/xfs_linux.h:215:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_iext_tree.c:512:2: note: '?' condition is true ASSERT(nr_entries <= KEYS_PER_NODE); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_iext_tree.c:514:6: note: Assuming 'nr_entries' is not equal to KEYS_PER_NODE if (nr_entries == KEYS_PER_NODE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:514:2: note: Taking false branch if (nr_entries == KEYS_PER_NODE) ^ fs/xfs/libxfs/xfs_iext_tree.c:521:6: note: Assuming 'node' is equal to 'new' if (node != new && pos == 0 && nr_entries > 0) ^~~~~~~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:521:18: note: Left side of '&&' is false if (node != new && pos == 0 && nr_entries > 0) ^ fs/xfs/libxfs/xfs_iext_tree.c:524:23: note: 'i' is <= 'pos' for (i = nr_entries; i > pos; i--) { ^ fs/xfs/libxfs/xfs_iext_tree.c:524:2: note: Loop condition is false. Execution continues on line 528 for (i = nr_entries; i > pos; i--) { ^ fs/xfs/libxfs/xfs_iext_tree.c:528:18: note: Array access (via field 'keys') results in a null pointer dereference node->keys[pos] = offset; ~~~~ ^ fs/xfs/libxfs/xfs_iext_tree.c:607: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(new + ifp->if_bytes, 0, new_size - ifp->if_bytes); ^~~~~~ fs/xfs/libxfs/xfs_iext_tree.c:607: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(new + ifp->if_bytes, 0, new_size - ifp->if_bytes); ^~~~~~ Suppressed 48 warnings (48 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. 50 warnings generated. >> drivers/video/backlight/adp8870_bl.c:555:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", reg_val); ^~~~~~~ drivers/video/backlight/adp8870_bl.c:555:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", reg_val); ^~~~~~~ drivers/video/backlight/adp8870_bl.c:756:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ret_val); ^~~~~~~ drivers/video/backlight/adp8870_bl.c:756:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ret_val); ^~~~~~~ drivers/video/backlight/adp8870_bl.c:775:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ drivers/video/backlight/adp8870_bl.c:775:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ >> drivers/video/backlight/adp8870_bl.c:883: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(&props, 0, sizeof(props)); ^~~~~~ drivers/video/backlight/adp8870_bl.c:883: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(&props, 0, sizeof(props)); ^~~~~~ Suppressed 46 warnings (46 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. 49 warnings generated. Suppressed 49 warnings (49 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. 53 warnings generated. drivers/md/dm-kcopyd.c:246:10: warning: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'pl') [clang-analyzer-core.NullDereference] next = pl->next; ^ drivers/md/dm-kcopyd.c:913:6: note: Assuming 'kc' is non-null if (!kc) ^~~ drivers/md/dm-kcopyd.c:913:2: note: Taking false branch if (!kc) ^ drivers/md/dm-kcopyd.c:916:2: note: Loop condition is false. Exiting loop spin_lock_init(&kc->job_lock); ^ include/linux/spinlock.h:329:35: note: expanded from macro 'spin_lock_init' # define spin_lock_init(lock) \ ^ drivers/md/dm-kcopyd.c:924:6: note: Assuming 'r' is 0 if (r) ^ drivers/md/dm-kcopyd.c:924:2: note: Taking false branch if (r) ^ drivers/md/dm-kcopyd.c:927:2: note: Loop condition is false. Exiting loop INIT_WORK(&kc->kcopyd_work, do_work); ^ include/linux/workqueue.h:245:2: note: expanded from macro 'INIT_WORK' __INIT_WORK((_work), (_func), 0) ^ include/linux/workqueue.h:225:2: note: expanded from macro '__INIT_WORK' do { \ ^ drivers/md/dm-kcopyd.c:929:6: note: Assuming field 'kcopyd_wq' is non-null if (!kc->kcopyd_wq) { ^~~~~~~~~~~~~~ drivers/md/dm-kcopyd.c:929:2: note: Taking false branch if (!kc->kcopyd_wq) { ^ drivers/md/dm-kcopyd.c:939:6: note: Calling 'client_reserve_pages' r = client_reserve_pages(kc, reserve_pages); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-kcopyd.c:309:20: note: 'pl' initialized to a null pointer value struct page_list *pl = NULL, *next; ^~ drivers/md/dm-kcopyd.c:311:14: note: Assuming 'i' is >= 'nr_pages' for (i = 0; i < nr_pages; i++) { ^~~~~~~~~~~~ drivers/md/dm-kcopyd.c:311:2: note: Loop condition is false. Execution continues on line 322 for (i = 0; i < nr_pages; i++) { ^ drivers/md/dm-kcopyd.c:323:23: note: Passing null pointer value via 2nd parameter 'pl' kcopyd_put_pages(kc, pl); ^~ drivers/md/dm-kcopyd.c:323:2: note: Calling 'kcopyd_put_pages' kcopyd_put_pages(kc, pl); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-kcopyd.c:246:10: note: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'pl') next = pl->next; ^~ drivers/md/dm-kcopyd.c:794: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(&job->dests, dests, sizeof(*dests) * num_dests); ^~~~~~ drivers/md/dm-kcopyd.c:794: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(&job->dests, dests, sizeof(*dests) * num_dests); ^~~~~~ drivers/md/dm-kcopyd.c:822: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(&job->source, 0, sizeof job->source); ^~~~~~ drivers/md/dm-kcopyd.c:822: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(&job->source, 0, sizeof job->source); ^~~~~~ drivers/md/dm-kcopyd.c:866: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(job, 0, sizeof(struct kcopyd_job)); ^~~~~~ drivers/md/dm-kcopyd.c:866: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(job, 0, sizeof(struct kcopyd_job)); ^~~~~~ Suppressed 49 warnings (49 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/regulator/pfuze100-regulator.c:763: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(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, ^~~~~~ drivers/regulator/pfuze100-regulator.c:763: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(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 35 warnings generated. drivers/leds/leds-netxbig.c:265:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", led_dat->sata); ^~~~~~~ drivers/leds/leds-netxbig.c:265:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", led_dat->sata); ^~~~~~~ Suppressed 34 warnings (34 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. 20 warnings generated. drivers/leds/leds-ns2.c:164:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", led->sata); ^~~~~~~ drivers/leds/leds-ns2.c:164:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", led->sata); ^~~~~~~ Suppressed 19 warnings (19 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. 17 warnings generated. >> lib/test-string_helpers.c:80:3: 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(&in[p], s, len); ^~~~~~ lib/test-string_helpers.c:80:3: 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(&in[p], s, len); ^~~~~~ lib/test-string_helpers.c:88:3: 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(&out_test[q_test], s, len); ^~~~~~ lib/test-string_helpers.c:88:3: 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(&out_test[q_test], s, len); ^~~~~~ lib/test-string_helpers.c:95:3: 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(out_real, in, p); ^~~~~~ lib/test-string_helpers.c:95:3: 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(out_real, in, p); ^~~~~~ lib/test-string_helpers.c:454:3: 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(&in[p], s2->in, len); ^~~~~~ lib/test-string_helpers.c:454:3: 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(&in[p], s2->in, len); ^~~~~~ lib/test-string_helpers.c:459:3: 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(&out_test[q_test], out, len); ^~~~~~ lib/test-string_helpers.c:459:3: 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(&out_test[q_test], out, len); ^~~~~~ Suppressed 12 warnings (12 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. 33 warnings generated. >> drivers/char/xillybus/xillybus_class.c:66:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(unit->name, UNITNAMELEN, "%s", prefix); ^~~~~~~~ drivers/char/xillybus/xillybus_class.c:66:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(unit->name, UNITNAMELEN, "%s", prefix); ^~~~~~~~ drivers/char/xillybus/xillybus_class.c:69:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(unit->name, UNITNAMELEN, "%s_%02d", ^~~~~~~~ drivers/char/xillybus/xillybus_class.c:69:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(unit->name, UNITNAMELEN, "%s_%02d", ^~~~~~~~ drivers/char/xillybus/xillybus_class.c:118:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(devname, sizeof(devname), "%s_%s", ^~~~~~~~ drivers/char/xillybus/xillybus_class.c:118:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(devname, sizeof(devname), "%s_%s", ^~~~~~~~ Suppressed 30 warnings (30 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 31 warnings generated. Suppressed 31 warnings (31 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. 19 warnings generated. Suppressed 19 warnings (19 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. 34 warnings generated. Suppressed 34 warnings (34 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. 59 warnings generated. >> drivers/staging/fbtft/fbtft-core.c:660:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(info->fix.id, sizeof(info->fix.id), "%s", dev->driver->name); ^~~~~~~~ drivers/staging/fbtft/fbtft-core.c:660:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(info->fix.id, sizeof(info->fix.id), "%s", dev->driver->name); ^~~~~~~~ >> drivers/staging/fbtft/fbtft-core.c:841:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(text1, ", %zu KiB buffer memory", par->txbuf.len >> 10); ^~~~~~~ drivers/staging/fbtft/fbtft-core.c:841:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(text1, ", %zu KiB buffer memory", par->txbuf.len >> 10); ^~~~~~~ drivers/staging/fbtft/fbtft-core.c:843:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num, ^~~~~~~ drivers/staging/fbtft/fbtft-core.c:843:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num, ^~~~~~~ drivers/staging/fbtft/fbtft-core.c:880:6: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] if (par->fbtftops.unregister_backlight) ^ drivers/staging/fbtft/fbtft-core.c:1321:6: note: Assuming 'par' is null if (par) ^~~ drivers/staging/fbtft/fbtft-core.c:1321:2: note: Taking false branch if (par) ^ drivers/staging/fbtft/fbtft-core.c:1324:2: note: Calling 'fbtft_unregister_framebuffer' fbtft_unregister_framebuffer(info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:878:2: note: 'par' initialized to a null pointer value struct fbtft_par *par = fb_info->par; ^~~~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:880:6: note: Dereference of null pointer if (par->fbtftops.unregister_backlight) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:943:4: warning: 3rd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] par->fbtftops.write_register(par, i, ^ drivers/staging/fbtft/fbtft-core.c:903:6: note: Assuming 'count' is >= 0 if (count < 0) ^~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:903:2: note: Taking false branch if (count < 0) ^ drivers/staging/fbtft/fbtft-core.c:905:6: note: Assuming 'count' is not equal to 0 if (count == 0) ^~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:905:2: note: Taking false branch if (count == 0) ^ drivers/staging/fbtft/fbtft-core.c:908:11: note: Calling 'kmalloc_array' values = kmalloc_array(count + 1, sizeof(*values), GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:617:2: note: Taking false branch if (unlikely(check_mul_overflow(n, size, &bytes))) ^ include/linux/slab.h:619:30: note: Left side of '&&' is false if (__builtin_constant_p(n) && __builtin_constant_p(size)) ^ include/linux/slab.h:621:2: note: Returning pointer, which participates in a condition later return __kmalloc(bytes, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:908:11: note: Returning from 'kmalloc_array' values = kmalloc_array(count + 1, sizeof(*values), GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:909:6: note: Assuming 'values' is non-null if (!values) ^~~~~~~ drivers/staging/fbtft/fbtft-core.c:909:2: note: Taking false branch if (!values) ^ drivers/staging/fbtft/fbtft-core.c:913:6: note: Assuming 'ret' is 0 if (ret) ^~~ drivers/staging/fbtft/fbtft-core.c:913:2: note: Taking false branch if (ret) ^ drivers/staging/fbtft/fbtft-core.c:921:9: note: 'index' is < 'count' while (index < count) { ^~~~~ drivers/staging/fbtft/fbtft-core.c:921:2: note: Loop condition is true. Entering loop body while (index < count) { ^ drivers/staging/fbtft/fbtft-core.c:922:7: note: Assuming the condition is true if (val & FBTFT_OF_INIT_CMD) { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:922:3: note: Taking true branch if (val & FBTFT_OF_INIT_CMD) { ^ drivers/staging/fbtft/fbtft-core.c:925:12: note: 'index' is < 'count' while ((index < count) && !(val & 0xFFFF0000)) { ^~~~~ drivers/staging/fbtft/fbtft-core.c:925:11: note: Left side of '&&' is true while ((index < count) && !(val & 0xFFFF0000)) { ^ drivers/staging/fbtft/fbtft-core.c:925:30: note: Assuming the condition is false while ((index < count) && !(val & 0xFFFF0000)) { ^~~~~~~~~~~~~~~~~~~ drivers/staging/fbtft/fbtft-core.c:925:4: note: Loop condition is false. Execution continues on line 937 while ((index < count) && !(val & 0xFFFF0000)) { ^ drivers/staging/fbtft/fbtft-core.c:937:4: note: Assuming the condition is true fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, ^ drivers/staging/fbtft/fbtft.h:452:6: note: expanded from macro 'fbtft_par_dbg' if (unlikely((par)->debug & (level))) \ -- ^ drivers/staging/fbtft/fbtft-core.c:1044:4: note: Loop condition is true. Entering loop body while (par->init_sequence[i] >= 0) { ^ drivers/staging/fbtft/fbtft-core.c:1045:9: note: 'j' is <= 63 if (j > 63) { ^ drivers/staging/fbtft/fbtft-core.c:1045:5: note: Taking false branch if (j > 63) { ^ drivers/staging/fbtft/fbtft-core.c:1044:4: note: Loop condition is true. Entering loop body while (par->init_sequence[i] >= 0) { ^ drivers/staging/fbtft/fbtft-core.c:1045:9: note: 'j' is <= 63 if (j > 63) { ^ drivers/staging/fbtft/fbtft-core.c:1045:5: note: Taking false branch if (j > 63) { ^ drivers/staging/fbtft/fbtft-core.c:1044:4: note: Loop condition is true. Entering loop body while (par->init_sequence[i] >= 0) { ^ drivers/staging/fbtft/fbtft-core.c:1045:9: note: 'j' is <= 63 if (j > 63) { ^ drivers/staging/fbtft/fbtft-core.c:1045:5: note: Taking false branch if (j > 63) { ^ drivers/staging/fbtft/fbtft-core.c:1044:4: note: Loop condition is false. Execution continues on line 1053 while (par->init_sequence[i] >= 0) { ^ drivers/staging/fbtft/fbtft-core.c:1053:4: note: 6th function call argument is an uninitialized value par->fbtftops.write_register(par, j, ^ Suppressed 47 warnings (47 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. 34 warnings generated. Suppressed 34 warnings (34 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. 22 warnings generated. Suppressed 22 warnings (22 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. 17 warnings generated. drivers/fpga/altera-pr-ip-core.c:188:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores] val = readl(priv->reg_base + ALT_PR_CSR_OFST); ^ drivers/fpga/altera-pr-ip-core.c:188:2: note: Value stored to 'val' is never read Suppressed 16 warnings (16 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. 22 warnings generated. Suppressed 22 warnings (22 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. 21 warnings generated. drivers/fpga/fpga-bridge.c:289:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", bridge->name); ^~~~~~~ drivers/fpga/fpga-bridge.c:289:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", bridge->name); ^~~~~~~ drivers/fpga/fpga-bridge.c:301:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", enable ? "enabled" : "disabled"); ^~~~~~~ drivers/fpga/fpga-bridge.c:301:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", enable ? "enabled" : "disabled"); ^~~~~~~ Suppressed 19 warnings (19 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. 24 warnings generated. drivers/fpga/altera-freeze-bridge.c:69:4: warning: Value stored to 'ctrl' is never read [clang-analyzer-deadcode.DeadStores] ctrl = readl(priv->base_addr + FREEZE_CSR_CTRL_OFFSET); ^ drivers/fpga/altera-freeze-bridge.c:69:4: note: Value stored to 'ctrl' is never read drivers/fpga/altera-freeze-bridge.c:150:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = readl(priv->base_addr + FREEZE_CSR_STATUS_OFFSET); ^ drivers/fpga/altera-freeze-bridge.c:150:2: note: Value stored to 'status' is never read Suppressed 22 warnings (22 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/power/supply/bq2515x_charger.c:1095:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(bq2515x->model_name, id->name, I2C_NAME_SIZE); ^~~~~~~ drivers/power/supply/bq2515x_charger.c:1095:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(bq2515x->model_name, id->name, I2C_NAME_SIZE); ^~~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 50 warnings generated. >> fs/hpfs/map.c:100: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(cp_table, ptr, 128); ^~~~~~ fs/hpfs/map.c:100: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(cp_table, ptr, 128); ^~~~~~ fs/hpfs/map.c:128:3: 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((char *)b + 512 * i, d, 512); ^~~~~~ fs/hpfs/map.c:128:3: 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((char *)b + 512 * i, d, 512); ^~~~~~ Suppressed 48 warnings (48 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. 63 warnings generated. drivers/target/target_core_pscsi.c:144: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(cdb, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/target/target_core_pscsi.c:144: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(cdb, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/target/target_core_pscsi.c:173:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(wwn->vendor, sizeof(wwn->vendor), ^~~~~~~~ drivers/target/target_core_pscsi.c:173:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(wwn->vendor, sizeof(wwn->vendor), ^~~~~~~~ drivers/target/target_core_pscsi.c:176:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(wwn->model, sizeof(wwn->model), ^~~~~~~~ drivers/target/target_core_pscsi.c:176:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(wwn->model, sizeof(wwn->model), ^~~~~~~~ drivers/target/target_core_pscsi.c:179:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(wwn->revision, sizeof(wwn->revision), ^~~~~~~~ drivers/target/target_core_pscsi.c:179:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(wwn->revision, sizeof(wwn->revision), ^~~~~~~~ drivers/target/target_core_pscsi.c:193: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(cdb, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/target/target_core_pscsi.c:193: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(cdb, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/target/target_core_pscsi.c:204:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(&wwn->unit_serial[0], INQUIRY_VPD_SERIAL_LEN, "%s", &buf[4]); ^~~~~~~~ drivers/target/target_core_pscsi.c:204:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(&wwn->unit_serial[0], INQUIRY_VPD_SERIAL_LEN, "%s", &buf[4]); ^~~~~~~~ drivers/target/target_core_pscsi.c:228: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(cdb, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/target/target_core_pscsi.c:228: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(cdb, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/target/target_core_pscsi.c:355:25: warning: Value stored to 'phv' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct pscsi_hba_virt *phv = dev->se_hba->hba_ptr; ^~~ ~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_pscsi.c:355:25: note: Value stored to 'phv' during its initialization is never read struct pscsi_hba_virt *phv = dev->se_hba->hba_ptr; ^~~ ~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_pscsi.c:400:25: warning: Value stored to 'phv' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct pscsi_hba_virt *phv = dev->se_hba->hba_ptr; ^~~ ~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_pscsi.c:400:25: note: Value stored to 'phv' during its initialization is never read struct pscsi_hba_virt *phv = dev->se_hba->hba_ptr; ^~~ ~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_pscsi.c:802:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(host_id, 16, "%d", pdv->pdv_host_id); ^~~~~~~~ drivers/target/target_core_pscsi.c:802:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(host_id, 16, "%d", pdv->pdv_host_id); ^~~~~~~~ drivers/target/target_core_pscsi.c:804:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(host_id, 16, "PHBA Mode"); ^~~~~~~~ drivers/target/target_core_pscsi.c:804:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(host_id, 16, "PHBA Mode"); ^~~~~~~~ drivers/target/target_core_pscsi.c:806:7: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl = sprintf(b, "SCSI Device Bus Location:" ^~~~~~~ drivers/target/target_core_pscsi.c:806:7: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 bl = sprintf(b, "SCSI Device Bus Location:" ^~~~~~~ drivers/target/target_core_pscsi.c:812:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " Vendor: %." ^~~~~~~ drivers/target/target_core_pscsi.c:812:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, " Vendor: %." ^~~~~~~ drivers/target/target_core_pscsi.c:814:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " Model: %." ^~~~~~~ drivers/target/target_core_pscsi.c:814:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, " Model: %." ^~~~~~~ drivers/target/target_core_pscsi.c:816:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " Rev: %." -- ^ drivers/target/loopback/tcm_loop.c:693:6: note: Assuming 'val' is equal to 0 if (val != 0 && val != 1 && val != 3) { ^~~~~~~~ drivers/target/loopback/tcm_loop.c:693:15: note: Left side of '&&' is false if (val != 0 && val != 1 && val != 3) { ^ drivers/target/loopback/tcm_loop.c:697:30: note: Access to field 'tl_fabric_prot_type' results in a dereference of a null pointer (loaded from variable 'tl_tpg') tl_tpg->tl_fabric_prot_type = val; ~~~~~~ ^ drivers/target/loopback/tcm_loop.c:725:23: warning: Value stored to 'tl_hba' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; ^~~~~~ ~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:725:23: note: Value stored to 'tl_hba' during its initialization is never read struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; ^~~~~~ ~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:798:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%s\n", ^~~~~~~~ drivers/target/loopback/tcm_loop.c:798:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%s\n", ^~~~~~~~ drivers/target/loopback/tcm_loop.c:830:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(&i_port[0], TL_WWN_ADDR_LEN, "%s", page); ^~~~~~~~ drivers/target/loopback/tcm_loop.c:830:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(&i_port[0], TL_WWN_ADDR_LEN, "%s", page); ^~~~~~~~ drivers/target/loopback/tcm_loop.c:900:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%s\n", status); ^~~~~~~~ drivers/target/loopback/tcm_loop.c:900:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%s\n", status); ^~~~~~~~ drivers/target/loopback/tcm_loop.c:913:31: warning: Access to field 'tl_transport_status' results in a dereference of a null pointer (loaded from variable 'tl_tpg') [clang-analyzer-core.NullDereference] tl_tpg->tl_transport_status = TCM_TRANSPORT_ONLINE; ~~~~~~ ^ drivers/target/loopback/tcm_loop.c:909:2: note: 'tl_tpg' initialized to a null pointer value struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:912:2: note: Taking true branch if (!strncmp(page, "online", 6)) { ^ drivers/target/loopback/tcm_loop.c:913:31: note: Access to field 'tl_transport_status' results in a dereference of a null pointer (loaded from variable 'tl_tpg') tl_tpg->tl_transport_status = TCM_TRANSPORT_ONLINE; ~~~~~~ ^ drivers/target/loopback/tcm_loop.c:936:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%d:0:%d\n", ^~~~~~~~ drivers/target/loopback/tcm_loop.c:936:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%d:0:%d\n", ^~~~~~~~ drivers/target/loopback/tcm_loop.c:993:17: warning: Value stored to 'wwn' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct se_wwn *wwn = se_tpg->se_tpg_wwn; ^~~ ~~~~~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:993:17: note: Value stored to 'wwn' during its initialization is never read struct se_wwn *wwn = se_tpg->se_tpg_wwn; ^~~ ~~~~~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:999:2: warning: Value stored to 'tl_hba' is never read [clang-analyzer-deadcode.DeadStores] tl_hba = tl_tpg->tl_hba; ^ ~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:999:2: note: Value stored to 'tl_hba' is never read tl_hba = tl_tpg->tl_hba; ^ ~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:1000:2: warning: Value stored to 'tpgt' is never read [clang-analyzer-deadcode.DeadStores] tpgt = tl_tpg->tl_tpgt; ^ ~~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:1000:2: note: Value stored to 'tpgt' is never read tpgt = tl_tpg->tl_tpgt; ^ ~~~~~~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:1067:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(&tl_hba->tl_wwn_address[0], TL_WWN_ADDR_LEN, "%s", &name[off]); ^~~~~~~~ drivers/target/loopback/tcm_loop.c:1067:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(&tl_hba->tl_wwn_address[0], TL_WWN_ADDR_LEN, "%s", &name[off]); ^~~~~~~~ drivers/target/loopback/tcm_loop.c:1078:2: warning: Value stored to 'sh' is never read [clang-analyzer-deadcode.DeadStores] sh = tl_hba->sh; ^ ~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:1078:2: note: Value stored to 'sh' is never read sh = tl_hba->sh; ^ ~~~~~~~~~~ drivers/target/loopback/tcm_loop.c:1108:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "TCM Loopback Fabric module %s\n", TCM_LOOP_VERSION); ^~~~~~~ drivers/target/loopback/tcm_loop.c:1108:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "TCM Loopback Fabric module %s\n", TCM_LOOP_VERSION); ^~~~~~~ Suppressed 47 warnings (47 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. 49 warnings generated. fs/fat/namei_msdos.c:236: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(de.name, name, MSDOS_NAME); ^~~~~~ fs/fat/namei_msdos.c:236: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(de.name, name, MSDOS_NAME); ^~~~~~ Suppressed 48 warnings (48 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. 47 warnings generated. >> fs/bfs/inode.c:187: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(di, 0, sizeof(struct bfs_inode)); ^~~~~~ fs/bfs/inode.c:187: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(di, 0, sizeof(struct bfs_inode)); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. >> fs/bfs/file.c:42: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(new->b_data, bh->b_data, bh->b_size); ^~~~~~ fs/bfs/file.c:42: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(new->b_data, bh->b_data, bh->b_size); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 22 warnings generated. Suppressed 22 warnings (22 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. 50 warnings generated. drivers/leds/leds-bd2802.c:437:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "on\n"); ^~~~~~~ drivers/leds/leds-bd2802.c:437:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "on\n"); ^~~~~~~ drivers/leds/leds-bd2802.c:439:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "off\n"); ^~~~~~~ drivers/leds/leds-bd2802.c:439:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "off\n"); ^~~~~~~ drivers/leds/leds-bd2802.c:508:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] BD2802_CONTROL_ATTR(wave_pattern, "wave_pattern"); ^ drivers/leds/leds-bd2802.c:479:8: note: expanded from macro 'BD2802_CONTROL_ATTR' ret = sprintf(buf, "0x%02x\n", led->attr_name); \ ^~~~~~~ drivers/leds/leds-bd2802.c:508:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 BD2802_CONTROL_ATTR(wave_pattern, "wave_pattern"); ^ drivers/leds/leds-bd2802.c:479:8: note: expanded from macro 'BD2802_CONTROL_ATTR' ret = sprintf(buf, "0x%02x\n", led->attr_name); \ ^~~~~~~ drivers/leds/leds-bd2802.c:509:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] BD2802_CONTROL_ATTR(rgb_current, "rgb_current"); ^ drivers/leds/leds-bd2802.c:479:8: note: expanded from macro 'BD2802_CONTROL_ATTR' ret = sprintf(buf, "0x%02x\n", led->attr_name); \ ^~~~~~~ drivers/leds/leds-bd2802.c:509:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 BD2802_CONTROL_ATTR(rgb_current, "rgb_current"); ^ drivers/leds/leds-bd2802.c:479:8: note: expanded from macro 'BD2802_CONTROL_ATTR' ret = sprintf(buf, "0x%02x\n", led->attr_name); \ ^~~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. >> drivers/regulator/ltc3676.c:314: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(descs, ltc3676_regulators, sizeof(ltc3676_regulators)); ^~~~~~ drivers/regulator/ltc3676.c:314: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(descs, ltc3676_regulators, sizeof(ltc3676_regulators)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/regulator/max8660.c:396: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(of_node, 0, sizeof(of_node)); ^~~~~~ drivers/regulator/max8660.c:396: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(of_node, 0, sizeof(of_node)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/leds/leds-lp3952.c:104:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(dest, str, LP3952_LABEL_MAX_LEN); ^~~~~~~ drivers/leds/leds-lp3952.c:104:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(dest, str, LP3952_LABEL_MAX_LEN); ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/leds/leds-pca9532.c:516:23: warning: Value stored to 'data' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct pca9532_data *data = i2c_get_clientdata(client); ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/leds-pca9532.c:516:23: note: Value stored to 'data' during its initialization is never read struct pca9532_data *data = i2c_get_clientdata(client); ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. drivers/leds/leds-pca963x.c:344:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(default_label, sizeof(default_label), "%d:%.2x:%u", ^~~~~~~~ drivers/leds/leds-pca963x.c:344:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(default_label, sizeof(default_label), "%d:%.2x:%u", ^~~~~~~~ Suppressed 46 warnings (46 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. 21 warnings generated. drivers/leds/leds-pwm.c:141: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(&led, 0, sizeof(led)); ^~~~~~ drivers/leds/leds-pwm.c:141: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(&led, 0, sizeof(led)); ^~~~~~ drivers/leds/leds-pwm.c:146:15: warning: Access to field 'name' results in a dereference of a null pointer [clang-analyzer-core.NullDereference] led.name = to_of_node(fwnode)->name; ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ drivers/leds/leds-pwm.c:180:6: note: Assuming 'count' is not equal to 0 if (!count) ^~~~~~ drivers/leds/leds-pwm.c:180:2: note: Taking false branch if (!count) ^ drivers/leds/leds-pwm.c:185:6: note: Assuming 'priv' is non-null if (!priv) ^~~~~ drivers/leds/leds-pwm.c:185:2: note: Taking false branch if (!priv) ^ drivers/leds/leds-pwm.c:188:8: note: Calling 'led_pwm_create_fwnode' ret = led_pwm_create_fwnode(&pdev->dev, priv); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/leds-pwm.c:143:2: note: Loop condition is true. Entering loop body device_for_each_child_node(dev, fwnode) { ^ include/linux/property.h:112:2: note: expanded from macro 'device_for_each_child_node' for (child = device_get_next_child_node(dev, NULL); child; \ ^ drivers/leds/leds-pwm.c:145:7: note: Assuming 'ret' is not equal to 0 if (ret && is_of_node(fwnode)) ^~~ drivers/leds/leds-pwm.c:145:7: note: Left side of '&&' is true drivers/leds/leds-pwm.c:145:14: note: Assuming the condition is true if (ret && is_of_node(fwnode)) ^~~~~~~~~~~~~~~~~~ drivers/leds/leds-pwm.c:145:3: note: Taking true branch if (ret && is_of_node(fwnode)) ^ drivers/leds/leds-pwm.c:146:15: note: Assuming the condition is false led.name = to_of_node(fwnode)->name; ^ include/linux/of.h:164:3: note: expanded from macro 'to_of_node' is_of_node(__to_of_node_fwnode) ? \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/leds-pwm.c:146:15: note: '?' condition is false led.name = to_of_node(fwnode)->name; ^ include/linux/of.h:164:3: note: expanded from macro 'to_of_node' is_of_node(__to_of_node_fwnode) ? \ ^ drivers/leds/leds-pwm.c:146:15: note: Access to field 'name' results in a dereference of a null pointer led.name = to_of_node(fwnode)->name; ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^ Suppressed 19 warnings (19 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. 39 warnings generated. drivers/mfd/sm501.c:513:16: warning: Value stored to 'mode' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned long mode = smc501_readl(sm->regs + SM501_POWER_MODE_CONTROL); ^~~~ drivers/mfd/sm501.c:513:16: note: Value stored to 'mode' during its initialization is never read unsigned long mode = smc501_readl(sm->regs + SM501_POWER_MODE_CONTROL); ^~~~ drivers/mfd/sm501.c:514:16: warning: Value stored to 'gate' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned long gate = smc501_readl(sm->regs + SM501_CURRENT_GATE); ^~~~ drivers/mfd/sm501.c:514:16: note: Value stored to 'gate' during its initialization is never read unsigned long gate = smc501_readl(sm->regs + SM501_CURRENT_GATE); ^~~~ drivers/mfd/sm501.c:515:16: warning: Value stored to 'clock' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned long clock = smc501_readl(sm->regs + SM501_CURRENT_CLOCK); ^~~~~ drivers/mfd/sm501.c:515:16: note: Value stored to 'clock' during its initialization is never read unsigned long clock = smc501_readl(sm->regs + SM501_CURRENT_CLOCK); ^~~~~ >> drivers/mfd/sm501.c:1207:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(ptr, "%08x = %08x\n", ^~~~~~~ drivers/mfd/sm501.c:1207:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(ptr, "%08x = %08x\n", ^~~~~~~ Suppressed 35 warnings (34 in non-user code, 1 with check filters). 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. Suppressed 35 warnings (35 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. 40 warnings generated. drivers/mtd/ubi/debug.c:204: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(nm, req->name, 16); ^~~~~~ drivers/mtd/ubi/debug.c:204: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(nm, req->name, 16); ^~~~~~ drivers/mtd/ubi/debug.c:276:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "%u\n", d->emulate_power_cut); ^~~~~~~~ drivers/mtd/ubi/debug.c:276:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "%u\n", d->emulate_power_cut); ^~~~~~~~ drivers/mtd/ubi/debug.c:281:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "%u\n", d->power_cut_min); ^~~~~~~~ drivers/mtd/ubi/debug.c:281:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "%u\n", d->power_cut_min); ^~~~~~~~ drivers/mtd/ubi/debug.c:286:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "%u\n", d->power_cut_max); ^~~~~~~~ drivers/mtd/ubi/debug.c:286:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "%u\n", d->power_cut_max); ^~~~~~~~ drivers/mtd/ubi/debug.c:512:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME, ^~~~~~~~ drivers/mtd/ubi/debug.c:512:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME, ^~~~~~~~ Suppressed 35 warnings (35 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. 47 warnings generated. >> fs/omfs/file.c:170: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(terminator, entry, sizeof(struct omfs_extent_entry)); ^~~~~~ fs/omfs/file.c:170: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(terminator, entry, sizeof(struct omfs_extent_entry)); ^~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. >> fs/omfs/inode.c:156:3: 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(bh2->b_data, bh->b_data, bh->b_size); ^~~~~~ fs/omfs/inode.c:156:3: 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(bh2->b_data, bh->b_data, bh->b_size); ^~~~~~ >> fs/omfs/inode.c:371:4: 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((void *)*ptr + count, 0xff, ^~~~~~ fs/omfs/inode.c:371:4: 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((void *)*ptr + count, 0xff, ^~~~~~ Suppressed 46 warnings (46 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. 63 warnings generated. Suppressed 63 warnings (63 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. 49 warnings generated. fs/xfs/libxfs/xfs_ag.c:969: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(ageo, 0, sizeof(*ageo)); ^~~~~~ fs/xfs/libxfs/xfs_ag.c:969: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(ageo, 0, sizeof(*ageo)); ^~~~~~ Suppressed 48 warnings (48 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. 54 warnings generated. fs/xfs/libxfs/xfs_alloc.c:2675: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(&targs, 0, sizeof(targs)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:2675: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(&targs, 0, sizeof(targs)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:3358: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(&args, 0, sizeof(struct xfs_alloc_arg)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:3358: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(&args, 0, sizeof(struct xfs_alloc_arg)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:3413:8: warning: Access to field 'b_addr' results in a dereference of a null pointer (loaded from variable 'agbp') [clang-analyzer-core.NullDereference] agf = agbp->b_addr; ^~~~ fs/xfs/libxfs/xfs_alloc.c:3402:9: note: Assuming 'len' is equal to 0 ASSERT(len != 0); ^ fs/xfs/xfs_linux.h:215:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_alloc.c:3402:2: note: '?' condition is false ASSERT(len != 0); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_alloc.c:3403:9: note: Assuming 'type' is equal to XFS_AG_RESV_AGFL ASSERT(type != XFS_AG_RESV_AGFL); ^ fs/xfs/xfs_linux.h:215:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_alloc.c:3403:2: note: '?' condition is false ASSERT(type != XFS_AG_RESV_AGFL); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_alloc.c:3405:2: note: Taking false branch if (XFS_TEST_ERROR(false, mp, ^ fs/xfs/libxfs/xfs_alloc.c:3410:10: note: Calling 'xfs_free_extent_fix_freelist' error = xfs_free_extent_fix_freelist(tp, pag, &agbp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3368:6: note: Assuming field 'agno' is < field 'sb_agcount' if (args.agno >= args.mp->m_sb.sb_agcount) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3368:2: note: Taking false branch if (args.agno >= args.mp->m_sb.sb_agcount) ^ fs/xfs/libxfs/xfs_alloc.c:3371:10: note: Calling 'xfs_alloc_fix_freelist' error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:2591:2: note: Assuming the condition is false ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^~~~~~~~~~~~ include/linux/compiler.h:77:38: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^~~~ fs/xfs/libxfs/xfs_alloc.c:2591:2: note: '?' condition is true ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_alloc.c:2593:6: note: Assuming field 'pagf_init' is not equal to 0, which participates in a condition later if (!pag->pagf_init) { ^~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:2593:2: note: Taking false branch if (!pag->pagf_init) { ^ fs/xfs/libxfs/xfs_alloc.c:2608:6: note: Assuming field 'pagf_metadata' is not equal to 0 if (pag->pagf_metadata && (args->datatype & XFS_ALLOC_USERDATA) && ^~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:2608:6: note: Left side of '&&' is true fs/xfs/libxfs/xfs_alloc.c:2608:66: note: Left side of '&&' is false if (pag->pagf_metadata && (args->datatype & XFS_ALLOC_USERDATA) && ^ fs/xfs/libxfs/xfs_alloc.c:2615:6: note: Assuming the condition is true if (!xfs_alloc_space_available(args, need, flags | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:2615:2: note: Taking true branch if (!xfs_alloc_space_available(args, need, flags | ^ fs/xfs/libxfs/xfs_alloc.c:2617:3: note: Control jumps to line 2739 goto out_agbp_relse; ^ fs/xfs/libxfs/xfs_alloc.c:2739:6: note: 'agbp' is null if (agbp) ^~~~ fs/xfs/libxfs/xfs_alloc.c:2739:2: note: Taking false branch if (agbp) ^ fs/xfs/libxfs/xfs_alloc.c:2742:2: note: Null pointer value stored to 'args.agbp' args->agbp = NULL; ^~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:2743:2: note: Returning zero (loaded from 'error'), which participates in a condition later return error; ^~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3371:10: note: Returning from 'xfs_alloc_fix_freelist' error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3372:6: note: 'error' is 0 if (error) ^~~~~ fs/xfs/libxfs/xfs_alloc.c:3372:2: note: Taking false branch if (error) ^ fs/xfs/libxfs/xfs_alloc.c:3375:2: note: Null pointer value stored to 'agbp' *agbp = args.agbp; ^~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3376:2: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3410:10: note: Returning from 'xfs_free_extent_fix_freelist' error = xfs_free_extent_fix_freelist(tp, pag, &agbp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_alloc.c:3411:6: note: 'error' is 0 if (error) ^~~~~ fs/xfs/libxfs/xfs_alloc.c:3411:2: note: Taking false branch if (error) ^ fs/xfs/libxfs/xfs_alloc.c:3413:8: note: Access to field 'b_addr' results in a dereference of a null pointer (loaded from variable 'agbp') agf = agbp->b_addr; ^~~~ fs/xfs/libxfs/xfs_alloc.c:3511: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(&low, 0, sizeof(low)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:3511: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(&low, 0, sizeof(low)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:3513: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(&high, 0xFF, sizeof(high)); ^~~~~~ fs/xfs/libxfs/xfs_alloc.c:3513: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(&high, 0xFF, sizeof(high)); ^~~~~~ Suppressed 49 warnings (49 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. 57 warnings generated. >> drivers/input/mouse/cyapa_gen6.c:175: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(&pip_info, 0, sizeof(struct pip_fixed_info)); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:175: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(&pip_info, 0, sizeof(struct pip_fixed_info)); ^~~~~~ >> drivers/input/mouse/cyapa_gen6.c:237: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(&cyapa->product_id[0], &resp_data[51], 5); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:237: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(&cyapa->product_id[0], &resp_data[51], 5); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:239: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(&cyapa->product_id[6], &resp_data[56], 6); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:239: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(&cyapa->product_id[6], &resp_data[56], 6); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:241: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(&cyapa->product_id[13], &resp_data[62], 2); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:241: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(&cyapa->product_id[13], &resp_data[62], 2); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:279: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(&cyapa->product_id[0], &resp_data[13], 5); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:279: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(&cyapa->product_id[0], &resp_data[13], 5); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:281: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(&cyapa->product_id[6], &resp_data[18], 6); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:281: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(&cyapa->product_id[6], &resp_data[18], 6); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:283: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(&cyapa->product_id[13], &resp_data[24], 2); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:283: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(&cyapa->product_id[13], &resp_data[24], 2); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:358: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(&set_interval_cmd, 0, sizeof(set_interval_cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:358: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(&set_interval_cmd, 0, sizeof(set_interval_cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:574: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(&cmd, 0, sizeof(cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:574: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(&cmd, 0, sizeof(cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:600: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, &resp_data[10], read_len); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:600: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, &resp_data[10], read_len); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:658: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(buf, 0, PAGE_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen6.c:658: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(buf, 0, PAGE_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. drivers/parport/parport_ax88796.c:147:21: warning: Value stored to 'dd' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct ax_drvdata *dd = pp_to_drv(p); ^~ ~~~~~~~~~~~~ drivers/parport/parport_ax88796.c:147:21: note: Value stored to 'dd' during its initialization is never read struct ax_drvdata *dd = pp_to_drv(p); ^~ ~~~~~~~~~~~~ drivers/parport/parport_ax88796.c:208: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(s, 0, sizeof(struct parport_state)); ^~~~~~ drivers/parport/parport_ax88796.c:208: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(s, 0, sizeof(struct parport_state)); ^~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 15 warnings generated. drivers/base/test/test_async_driver_probe.c:164:12: warning: Dereference of null pointer (loaded from variable 'pdev') [clang-analyzer-core.NullDereference] dev_info(&(*pdev)->dev, ^ include/linux/dev_printk.h:150:46: note: expanded from macro 'dev_info' dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~ include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ^~~ drivers/base/test/test_async_driver_probe.c:104:2: note: 'pdev' initialized to a null pointer value struct platform_device **pdev = NULL; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/base/test/test_async_driver_probe.c:110:2: note: Left side of '&&' is true pr_info("registering first set of asynchronous devices...\n"); ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) -- ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ fs/xfs/libxfs/xfs_format.h:430:51: note: expanded from macro 'XFS_DADDR_TO_FSB' xfs_daddr_to_agno(mp,d), xfs_daddr_to_agbno(mp,d)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ fs/xfs/libxfs/xfs_format.h:663:56: note: expanded from macro 'XFS_AGB_TO_FSB' (((xfs_fsblock_t)(agno) << (mp)->m_sb.sb_agblklog) | (agbno)) ^~~~~ fs/xfs/xfs_fsmap.c:597:33: note: '?' condition is false end_fsb = XFS_DADDR_TO_FSB(mp, min(eofs - 1, keys[1].fmr_physical)); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ fs/xfs/xfs_fsmap.c:607:6: note: 'error' is 0 if (error) ^~~~~ fs/xfs/xfs_fsmap.c:607:2: note: Taking false branch if (error) ^ fs/xfs/xfs_fsmap.c:621:2: note: Assuming 'pag' is not equal to null for_each_perag_range(mp, start_ag, end_ag, pag) { ^ fs/xfs/libxfs/xfs_ag.h:139:3: note: expanded from macro 'for_each_perag_range' (pag) != NULL; \ ^~~~~~~~~~~~~ fs/xfs/xfs_fsmap.c:621:2: note: Loop condition is true. Entering loop body for_each_perag_range(mp, start_ag, end_ag, pag) { ^ fs/xfs/libxfs/xfs_ag.h:138:2: note: expanded from macro 'for_each_perag_range' for ((pag) = xfs_perag_get((mp), (agno)); \ ^ fs/xfs/xfs_fsmap.c:627:7: note: Assuming 'end_ag' is not equal to field 'pag_agno' if (pag->pag_agno == end_ag) { ^~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_fsmap.c:627:3: note: Taking false branch if (pag->pag_agno == end_ag) { ^ fs/xfs/xfs_fsmap.c:638:7: note: 'bt_cur' is null if (bt_cur) { ^~~~~~ fs/xfs/xfs_fsmap.c:638:3: note: Taking false branch if (bt_cur) { ^ fs/xfs/xfs_fsmap.c:647:7: note: Assuming 'error' is 0 if (error) ^~~~~ fs/xfs/xfs_fsmap.c:647:3: note: Taking false branch if (error) ^ fs/xfs/xfs_fsmap.c:655:11: note: Calling 'xfs_getfsmap_datadev_bnobt_query' error = query_fn(tp, info, &bt_cur, priv); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_fsmap.c:744:6: note: Assuming field 'last' is true if (info->last) ^~~~~~~~~~ fs/xfs/xfs_fsmap.c:744:2: note: Taking true branch if (info->last) ^ fs/xfs/xfs_fsmap.c:745:44: note: Passing null pointer value via 1st parameter 'cur' return xfs_getfsmap_datadev_bnobt_helper(*curpp, &key[1], info); ^~~~~~ fs/xfs/xfs_fsmap.c:745:10: note: Calling 'xfs_getfsmap_datadev_bnobt_helper' return xfs_getfsmap_datadev_bnobt_helper(*curpp, &key[1], info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_fsmap.c:371:26: note: Access to field 'bc_mp' results in a dereference of a null pointer (loaded from variable 'cur') struct xfs_mount *mp = cur->bc_mp; ^~~ fs/xfs/xfs_fsmap.c:872: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(handlers, 0, sizeof(handlers)); ^~~~~~ fs/xfs/xfs_fsmap.c:872: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(handlers, 0, sizeof(handlers)); ^~~~~~ fs/xfs/xfs_fsmap.c:919: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(&dkeys[1], 0xFF, sizeof(struct xfs_fsmap)); ^~~~~~ fs/xfs/xfs_fsmap.c:919: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(&dkeys[1], 0xFF, sizeof(struct xfs_fsmap)); ^~~~~~ fs/xfs/xfs_fsmap.c:949:4: 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(&dkeys[0], 0, sizeof(struct xfs_fsmap)); ^~~~~~ fs/xfs/xfs_fsmap.c:949:4: 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(&dkeys[0], 0, sizeof(struct xfs_fsmap)); ^~~~~~ Suppressed 48 warnings (48 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. 50 warnings generated. >> fs/xfs/scrub/dabtree.c:228: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(altpath, path, sizeof(ds->state->altpath)); ^~~~~~ fs/xfs/scrub/dabtree.c:228: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(altpath, path, sizeof(ds->state->altpath)); ^~~~~~ >> fs/xfs/scrub/dabtree.c:305: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(&ds->state->altpath, 0, sizeof(ds->state->altpath)); ^~~~~~ fs/xfs/scrub/dabtree.c:305: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(&ds->state->altpath, 0, sizeof(ds->state->altpath)); ^~~~~~ Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 47 warnings generated. Suppressed 47 warnings (47 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 50 warnings generated. >> fs/jffs2/gc.c:812: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(&ri, 0, sizeof(ri)); ^~~~~~ fs/jffs2/gc.c:812: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(&ri, 0, sizeof(ri)); ^~~~~~ fs/jffs2/gc.c:846:3: warning: Argument to kfree() is the address of the local variable 'dev', which is not memory allocated by malloc() [clang-analyzer-unix.Malloc] kfree(mdata); ^ ~~~~~ fs/jffs2/gc.c:770:6: note: Assuming the condition is true if (S_ISBLK(JFFS2_F_I_MODE(f)) || ^ include/uapi/linux/stat.h:25:21: note: expanded from macro 'S_ISBLK' #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/gc.c:770:33: note: Left side of '||' is true if (S_ISBLK(JFFS2_F_I_MODE(f)) || ^ fs/jffs2/gc.c:775:3: note: 0 is < 1 jffs2_dbg(1, "%s(): Writing %d bytes of kdev_t\n", ^ fs/jffs2/debug.h:69:6: note: expanded from macro 'jffs2_dbg' if (CONFIG_JFFS2_FS_DEBUG >= level) \ ^~~~~~~~~~~~~~~~~~~~~ ./include/generated/autoconf.h:495:31: note: expanded from macro 'CONFIG_JFFS2_FS_DEBUG' #define CONFIG_JFFS2_FS_DEBUG 0 ^ fs/jffs2/gc.c:775:3: note: Taking false branch jffs2_dbg(1, "%s(): Writing %d bytes of kdev_t\n", ^ fs/jffs2/debug.h:69:2: note: expanded from macro 'jffs2_dbg' if (CONFIG_JFFS2_FS_DEBUG >= level) \ ^ fs/jffs2/gc.c:775:3: note: Loop condition is false. Exiting loop jffs2_dbg(1, "%s(): Writing %d bytes of kdev_t\n", ^ fs/jffs2/debug.h:67:37: note: expanded from macro 'jffs2_dbg' #define jffs2_dbg(level, fmt, ...) \ ^ fs/jffs2/gc.c:798:6: note: Assuming 'ret' is 0 if (ret) { ^~~ fs/jffs2/gc.c:798:2: note: Taking false branch if (ret) { ^ fs/jffs2/gc.c:805:6: note: 'last_frag' is null if (last_frag) ^~~~~~~~~ fs/jffs2/gc.c:805:2: note: Taking false branch if (last_frag) ^ fs/jffs2/gc.c:824:25: note: Assuming '__UNIQUE_ID___x258' is <= '__UNIQUE_ID___y259' ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f)); ^ fs/jffs2/os-linux.h:40:28: note: expanded from macro 'JFFS2_F_I_ATIME' #define JFFS2_F_I_ATIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_atime) ^ fs/jffs2/os-linux.h:37:19: note: expanded from macro 'I_SEC' #define I_SEC(tv) JFFS2_CLAMP_TIME((tv).tv_sec) ^ fs/jffs2/os-linux.h:34:40: note: expanded from macro 'JFFS2_CLAMP_TIME' #define JFFS2_CLAMP_TIME(t) ((uint32_t)clamp_t(time64_t, (t), 0, U32_MAX)) ^ note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ fs/jffs2/nodelist.h:37:36: note: expanded from macro 'cpu_to_je32' #define cpu_to_je32(x) ((jint32_t){x}) ^ fs/jffs2/gc.c:824:25: note: '?' condition is false ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f)); ^ fs/jffs2/os-linux.h:40:28: note: expanded from macro 'JFFS2_F_I_ATIME' #define JFFS2_F_I_ATIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_atime) ^ fs/jffs2/os-linux.h:37:19: note: expanded from macro 'I_SEC' #define I_SEC(tv) JFFS2_CLAMP_TIME((tv).tv_sec) ^ fs/jffs2/os-linux.h:34:40: note: expanded from macro 'JFFS2_CLAMP_TIME' #define JFFS2_CLAMP_TIME(t) ((uint32_t)clamp_t(time64_t, (t), 0, U32_MAX)) ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ fs/jffs2/gc.c:824:25: note: '__UNIQUE_ID___x260' is < '__UNIQUE_ID___y261' ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f)); ^ fs/jffs2/os-linux.h:40:28: note: expanded from macro 'JFFS2_F_I_ATIME' #define JFFS2_F_I_ATIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_atime) ^ -- ^ fs/jffs2/nodelist.h:37:36: note: expanded from macro 'cpu_to_je32' #define cpu_to_je32(x) ((jint32_t){x}) ^ fs/jffs2/gc.c:826:25: note: '?' condition is false ri.mtime = cpu_to_je32(JFFS2_F_I_MTIME(f)); ^ fs/jffs2/os-linux.h:39:28: note: expanded from macro 'JFFS2_F_I_MTIME' #define JFFS2_F_I_MTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_mtime) ^ fs/jffs2/os-linux.h:37:19: note: expanded from macro 'I_SEC' #define I_SEC(tv) JFFS2_CLAMP_TIME((tv).tv_sec) ^ fs/jffs2/os-linux.h:34:40: note: expanded from macro 'JFFS2_CLAMP_TIME' #define JFFS2_CLAMP_TIME(t) ((uint32_t)clamp_t(time64_t, (t), 0, U32_MAX)) ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ fs/jffs2/gc.c:826:25: note: '__UNIQUE_ID___x268' is < '__UNIQUE_ID___y269' ri.mtime = cpu_to_je32(JFFS2_F_I_MTIME(f)); ^ fs/jffs2/os-linux.h:39:28: note: expanded from macro 'JFFS2_F_I_MTIME' #define JFFS2_F_I_MTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_mtime) ^ fs/jffs2/os-linux.h:37:19: note: expanded from macro 'I_SEC' #define I_SEC(tv) JFFS2_CLAMP_TIME((tv).tv_sec) ^ fs/jffs2/os-linux.h:34:40: note: expanded from macro 'JFFS2_CLAMP_TIME' #define JFFS2_CLAMP_TIME(t) ((uint32_t)clamp_t(time64_t, (t), 0, U32_MAX)) ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ fs/jffs2/nodelist.h:37:36: note: expanded from macro 'cpu_to_je32' #define cpu_to_je32(x) ((jint32_t){x}) ^ fs/jffs2/gc.c:826:25: note: '?' condition is true ri.mtime = cpu_to_je32(JFFS2_F_I_MTIME(f)); ^ fs/jffs2/os-linux.h:39:28: note: expanded from macro 'JFFS2_F_I_MTIME' #define JFFS2_F_I_MTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_mtime) ^ fs/jffs2/os-linux.h:37:19: note: expanded from macro 'I_SEC' #define I_SEC(tv) JFFS2_CLAMP_TIME((tv).tv_sec) ^ fs/jffs2/os-linux.h:34:40: note: expanded from macro 'JFFS2_CLAMP_TIME' #define JFFS2_CLAMP_TIME(t) ((uint32_t)clamp_t(time64_t, (t), 0, U32_MAX)) ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ fs/jffs2/gc.c:836:2: note: Taking false branch if (IS_ERR(new_fn)) { ^ fs/jffs2/gc.c:845:6: note: Assuming the condition is true if (S_ISLNK(JFFS2_F_I_MODE(f))) ^ include/uapi/linux/stat.h:21:21: note: expanded from macro 'S_ISLNK' #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/jffs2/gc.c:845:2: note: Taking true branch if (S_ISLNK(JFFS2_F_I_MODE(f))) ^ fs/jffs2/gc.c:846:3: note: Argument to kfree() is the address of the local variable 'dev', which is not memory allocated by malloc() kfree(mdata); ^ ~~~~~ fs/jffs2/gc.c:1026: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(&ri, 0, sizeof(ri)); ^~~~~~ fs/jffs2/gc.c:1026: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(&ri, 0, sizeof(ri)); ^~~~~~ fs/jffs2/gc.c:1177: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(&ri, 0, sizeof(ri)); ^~~~~~ fs/jffs2/gc.c:1177: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(&ri, 0, sizeof(ri)); ^~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. >> drivers/md/dm-verity-verify-sig.c:58: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(sig_opts->sig, ukp->data, sig_opts->sig_size); ^~~~~~ drivers/md/dm-verity-verify-sig.c:58: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(sig_opts->sig, ukp->data, sig_opts->sig_size); ^~~~~~ Suppressed 47 warnings (47 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. 58 warnings generated. drivers/md/dm-verity-target.c:247:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(verity_env, DM_VERITY_ENV_LENGTH, "%s=%d,%llu", ^~~~~~~~ drivers/md/dm-verity-target.c:247:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(verity_env, DM_VERITY_ENV_LENGTH, "%s=%d,%llu", ^~~~~~~~ drivers/md/dm-verity-target.c:323: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(want_digest, data, v->digest_size); ^~~~~~ drivers/md/dm-verity-target.c:323: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(want_digest, data, v->digest_size); ^~~~~~ drivers/md/dm-verity-target.c:353: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(digest, v->root_digest, v->digest_size); ^~~~~~ drivers/md/dm-verity-target.c:353: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(digest, v->root_digest, v->digest_size); ^~~~~~ drivers/md/dm-verity-target.c:453: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, len); ^~~~~~ drivers/md/dm-verity-target.c:453: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, len); ^~~~~~ drivers/md/dm-verity-target.c:1088:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[0], "%u%c", &num, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1088:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[0], "%u%c", &num, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1108:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[3], "%u%c", &num, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1108:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[3], "%u%c", &num, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1118:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[4], "%u%c", &num, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1118:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[4], "%u%c", &num, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1128:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[5], "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1128:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[5], "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1143:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[6], "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1143:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[6], "%llu%c", &num_ll, &dummy) != 1 || ^~~~~~ drivers/md/dm-verity-target.c:1256:38: warning: The result of the left shift is undefined due to shifting by '90', which is greater or equal to the width of type 'sector_t' [clang-analyzer-core.UndefinedBinaryOperatorResult] s = (v->data_blocks + ((sector_t)1 << ((i + 1) * v->hash_per_block_bits)) - 1) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1064:6: note: Calling 'kzalloc' v = kzalloc(sizeof(struct dm_verity), GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:715:9: note: Calling 'kmalloc' return kmalloc(size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:569:2: note: Taking false branch if (__builtin_constant_p(size)) { ^ include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later return __kmalloc(size, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:715:9: note: Returning from 'kmalloc' return kmalloc(size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:715:2: note: Returning pointer, which participates in a condition later return kmalloc(size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1064:6: note: Returning from 'kzalloc' v = kzalloc(sizeof(struct dm_verity), GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1065:6: note: Assuming 'v' is non-null if (!v) { ^~ drivers/md/dm-verity-target.c:1065:2: note: Taking false branch if (!v) { ^ drivers/md/dm-verity-target.c:1073:6: note: Assuming 'r' is 0 if (r) ^ drivers/md/dm-verity-target.c:1073:2: note: Taking false branch if (r) ^ drivers/md/dm-verity-target.c:1076:7: note: Assuming the condition is false if ((dm_table_get_mode(ti->table) & ~FMODE_READ)) { -- include/linux/slab.h:569:2: note: Taking false branch if (__builtin_constant_p(size)) { ^ include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later return __kmalloc(size, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1184:19: note: Returning from 'kmalloc' v->root_digest = kmalloc(v->digest_size, GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1185:6: note: Assuming field 'root_digest' is non-null if (!v->root_digest) { ^~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1185:2: note: Taking false branch if (!v->root_digest) { ^ drivers/md/dm-verity-target.c:1190:6: note: Assuming the condition is false if (strlen(argv[8]) != v->digest_size * 2 || ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1190:6: note: Left side of '||' is false drivers/md/dm-verity-target.c:1191:6: note: Assuming the condition is false hex2bin(v->root_digest, argv[8], v->digest_size)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1190:2: note: Taking false branch if (strlen(argv[8]) != v->digest_size * 2 || ^ drivers/md/dm-verity-target.c:1198:6: note: Assuming the condition is false if (strcmp(argv[9], "-")) { ^~~~~~~~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1198:2: note: Taking false branch if (strcmp(argv[9], "-")) { ^ drivers/md/dm-verity-target.c:1218:6: note: Assuming 'argc' is 0 if (argc) { ^~~~ drivers/md/dm-verity-target.c:1218:2: note: Taking false branch if (argc) { ^ drivers/md/dm-verity-target.c:1232:6: note: Assuming 'r' is >= 0 if (r < 0) { ^~~~~ drivers/md/dm-verity-target.c:1232:2: note: Taking false branch if (r < 0) { ^ drivers/md/dm-verity-target.c:1240:6: note: Assuming field 'data_blocks' is not equal to 0 if (v->data_blocks) ^~~~~~~~~~~~~~ drivers/md/dm-verity-target.c:1240:2: note: Taking true branch if (v->data_blocks) ^ drivers/md/dm-verity-target.c:1241:10: note: Left side of '&&' is true while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1241:3: note: Loop condition is true. Entering loop body while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1241:10: note: Left side of '&&' is true while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1241:3: note: Loop condition is true. Entering loop body while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1241:10: note: Left side of '&&' is true while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1241:3: note: Loop condition is true. Entering loop body while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1241:50: note: Left side of '&&' is false while (v->hash_per_block_bits * v->levels < 64 && ^ drivers/md/dm-verity-target.c:1246:9: note: Field 'levels' is <= DM_VERITY_MAX_LEVELS if (v->levels > DM_VERITY_MAX_LEVELS) { ^ drivers/md/dm-verity-target.c:1246:2: note: Taking false branch if (v->levels > DM_VERITY_MAX_LEVELS) { ^ drivers/md/dm-verity-target.c:1253:2: note: Loop condition is true. Entering loop body for (i = v->levels - 1; i >= 0; i--) { ^ drivers/md/dm-verity-target.c:1256:38: note: The result of the left shift is undefined due to shifting by '93', which is greater or equal to the width of type 'sector_t' s = (v->data_blocks + ((sector_t)1 << ((i + 1) * v->hash_per_block_bits)) - 1) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 47 warnings (47 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. 48 warnings generated. fs/stat.c:99: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(stat, 0, sizeof(*stat)); ^~~~~~ fs/stat.c:99: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(stat, 0, sizeof(*stat)); ^~~~~~ fs/stat.c:575: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(&tmp, 0, sizeof(tmp)); ^~~~~~ fs/stat.c:575: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(&tmp, 0, sizeof(tmp)); ^~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. >> drivers/input/misc/ad714x-spi.c:40: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(xfer, 0, sizeof(xfer)); ^~~~~~ drivers/input/misc/ad714x-spi.c:40: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(xfer, 0, sizeof(xfer)); ^~~~~~ Suppressed 35 warnings (35 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. 40 warnings generated. >> drivers/input/misc/adxl34x.c:446:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ac->disabled); ^~~~~~~ drivers/input/misc/adxl34x.c:446:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ac->disabled); ^~~~~~~ drivers/input/misc/adxl34x.c:489:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] count = sprintf(buf, "%d,%d,%d\n", ^~~~~~~ drivers/input/misc/adxl34x.c:489:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 count = sprintf(buf, "%d,%d,%d\n", ^~~~~~~ drivers/input/misc/adxl34x.c:535:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", RATE(ac->pdata.data_rate)); ^~~~~~~ drivers/input/misc/adxl34x.c:535:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", RATE(ac->pdata.data_rate)); ^~~~~~~ drivers/input/misc/adxl34x.c:569:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ drivers/input/misc/adxl34x.c:569:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ drivers/input/misc/adxl34x.c:610:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] count = sprintf(buf, "(%d, %d, %d)\n", ^~~~~~~ drivers/input/misc/adxl34x.c:610:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 count = sprintf(buf, "(%d, %d, %d)\n", ^~~~~~~ >> drivers/input/misc/adxl34x.c:749:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(ac->phys, sizeof(ac->phys), "%s/input0", dev_name(dev)); ^~~~~~~~ drivers/input/misc/adxl34x.c:749:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(ac->phys, sizeof(ac->phys), "%s/input0", dev_name(dev)); ^~~~~~~~ Suppressed 34 warnings (34 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. 48 warnings generated. drivers/i2c/muxes/i2c-demux-pinctrl.c:103:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(priv->cur_adap.name, sizeof(priv->cur_adap.name), ^~~~~~~~ drivers/i2c/muxes/i2c-demux-pinctrl.c:103:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(priv->cur_adap.name, sizeof(priv->cur_adap.name), ^~~~~~~~ drivers/i2c/muxes/i2c-demux-pinctrl.c:184:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", priv->cur_chan); ^~~~~~~ drivers/i2c/muxes/i2c-demux-pinctrl.c:184:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", priv->cur_chan); ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> drivers/i2c/muxes/i2c-mux-reg.c:170:3: 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(&mux->data, dev_get_platdata(&pdev->dev), ^~~~~~ drivers/i2c/muxes/i2c-mux-reg.c:170:3: 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(&mux->data, dev_get_platdata(&pdev->dev), ^~~~~~ Suppressed 46 warnings (46 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. 59 warnings generated. drivers/i2c/i2c-core-base.c:645:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", dev->type == &i2c_client_type ? ^~~~~~~ drivers/i2c/i2c-core-base.c:645:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", dev->type == &i2c_client_type ? ^~~~~~~ drivers/i2c/i2c-core-base.c:664:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s%s\n", I2C_MODULE_PREFIX, client->name); ^~~~~~~ drivers/i2c/i2c-core-base.c:664:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s%s\n", I2C_MODULE_PREFIX, client->name); ^~~~~~~ drivers/i2c/i2c-core-base.c:1185: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(&info, 0, sizeof(struct i2c_board_info)); ^~~~~~ drivers/i2c/i2c-core-base.c:1185: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(&info, 0, sizeof(struct i2c_board_info)); ^~~~~~ drivers/i2c/i2c-core-base.c:1196: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(info.type, buf, blank - buf); ^~~~~~ drivers/i2c/i2c-core-base.c:1196: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(info.type, buf, blank - buf); ^~~~~~ drivers/i2c/i2c-core-base.c:1199:8: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] res = sscanf(++blank, "%hi%c", &info.addr, &end); ^~~~~~ drivers/i2c/i2c-core-base.c:1199:8: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 res = sscanf(++blank, "%hi%c", &info.addr, &end); ^~~~~~ drivers/i2c/i2c-core-base.c:1254:8: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] res = sscanf(buf, "%hi%c", &addr, &end); ^~~~~~ drivers/i2c/i2c-core-base.c:1254:8: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 res = sscanf(buf, "%hi%c", &addr, &end); ^~~~~~ drivers/i2c/i2c-core-base.c:1740: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(&adap->dev, 0, sizeof(adap->dev)); ^~~~~~ drivers/i2c/i2c-core-base.c:1740: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(&adap->dev, 0, sizeof(adap->dev)); ^~~~~~ drivers/i2c/i2c-core-base.c:2316: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(&info, 0, sizeof(struct i2c_board_info)); ^~~~~~ drivers/i2c/i2c-core-base.c:2316: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(&info, 0, sizeof(struct i2c_board_info)); ^~~~~~ drivers/i2c/i2c-core-base.c:2521:3: 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(msg->buf, buf, msg->len); ^~~~~~ drivers/i2c/i2c-core-base.c:2521:3: 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(msg->buf, buf, msg->len); ^~~~~~ Suppressed 50 warnings (50 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. drivers/leds/leds-dac124s085.c:66:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(led->name, sizeof(led->name), "dac124s085-%d", i); ^~~~~~~~ drivers/leds/leds-dac124s085.c:66:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(led->name, sizeof(led->name), "dac124s085-%d", i); ^~~~~~~~ Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 48 warnings generated. drivers/leds/flash/leds-as3645a.c:382:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &flash->client->dev; ^~~ ~~~~~~~~~~~~~~~~~~~ drivers/leds/flash/leds-as3645a.c:382:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &flash->client->dev; ^~~ ~~~~~~~~~~~~~~~~~~~ Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 23 warnings generated. drivers/firmware/google/coreboot_table.c:104:3: 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(&device->entry, ptr_entry, entry->size); ^~~~~~ drivers/firmware/google/coreboot_table.c:104:3: 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(&device->entry, ptr_entry, entry->size); ^~~~~~ Suppressed 22 warnings (22 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. 47 warnings generated. >> drivers/firmware/google/framebuffer-coreboot.c:54: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(&res, 0, sizeof(res)); ^~~~~~ drivers/firmware/google/framebuffer-coreboot.c:54: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(&res, 0, sizeof(res)); ^~~~~~ Suppressed 46 warnings (46 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. 12 warnings generated. Suppressed 12 warnings (12 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. 16 warnings generated. Suppressed 16 warnings (16 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. 47 warnings generated. drivers/crypto/virtio/virtio_crypto_algs.c:440: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(iv, req->iv, ivsize); ^~~~~~ drivers/crypto/virtio/virtio_crypto_algs.c:440: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(iv, req->iv, ivsize); ^~~~~~ Suppressed 46 warnings (46 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. 37 warnings generated. drivers/input/joydev.c:465: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(joydev->abspam, abspam, len); ^~~~~~ drivers/input/joydev.c:465: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(joydev->abspam, abspam, len); ^~~~~~ drivers/input/joydev.c:499: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(joydev->keypam, keypam, len); ^~~~~~ drivers/input/joydev.c:499: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(joydev->keypam, keypam, len); ^~~~~~ include/asm-generic/bitops/non-atomic.h:118:16: warning: Array access (from variable 'addr') results in a null pointer dereference [clang-analyzer-core.NullDereference] return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); ^ drivers/input/joydev.c:919:6: note: Assuming 'minor' is >= 0 if (minor < 0) { ^~~~~~~~~ drivers/input/joydev.c:919:2: note: Taking false branch if (minor < 0) { ^ drivers/input/joydev.c:925:11: note: Calling 'kzalloc' joydev = kzalloc(sizeof(struct joydev), GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:715:9: note: Calling 'kmalloc' return kmalloc(size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:569:2: note: Taking false branch if (__builtin_constant_p(size)) { ^ include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later return __kmalloc(size, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:715:9: note: Returning from 'kmalloc' return kmalloc(size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:715:2: note: Returning pointer, which participates in a condition later return kmalloc(size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/joydev.c:925:11: note: Returning from 'kzalloc' joydev = kzalloc(sizeof(struct joydev), GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/joydev.c:926:6: note: Assuming 'joydev' is non-null if (!joydev) { ^~~~~~~ drivers/input/joydev.c:926:2: note: Taking false branch if (!joydev) { ^ drivers/input/joydev.c:932:2: note: Loop condition is false. Exiting loop spin_lock_init(&joydev->client_lock); ^ include/linux/spinlock.h:329:35: note: expanded from macro 'spin_lock_init' # define spin_lock_init(lock) \ ^ drivers/input/joydev.c:933:2: note: Loop condition is false. Exiting loop mutex_init(&joydev->mutex); ^ include/linux/mutex.h:101:32: note: expanded from macro 'mutex_init' #define mutex_init(mutex) \ ^ drivers/input/joydev.c:934:2: note: Loop condition is false. Exiting loop init_waitqueue_head(&joydev->wait); ^ include/linux/wait.h:67:2: note: expanded from macro 'init_waitqueue_head' do { \ ^ drivers/input/joydev.c:939:6: note: Assuming the condition is false if (dev_no < JOYDEV_MINOR_BASE + JOYDEV_MINORS) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/joydev.c:939:2: note: Taking false branch if (dev_no < JOYDEV_MINOR_BASE + JOYDEV_MINORS) ^ drivers/input/joydev.c:948:2: note: Assuming the condition is false for_each_set_bit(i, dev->absbit, ABS_CNT) { ^ include/linux/find.h:284:7: note: expanded from macro 'for_each_set_bit' (bit) < (size); \ -- ^ include/asm-generic/div64.h:223:35: note: expanded from macro 'do_div' if (__builtin_constant_p(__base) && \ ^ drivers/clk/clk-divider.c:378:14: note: Left side of '&&' is false req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); ^ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^ include/asm-generic/div64.h:227:42: note: expanded from macro 'do_div' } else if (__builtin_constant_p(__base) && \ ^ drivers/clk/clk-divider.c:378:14: note: Assuming the condition is true req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); ^ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^~~~~~~~~~~~~~~ include/asm-generic/div64.h:234:20: note: expanded from macro 'do_div' } else if (likely(((n) >> 32) == 0)) { \ ~~~~~~~^~~~~~~~~~~~~~~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ drivers/clk/clk-divider.c:378:14: note: Taking true branch req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); ^ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^ include/asm-generic/div64.h:234:9: note: expanded from macro 'do_div' } else if (likely(((n) >> 32) == 0)) { \ ^ drivers/clk/clk-divider.c:378:14: note: Division by zero req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); ^ include/linux/math.h:42:2: note: expanded from macro 'DIV_ROUND_UP_ULL' DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/math.h:39:37: note: expanded from macro 'DIV_ROUND_DOWN_ULL' ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) ^~~~~~~~~~~~~~~ include/asm-generic/div64.h:235:25: note: expanded from macro 'do_div' __rem = (uint32_t)(n) % __base; \ ~~~~~~~~~~~~~~^~~~~~~~ Suppressed 22 warnings (22 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. 47 warnings generated. drivers/mfd/sky81452.c:47: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(cells, 0, sizeof(cells)); ^~~~~~ drivers/mfd/sky81452.c:47: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(cells, 0, sizeof(cells)); ^~~~~~ Suppressed 46 warnings (46 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. 49 warnings generated. drivers/mfd/mt6360-core.c:445: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(val, buf + MT6360_CRC_PREDATA_OFFSET, val_size); ^~~~~~ drivers/mfd/mt6360-core.c:445: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(val, buf + MT6360_CRC_PREDATA_OFFSET, val_size); ^~~~~~ drivers/mfd/mt6360-core.c:476: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(buf + MT6360_CRC_PREDATA_OFFSET, val + MT6360_REGMAP_REG_BYTE_SIZE, write_size); ^~~~~~ drivers/mfd/mt6360-core.c:476: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(buf + MT6360_CRC_PREDATA_OFFSET, val + MT6360_REGMAP_REG_BYTE_SIZE, write_size); ^~~~~~ Suppressed 47 warnings (47 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 19 warnings generated. Suppressed 19 warnings (19 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. 24 warnings generated. >> drivers/mtd/nand/ecc-sw-bch.c:29: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(code, 0, engine_conf->code_size); ^~~~~~ drivers/mtd/nand/ecc-sw-bch.c:29: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(code, 0, engine_conf->code_size); ^~~~~~ drivers/mtd/nand/ecc-sw-bch.c:118:21: warning: Division by zero [clang-analyzer-core.DivideZero] t = (eccbytes * 8) / m; ^ drivers/mtd/nand/ecc-sw-bch.c:179:6: note: Assuming field 'oobsize' is >= 64 if (mtd->oobsize < 64) { ^~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:179:2: note: Taking false branch if (mtd->oobsize < 64) { ^ drivers/mtd/nand/ecc-sw-bch.c:184:6: note: Assuming field 'ooblayout' is non-null if (!mtd->ooblayout) ^~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:184:2: note: Taking false branch if (!mtd->ooblayout) ^ drivers/mtd/nand/ecc-sw-bch.c:198:6: note: Assuming field 'step_size' is not equal to 0 if (!conf->step_size) { ^~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:198:2: note: Taking false branch if (!conf->step_size) { ^ drivers/mtd/nand/ecc-sw-bch.c:210:6: note: Assuming the condition is false if (nand->ecc.user_conf.flags & NAND_ECC_MAXIMIZE_STRENGTH) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:210:2: note: Taking false branch if (nand->ecc.user_conf.flags & NAND_ECC_MAXIMIZE_STRENGTH) { ^ drivers/mtd/nand/ecc-sw-bch.c:218:7: note: 'code_size' is 0 if (!code_size) ^~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:218:2: note: Taking true branch if (!code_size) ^ drivers/mtd/nand/ecc-sw-bch.c:222:6: note: Assuming field 'strength' is not equal to 0 if (!conf->strength) ^~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:222:2: note: Taking false branch if (!conf->strength) ^ drivers/mtd/nand/ecc-sw-bch.c:225:7: note: 'code_size' is 0 if (!code_size && !conf->strength) { ^~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:225:6: note: Left side of '&&' is true if (!code_size && !conf->strength) { ^ drivers/mtd/nand/ecc-sw-bch.c:225:27: note: Field 'strength' is not equal to 0 if (!code_size && !conf->strength) { ^ drivers/mtd/nand/ecc-sw-bch.c:225:2: note: Taking false branch if (!code_size && !conf->strength) { ^ drivers/mtd/nand/ecc-sw-bch.c:231:6: note: Assuming 'engine_conf' is non-null if (!engine_conf) ^~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:231:2: note: Taking false branch if (!engine_conf) ^ drivers/mtd/nand/ecc-sw-bch.c:235:6: note: Assuming 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/ecc-sw-bch.c:235:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/ecc-sw-bch.c:241:6: note: Assuming field 'calc_buf' is non-null if (!engine_conf->calc_buf || !engine_conf->code_buf) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:241:6: note: Left side of '||' is false drivers/mtd/nand/ecc-sw-bch.c:241:32: note: Assuming field 'code_buf' is non-null if (!engine_conf->calc_buf || !engine_conf->code_buf) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:241:2: note: Taking false branch if (!engine_conf->calc_buf || !engine_conf->code_buf) { ^ drivers/mtd/nand/ecc-sw-bch.c:250:8: note: Calling 'nand_ecc_sw_bch_init' ret = nand_ecc_sw_bch_init(nand); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:117:6: note: Calling 'fls' m = fls(1 + (8 * eccsize)); ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking true branch if (!x) ^ include/asm-generic/bitops/fls.h:18:3: note: Returning zero return 0; ^~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:117:6: note: Returning from 'fls' m = fls(1 + (8 * eccsize)); ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:117:2: note: The value 0 is assigned to 'm' m = fls(1 + (8 * eccsize)); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:118:21: note: Division by zero -- drivers/mtd/nand/ecc-sw-bch.c:148:2: note: Taking false branch if (engine_conf->bch->ecc_bytes != eccbytes) { ^ drivers/mtd/nand/ecc-sw-bch.c:156:37: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int' if (8 * (eccsize + eccbytes) >= (1 << m)) { ^ ~ drivers/mtd/nand/ecc-sw-bch.c:223:36: warning: Division by zero [clang-analyzer-core.DivideZero] conf->strength = (code_size * 8) / fls(8 * conf->step_size); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:173:25: note: Calling 'nanddev_to_mtd' struct mtd_info *mtd = nanddev_to_mtd(nand); ^~~~~~~~~~~~~~~~~~~~ include/linux/mtd/nand.h:419:2: note: Returning without writing to 'nand->ecc.user_conf.strength', which participates in a condition later return &nand->mtd; ^ include/linux/mtd/nand.h:419:2: note: Returning without writing to 'nand->ecc.ctx.conf.strength', which participates in a condition later drivers/mtd/nand/ecc-sw-bch.c:173:25: note: Returning from 'nanddev_to_mtd' struct mtd_info *mtd = nanddev_to_mtd(nand); ^~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:179:6: note: Assuming field 'oobsize' is >= 64 if (mtd->oobsize < 64) { ^~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:179:2: note: Taking false branch if (mtd->oobsize < 64) { ^ drivers/mtd/nand/ecc-sw-bch.c:184:6: note: Assuming field 'ooblayout' is non-null if (!mtd->ooblayout) ^~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:184:2: note: Taking false branch if (!mtd->ooblayout) ^ drivers/mtd/nand/ecc-sw-bch.c:198:6: note: Assuming field 'step_size' is not equal to 0 if (!conf->step_size) { ^~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:198:2: note: Taking false branch if (!conf->step_size) { ^ drivers/mtd/nand/ecc-sw-bch.c:210:6: note: Assuming the condition is false if (nand->ecc.user_conf.flags & NAND_ECC_MAXIMIZE_STRENGTH) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:210:2: note: Taking false branch if (nand->ecc.user_conf.flags & NAND_ECC_MAXIMIZE_STRENGTH) { ^ drivers/mtd/nand/ecc-sw-bch.c:218:7: note: 'code_size' is 0 if (!code_size) ^~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:218:2: note: Taking true branch if (!code_size) ^ drivers/mtd/nand/ecc-sw-bch.c:220:7: note: Calling 'fls' fls(8 * conf->step_size), 8); ^ include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP' #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ include/uapi/linux/const.h:34:40: note: expanded from macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is 0, which participates in a condition later if (!x) ^~ include/asm-generic/bitops/fls.h:17:2: note: Taking true branch if (!x) ^ drivers/mtd/nand/ecc-sw-bch.c:220:7: note: Returning from 'fls' fls(8 * conf->step_size), 8); ^ include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP' #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ include/uapi/linux/const.h:34:40: note: expanded from macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ drivers/mtd/nand/ecc-sw-bch.c:222:6: note: Assuming field 'strength' is 0 if (!conf->strength) ^~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:222:2: note: Taking true branch if (!conf->strength) ^ drivers/mtd/nand/ecc-sw-bch.c:223:38: note: Calling 'fls' conf->strength = (code_size * 8) / fls(8 * conf->step_size); ^~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/fls.h:17:7: note: 'x' is 0 if (!x) ^ include/asm-generic/bitops/fls.h:17:2: note: Taking true branch if (!x) ^ include/asm-generic/bitops/fls.h:18:3: note: Returning zero return 0; ^~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:223:38: note: Returning from 'fls' conf->strength = (code_size * 8) / fls(8 * conf->step_size); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/ecc-sw-bch.c:223:36: note: Division by zero conf->strength = (code_size * 8) / fls(8 * conf->step_size); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 19 warnings (19 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. 54 warnings generated. >> drivers/input/mouse/elan_i2c_core.c:610:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%04x\n", data->fw_checksum); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:610:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%04x\n", data->fw_checksum); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:620:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, ETP_PRODUCT_ID_FORMAT_STRING "\n", ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:620:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, ETP_PRODUCT_ID_FORMAT_STRING "\n", ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:631:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d.0\n", data->fw_version); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:631:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d.0\n", data->fw_version); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:641:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d.0\n", data->sm_version); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:641:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d.0\n", data->sm_version); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:651:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d.0\n", data->iap_version); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:651:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d.0\n", data->iap_version); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:792:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (int)mode); ^~~~~~~ drivers/input/mouse/elan_i2c_core.c:792:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (int)mode); ^~~~~~~ >> drivers/input/mouse/elan_i2c_core.c:896:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] retval = snprintf(buf, PAGE_SIZE, "%d", data->min_baseline); ^~~~~~~~ drivers/input/mouse/elan_i2c_core.c:896:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 retval = snprintf(buf, PAGE_SIZE, "%d", data->min_baseline); ^~~~~~~~ drivers/input/mouse/elan_i2c_core.c:919:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] retval = snprintf(buf, PAGE_SIZE, "%d", data->max_baseline); ^~~~~~~~ drivers/input/mouse/elan_i2c_core.c:919:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 retval = snprintf(buf, PAGE_SIZE, "%d", data->max_baseline); ^~~~~~~~ Suppressed 46 warnings (46 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. 50 warnings generated. Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 74 warnings generated. drivers/md/md-bitmap.c:564: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(sb->uuid, bitmap->mddev->uuid, 16); ^~~~~~ drivers/md/md-bitmap.c:564: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(sb->uuid, bitmap->mddev->uuid, 16); ^~~~~~ drivers/md/md-bitmap.c:1137:5: 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(paddr + offset, 0xff, ^~~~~~ drivers/md/md-bitmap.c:1137:5: 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(paddr + offset, 0xff, ^~~~~~ drivers/md/md-bitmap.c:1682:8: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] *bmc |= NEEDED_MASK; ^ drivers/md/md-bitmap.c:1069:6: note: Assuming 'file' is null if (!file && !bitmap->mddev->bitmap_info.offset) { ^~~~~ drivers/md/md-bitmap.c:1069:6: note: Left side of '&&' is true drivers/md/md-bitmap.c:1069:15: note: Assuming field 'offset' is 0 if (!file && !bitmap->mddev->bitmap_info.offset) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:1069:2: note: Taking true branch if (!file && !bitmap->mddev->bitmap_info.offset) { ^ drivers/md/md-bitmap.c:1073:15: note: Assuming 'i' is < 'chunks' for (i = 0; i < chunks ; i++) { ^~~~~~~~~~ drivers/md/md-bitmap.c:1073:3: note: Loop condition is true. Entering loop body for (i = 0; i < chunks ; i++) { ^ drivers/md/md-bitmap.c:1075:18: note: Assuming the condition is true int needed = ((sector_t)(i+1) << (bitmap->counts.chunkshift) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:1077:4: note: Calling 'md_bitmap_set_memory_bits' md_bitmap_set_memory_bits(bitmap, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:1671:7: note: 'bmc' is non-null if (!bmc) { ^~~ drivers/md/md-bitmap.c:1671:2: note: Taking false branch if (!bmc) { ^ drivers/md/md-bitmap.c:1675:6: note: Assuming the condition is true if (!*bmc) { ^~~~~ drivers/md/md-bitmap.c:1675:2: note: Taking true branch if (!*bmc) { ^ drivers/md/md-bitmap.c:1677:3: note: Calling 'md_bitmap_count_page' md_bitmap_count_page(&bitmap->counts, offset, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:1203:2: note: Calling 'md_bitmap_checkfree' md_bitmap_checkfree(bitmap, page); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:123:6: note: Assuming field 'count' is 0 if (bitmap->bp[page].count) /* page is still busy */ ^~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:123:2: note: Taking false branch if (bitmap->bp[page].count) /* page is still busy */ ^ drivers/md/md-bitmap.c:128:23: note: Field 'hijacked' is 0 if (bitmap->bp[page].hijacked) { /* page was hijacked, undo this now */ ^ drivers/md/md-bitmap.c:128:2: note: Taking false branch if (bitmap->bp[page].hijacked) { /* page was hijacked, undo this now */ ^ drivers/md/md-bitmap.c:136:3: note: Memory is released kfree(ptr); ^~~~~~~~~~ drivers/md/md-bitmap.c:1203:2: note: Returning; memory was released md_bitmap_checkfree(bitmap, page); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:1677:3: note: Returning; memory was released md_bitmap_count_page(&bitmap->counts, offset, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/md-bitmap.c:1681:6: note: 'needed' is 1 if (needed) ^~~~~~ drivers/md/md-bitmap.c:1681:2: note: Taking true branch -- ~~~~~~~~ ^ drivers/md/md-bitmap.c:2262:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(page, "file"); ^~~~~~~ drivers/md/md-bitmap.c:2262:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len = sprintf(page, "file"); ^~~~~~~ drivers/md/md-bitmap.c:2264:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(page, "%+lld", (long long)mddev->bitmap_info.offset); ^~~~~~~ drivers/md/md-bitmap.c:2264:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len = sprintf(page, "%+lld", (long long)mddev->bitmap_info.offset); ^~~~~~~ drivers/md/md-bitmap.c:2266:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(page, "none"); ^~~~~~~ drivers/md/md-bitmap.c:2266:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len = sprintf(page, "none"); ^~~~~~~ drivers/md/md-bitmap.c:2267:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(page+len, "\n"); ^~~~~~~ drivers/md/md-bitmap.c:2267:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(page+len, "\n"); ^~~~~~~ drivers/md/md-bitmap.c:2381:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%lu\n", mddev->bitmap_info.space); ^~~~~~~ drivers/md/md-bitmap.c:2381:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%lu\n", mddev->bitmap_info.space); ^~~~~~~ drivers/md/md-bitmap.c:2418:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(page, "%lu", secs); ^~~~~~~ drivers/md/md-bitmap.c:2418:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len = sprintf(page, "%lu", secs); ^~~~~~~ drivers/md/md-bitmap.c:2420:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(page+len, ".%03u", jiffies_to_msecs(jifs)); ^~~~~~~ drivers/md/md-bitmap.c:2420:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(page+len, ".%03u", jiffies_to_msecs(jifs)); ^~~~~~~ drivers/md/md-bitmap.c:2421:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += sprintf(page+len, "\n"); ^~~~~~~ drivers/md/md-bitmap.c:2421:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len += sprintf(page+len, "\n"); ^~~~~~~ drivers/md/md-bitmap.c:2464:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%lu\n", mddev->bitmap_info.max_write_behind); ^~~~~~~ drivers/md/md-bitmap.c:2464:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%lu\n", mddev->bitmap_info.max_write_behind); ^~~~~~~ drivers/md/md-bitmap.c:2519:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%lu\n", mddev->bitmap_info.chunksize); ^~~~~~~ drivers/md/md-bitmap.c:2519:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "%lu\n", mddev->bitmap_info.chunksize); ^~~~~~~ drivers/md/md-bitmap.c:2546:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "clustered\n"); ^~~~~~~ drivers/md/md-bitmap.c:2546:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(page, "clustered\n"); ^~~~~~~ drivers/md/md-bitmap.c:2547:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%s\n", (mddev->bitmap_info.external ^~~~~~~ drivers/md/md-bitmap.c:2547:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "%s\n", (mddev->bitmap_info.external ^~~~~~~ drivers/md/md-bitmap.c:2575:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(page, "%s\n", (mddev->bitmap->need_sync ? ^~~~~~~ drivers/md/md-bitmap.c:2575:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 len = sprintf(page, "%s\n", (mddev->bitmap->need_sync ? ^~~~~~~ drivers/md/md-bitmap.c:2578:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(page, "\n"); ^~~~~~~ drivers/md/md-bitmap.c:2578:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 len = sprintf(page, "\n"); ^~~~~~~ drivers/md/md-bitmap.c:2607:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(page, "0\n"); ^~~~~~~ drivers/md/md-bitmap.c:2607:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(page, "0\n"); ^~~~~~~ drivers/md/md-bitmap.c:2609:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(page, "%lu\n", ^~~~~~~ drivers/md/md-bitmap.c:2609:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(page, "%lu\n", ^~~~~~~ Suppressed 51 warnings (51 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. 53 warnings generated. >> drivers/hwmon/ftsteutates.c:356:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->volt[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:356:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->volt[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:370:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->temp_input[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:370:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->temp_input[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:385:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_input[index] == 0); ^~~~~~~ drivers/hwmon/ftsteutates.c:385:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_input[index] == 0); ^~~~~~~ drivers/hwmon/ftsteutates.c:399:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", !!(data->temp_alarm & BIT(index))); ^~~~~~~ drivers/hwmon/ftsteutates.c:399:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", !!(data->temp_alarm & BIT(index))); ^~~~~~~ drivers/hwmon/ftsteutates.c:445:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->fan_input[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:445:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->fan_input[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:459:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->fan_source[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:459:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->fan_source[index]); ^~~~~~~ drivers/hwmon/ftsteutates.c:473:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !!(data->fan_alarm & BIT(index))); ^~~~~~~ drivers/hwmon/ftsteutates.c:473:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !!(data->fan_alarm & BIT(index))); ^~~~~~~ Suppressed 46 warnings (46 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. >> fs/efivarfs/file.c:100: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, &attributes, sizeof(attributes)); ^~~~~~ fs/efivarfs/file.c:100: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, &attributes, sizeof(attributes)); ^~~~~~ Suppressed 35 warnings (35 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. 49 warnings generated. >> fs/efivarfs/super.c:123: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(entry->var.VariableName, name16, name_size); ^~~~~~ fs/efivarfs/super.c:123: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(entry->var.VariableName, name16, name_size); ^~~~~~ fs/efivarfs/super.c:124: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(&(entry->var.VendorGuid), &vendor, sizeof(efi_guid_t)); ^~~~~~ fs/efivarfs/super.c:124: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(&(entry->var.VendorGuid), &vendor, sizeof(efi_guid_t)); ^~~~~~ Suppressed 47 warnings (47 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. 63 warnings generated. security/keys/encrypted-keys/encrypted.c:285:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = sprintf(ascii_buf, "%s %s %s ", epayload->format, ^~~~~~~ security/keys/encrypted-keys/encrypted.c:285:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 len = sprintf(ascii_buf, "%s %s %s ", epayload->format, ^~~~~~~ security/keys/encrypted-keys/encrypted.c:365:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(derived_buf, "AUTH_KEY"); ^~~~~~ security/keys/encrypted-keys/encrypted.c:365:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(derived_buf, "AUTH_KEY"); ^~~~~~ security/keys/encrypted-keys/encrypted.c:367:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(derived_buf, "ENC_KEY"); ^~~~~~ security/keys/encrypted-keys/encrypted.c:367:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(derived_buf, "ENC_KEY"); ^~~~~~ security/keys/encrypted-keys/encrypted.c:369: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(derived_buf + strlen(derived_buf) + 1, master_key, ^~~~~~ security/keys/encrypted-keys/encrypted.c:369: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(derived_buf + strlen(derived_buf) + 1, master_key, ^~~~~~ security/keys/encrypted-keys/encrypted.c:374:2: warning: Potential leak of memory pointed to by 'derived_buf' [clang-analyzer-unix.Malloc] return ret; ^ security/keys/encrypted-keys/encrypted.c:793:6: note: Assuming 'datalen' is > 0 if (datalen <= 0 || datalen > 32767 || !prep->data) ^~~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:793:6: note: Left side of '||' is false security/keys/encrypted-keys/encrypted.c:793:22: note: Assuming 'datalen' is <= 32767 if (datalen <= 0 || datalen > 32767 || !prep->data) ^~~~~~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:793:6: note: Left side of '||' is false if (datalen <= 0 || datalen > 32767 || !prep->data) ^ security/keys/encrypted-keys/encrypted.c:793:41: note: Assuming field 'data' is non-null if (datalen <= 0 || datalen > 32767 || !prep->data) ^~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:793:2: note: Taking false branch if (datalen <= 0 || datalen > 32767 || !prep->data) ^ security/keys/encrypted-keys/encrypted.c:797:6: note: Assuming 'datablob' is non-null if (!datablob) ^~~~~~~~~ security/keys/encrypted-keys/encrypted.c:797:2: note: Taking false branch if (!datablob) ^ security/keys/encrypted-keys/encrypted.c:803:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ security/keys/encrypted-keys/encrypted.c:803:2: note: Taking false branch if (ret < 0) ^ security/keys/encrypted-keys/encrypted.c:808:2: note: Taking false branch if (IS_ERR(epayload)) { ^ security/keys/encrypted-keys/encrypted.c:812:8: note: Calling 'encrypted_init' ret = encrypted_init(epayload, key->description, format, master_desc, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:753:6: note: 'format' is null if (format && !strcmp(format, key_format_ecryptfs)) { ^~~~~~ security/keys/encrypted-keys/encrypted.c:753:13: note: Left side of '&&' is false if (format && !strcmp(format, key_format_ecryptfs)) { ^ security/keys/encrypted-keys/encrypted.c:763:6: note: Assuming 'hex_encoded_iv' is non-null if (!hex_encoded_iv) { ^~~~~~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:763:2: note: Taking false branch if (!hex_encoded_iv) { ^ security/keys/encrypted-keys/encrypted.c:769:9: note: Calling 'encrypted_key_decrypt' ret = encrypted_key_decrypt(epayload, format, hex_encoded_iv); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:670:6: note: Assuming the condition is false if (strlen(hex_encoded_iv) != asciilen) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ security/keys/encrypted-keys/encrypted.c:670:2: note: Taking false branch if (strlen(hex_encoded_iv) != asciilen) ^ security/keys/encrypted-keys/encrypted.c:675:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ security/keys/encrypted-keys/encrypted.c:675:2: note: Taking false branch -- security/keys/encrypted-keys/encrypted.c:364:6: note: 'key_type' is 1 if (key_type) ^~~~~~~~ security/keys/encrypted-keys/encrypted.c:364:2: note: Taking true branch if (key_type) ^ security/keys/encrypted-keys/encrypted.c:374:2: note: Potential leak of memory pointed to by 'derived_buf' return ret; ^ security/keys/encrypted-keys/encrypted.c:474: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(iv, epayload->iv, sizeof(iv)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:474: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(iv, epayload->iv, sizeof(iv)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:580: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(iv, epayload->iv, sizeof(iv)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:580: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(iv, epayload->iv, sizeof(iv)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:727:3: 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(epayload->format, key_format_default, format_len); ^~~~~~ security/keys/encrypted-keys/encrypted.c:727:3: 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(epayload->format, key_format_default, format_len); ^~~~~~ security/keys/encrypted-keys/encrypted.c:733:3: 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(epayload->format, format, format_len); ^~~~~~ security/keys/encrypted-keys/encrypted.c:733:3: 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(epayload->format, format, format_len); ^~~~~~ security/keys/encrypted-keys/encrypted.c:736: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(epayload->master_desc, master_desc, strlen(master_desc)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:736: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(epayload->master_desc, master_desc, strlen(master_desc)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:737: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(epayload->datalen, datalen, strlen(datalen)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:737: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(epayload->datalen, datalen, strlen(datalen)); ^~~~~~ security/keys/encrypted-keys/encrypted.c:800: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(datablob, prep->data, datalen); ^~~~~~ security/keys/encrypted-keys/encrypted.c:800: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(datablob, prep->data, datalen); ^~~~~~ security/keys/encrypted-keys/encrypted.c:862: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(buf, prep->data, datalen); ^~~~~~ security/keys/encrypted-keys/encrypted.c:862: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(buf, prep->data, datalen); ^~~~~~ security/keys/encrypted-keys/encrypted.c:881: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(new_epayload->iv, epayload->iv, ivsize); ^~~~~~ security/keys/encrypted-keys/encrypted.c:881: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(new_epayload->iv, epayload->iv, ivsize); ^~~~~~ security/keys/encrypted-keys/encrypted.c:882: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(new_epayload->payload_data, epayload->payload_data, ^~~~~~ security/keys/encrypted-keys/encrypted.c:882: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(new_epayload->payload_data, epayload->payload_data, ^~~~~~ security/keys/encrypted-keys/encrypted.c:948: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(buffer, ascii_buf, asciiblob_len); ^~~~~~ security/keys/encrypted-keys/encrypted.c:948: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(buffer, ascii_buf, asciiblob_len); ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. drivers/mfd/iqs62x.c:330:3: 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(fw_blk->data, data, len); ^~~~~~ drivers/mfd/iqs62x.c:330:3: 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(fw_blk->data, data, len); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 22 warnings generated. Suppressed 22 warnings (22 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 39 warnings generated. >> drivers/mtd/tests/mtd_nandecctest.c:52: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:52: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:66: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:66: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:93: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:93: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:107: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:107: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:115: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:115: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:116: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:116: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:139: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:139: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:145: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:145: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:169: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:169: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(error_ecc, correct_ecc, 3); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:182: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(error_data, correct_data, size); ^~~~~~ drivers/mtd/tests/mtd_nandecctest.c:182: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(error_data, correct_data, size); ^~~~~~ Suppressed 29 warnings (29 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. 31 warnings generated. drivers/char/hw_random/core.c:368:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(buf, PAGE_SIZE, "%s\n", rng ? rng->name : "none"); ^~~~~~~~ drivers/char/hw_random/core.c:368:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(buf, PAGE_SIZE, "%s\n", rng ? rng->name : "none"); ^~~~~~~~ Suppressed 30 warnings (30 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. 22 warnings generated. Suppressed 22 warnings (22 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. 54 warnings generated. drivers/target/target_core_sbc.c:66:3: 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(rbuf, buf, min_t(u32, sizeof(buf), cmd->data_length)); ^~~~~~ drivers/target/target_core_sbc.c:66:3: 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(rbuf, buf, min_t(u32, sizeof(buf), cmd->data_length)); ^~~~~~ drivers/target/target_core_sbc.c:85: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(buf, 0, sizeof(buf)); ^~~~~~ drivers/target/target_core_sbc.c:85: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(buf, 0, sizeof(buf)); ^~~~~~ drivers/target/target_core_sbc.c:129:3: 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(rbuf, buf, min_t(u32, sizeof(buf), cmd->data_length)); ^~~~~~ drivers/target/target_core_sbc.c:129:3: 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(rbuf, buf, min_t(u32, sizeof(buf), cmd->data_length)); ^~~~~~ drivers/target/target_core_sbc.c:1157:9: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] return target_cmd_size_check(cmd, size); ^ ~~~~ drivers/target/target_core_sbc.c:825:2: note: 'size' declared without an initial value unsigned int size; ^~~~~~~~~~~~~~~~~ drivers/target/target_core_sbc.c:831:2: note: Control jumps to 'case 10:' at line 880 switch (cdb[0]) { ^ drivers/target/target_core_sbc.c:885:3: note: Execution continues on line 1138 break; ^ drivers/target/target_core_sbc.c:1138:12: note: Field 'execute_cmd' is non-null if (!cmd->execute_cmd) ^ drivers/target/target_core_sbc.c:1138:2: note: Taking false branch if (!cmd->execute_cmd) ^ drivers/target/target_core_sbc.c:1141:6: note: Assuming the condition is false if (cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_sbc.c:1141:2: note: Taking false branch if (cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) { ^ drivers/target/target_core_sbc.c:1157:9: note: 2nd function call argument is an uninitialized value return target_cmd_size_check(cmd, size); ^ ~~~~ drivers/target/target_core_sbc.c:1198:2: warning: Value stored to 'dl' is never read [clang-analyzer-deadcode.DeadStores] dl = get_unaligned_be16(&buf[0]); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_sbc.c:1198:2: note: Value stored to 'dl' is never read dl = get_unaligned_be16(&buf[0]); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_sbc.c:1384:5: 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(paddr + copied, addr, len); ^~~~~~ drivers/target/target_core_sbc.c:1384:5: 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(paddr + copied, addr, len); ^~~~~~ drivers/target/target_core_sbc.c:1386:5: 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(addr, paddr + copied, len); ^~~~~~ drivers/target/target_core_sbc.c:1386:5: 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(addr, paddr + copied, len); ^~~~~~ Suppressed 47 warnings (47 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. 31 warnings generated. drivers/pps/clients/pps_parport.c:152: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(&pps_client_cb, 0, sizeof(pps_client_cb)); ^~~~~~ drivers/pps/clients/pps_parport.c:152: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(&pps_client_cb, 0, sizeof(pps_client_cb)); ^~~~~~ Suppressed 30 warnings (30 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. 35 warnings generated. >> drivers/pps/clients/pps-gpio.c:189:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(data->info.name, PPS_MAX_NAME_LEN - 1, "%s.%d", ^~~~~~~~ drivers/pps/clients/pps-gpio.c:189:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(data->info.name, PPS_MAX_NAME_LEN - 1, "%s.%d", ^~~~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 51 warnings generated. fs/exec.c:639:3: 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(kaddr + offset_in_page(pos), arg, bytes_to_copy); ^~~~~~ fs/exec.c:639:3: 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(kaddr + offset_in_page(pos), arg, bytes_to_copy); ^~~~~~ fs/exec.c:1194:3: 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(newsighand->action, oldsighand->action, ^~~~~~ fs/exec.c:1194:3: 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(newsighand->action, oldsighand->action, ^~~~~~ fs/exec.c:1656: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(bprm->buf, 0, BINPRM_BUF_SIZE); ^~~~~~ fs/exec.c:1656: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(bprm->buf, 0, BINPRM_BUF_SIZE); ^~~~~~ Suppressed 48 warnings (48 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. 60 warnings generated. >> drivers/hwmon/lm63.c:336:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index])); ^~~~~~~ drivers/hwmon/lm63.c:336:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index])); ^~~~~~~ drivers/hwmon/lm63.c:376:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", pwm); ^~~~~~~ drivers/hwmon/lm63.c:376:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", pwm); ^~~~~~~ drivers/hwmon/lm63.c:412:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->config_fan & 0x20 ? 1 : 2); ^~~~~~~ drivers/hwmon/lm63.c:412:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->config_fan & 0x20 ? 1 : 2); ^~~~~~~ drivers/hwmon/lm63.c:462:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP8_FROM_REG(data->temp8[attr->index])); ^~~~~~~ drivers/hwmon/lm63.c:462:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP8_FROM_REG(data->temp8[attr->index])); ^~~~~~~ drivers/hwmon/lm63.c:471:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp8_from_reg(data, attr->index) ^~~~~~~ drivers/hwmon/lm63.c:471:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp8_from_reg(data, attr->index) ^~~~~~~ drivers/hwmon/lm63.c:481:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", lut_temp_from_reg(data, attr->index) ^~~~~~~ drivers/hwmon/lm63.c:481:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", lut_temp_from_reg(data, attr->index) ^~~~~~~ drivers/hwmon/lm63.c:547:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp + data->temp2_offset); ^~~~~~~ drivers/hwmon/lm63.c:547:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp + data->temp2_offset); ^~~~~~~ drivers/hwmon/lm63.c:595:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp8_from_reg(data, 2) ^~~~~~~ drivers/hwmon/lm63.c:595:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp8_from_reg(data, 2) ^~~~~~~ drivers/hwmon/lm63.c:606:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", lut_temp_from_reg(data, attr->index) ^~~~~~~ drivers/hwmon/lm63.c:606:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", lut_temp_from_reg(data, attr->index) ^~~~~~~ drivers/hwmon/lm63.c:666:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->update_interval); ^~~~~~~ drivers/hwmon/lm63.c:666:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->update_interval); ^~~~~~~ >> drivers/hwmon/lm63.c:693:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, data->trutherm ? "1\n" : "2\n"); ^~~~~~~ drivers/hwmon/lm63.c:693:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, data->trutherm ? "1\n" : "2\n"); ^~~~~~~ drivers/hwmon/lm63.c:727:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->alarms); ^~~~~~~ drivers/hwmon/lm63.c:727:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->alarms); ^~~~~~~ drivers/hwmon/lm63.c:737:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/lm63.c:737:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/lm63.c:1017:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &client->dev; ^~~ ~~~~~~~~~~~~ drivers/hwmon/lm63.c:1017:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &client->dev; ^~~ ~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 38 warnings generated. drivers/mtd/ubi/upd.c:227: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(buf + len, 0xFF, l - len); ^~~~~~ drivers/mtd/ubi/upd.c:227: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(buf + len, 0xFF, l - len); ^~~~~~ drivers/mtd/ubi/upd.c:245: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(buf + len, 0, vol->usable_leb_size - len); ^~~~~~ drivers/mtd/ubi/upd.c:245: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(buf + len, 0, vol->usable_leb_size - len); ^~~~~~ drivers/mtd/ubi/upd.c:403: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(vol->upd_buf + vol->upd_bytes, 0xFF, ^~~~~~ drivers/mtd/ubi/upd.c:403: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(vol->upd_buf + vol->upd_bytes, 0xFF, ^~~~~~ Suppressed 35 warnings (35 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. 52 warnings generated. drivers/mtd/ubi/build.c:99:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", UBI_VERSION); ^~~~~~~ drivers/mtd/ubi/build.c:99:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", UBI_VERSION); ^~~~~~~ drivers/mtd/ubi/build.c:359:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->leb_size); ^~~~~~~ drivers/mtd/ubi/build.c:359:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->leb_size); ^~~~~~~ drivers/mtd/ubi/build.c:361:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->avail_pebs); ^~~~~~~ drivers/mtd/ubi/build.c:361:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->avail_pebs); ^~~~~~~ drivers/mtd/ubi/build.c:363:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->good_peb_count); ^~~~~~~ drivers/mtd/ubi/build.c:363:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->good_peb_count); ^~~~~~~ drivers/mtd/ubi/build.c:365:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->vol_count - UBI_INT_VOL_COUNT); ^~~~~~~ drivers/mtd/ubi/build.c:365:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->vol_count - UBI_INT_VOL_COUNT); ^~~~~~~ drivers/mtd/ubi/build.c:367:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->max_ec); ^~~~~~~ drivers/mtd/ubi/build.c:367:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->max_ec); ^~~~~~~ drivers/mtd/ubi/build.c:369:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->beb_rsvd_pebs); ^~~~~~~ drivers/mtd/ubi/build.c:369:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->beb_rsvd_pebs); ^~~~~~~ drivers/mtd/ubi/build.c:371:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->bad_peb_count); ^~~~~~~ drivers/mtd/ubi/build.c:371:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->bad_peb_count); ^~~~~~~ drivers/mtd/ubi/build.c:373:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", ubi->vtbl_slots); ^~~~~~~ drivers/mtd/ubi/build.c:373:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", ubi->vtbl_slots); -- 46 warnings generated. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/i2c/busses/i2c-parport.c:294: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(&i2c_parport_cb, 0, sizeof(i2c_parport_cb)); ^~~~~~ drivers/i2c/busses/i2c-parport.c:294: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(&i2c_parport_cb, 0, sizeof(i2c_parport_cb)); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. drivers/i2c/busses/i2c-virtio.c:41:8: warning: Excessive padding in 'struct virtio_i2c_req' (195 padding bytes, where 131 is optimal). Optimal fields order: in_hdr, completion, buf, out_hdr, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct virtio_i2c_req { ~~~~~~~^~~~~~~~~~~~~~~~ drivers/i2c/busses/i2c-virtio.c:41:8: note: Excessive padding in 'struct virtio_i2c_req' (195 padding bytes, where 131 is optimal). Optimal fields order: in_hdr, completion, buf, out_hdr, consider reordering the fields or adding explicit padding members struct virtio_i2c_req { ~~~~~~~^~~~~~~~~~~~~~~~ drivers/i2c/busses/i2c-virtio.c:212:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(vi->adap.name, sizeof(vi->adap.name), ^~~~~~~~ drivers/i2c/busses/i2c-virtio.c:212:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(vi->adap.name, sizeof(vi->adap.name), ^~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 53 warnings generated. drivers/hwmon/thmc50.c:122:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->analog_out); ^~~~~~~ drivers/hwmon/thmc50.c:122:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->analog_out); ^~~~~~~ drivers/hwmon/thmc50.c:159:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0\n"); ^~~~~~~ drivers/hwmon/thmc50.c:159:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0\n"); ^~~~~~~ drivers/hwmon/thmc50.c:168:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_input[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:168:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_input[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:176:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_min[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:176:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_min[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:206:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_max[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:206:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_max[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:236:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_critical[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:236:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_critical[nr] * 1000); ^~~~~~~ drivers/hwmon/thmc50.c:245:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms >> index) & 1); ^~~~~~~ drivers/hwmon/thmc50.c:245:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms >> index) & 1); ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/power/supply/mt6360_charger.c:816: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(&mci->psy_desc, &mt6360_charger_desc, sizeof(mci->psy_desc)); ^~~~~~ drivers/power/supply/mt6360_charger.c:816: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(&mci->psy_desc, &mt6360_charger_desc, sizeof(mci->psy_desc)); ^~~~~~ Suppressed 46 warnings (46 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. 35 warnings generated. >> drivers/input/misc/da9063_onkey.c:230:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(onkey->phys, sizeof(onkey->phys), "%s/input0", ^~~~~~~~ drivers/input/misc/da9063_onkey.c:230:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(onkey->phys, sizeof(onkey->phys), "%s/input0", ^~~~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. Suppressed 46 warnings (46 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. 36 warnings generated. >> drivers/gpio/gpio-aggregator.c:53: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(&lookups->table[*n], 0, sizeof(lookups->table[*n])); ^~~~~~ drivers/gpio/gpio-aggregator.c:53: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(&lookups->table[*n], 0, sizeof(lookups->table[*n])); ^~~~~~ >> drivers/gpio/gpio-aggregator.c:124: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(aggr->args, buf, count + 1); ^~~~~~ drivers/gpio/gpio-aggregator.c:124: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(aggr->args, buf, count + 1); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 39 warnings generated. Suppressed 39 warnings (39 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. 38 warnings generated. Suppressed 38 warnings (38 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. 39 warnings generated. Suppressed 39 warnings (39 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. 38 warnings generated. Suppressed 38 warnings (38 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. 39 warnings generated. Suppressed 39 warnings (39 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. 38 warnings generated. Suppressed 38 warnings (38 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. 39 warnings generated. Suppressed 39 warnings (39 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. 39 warnings generated. Suppressed 39 warnings (39 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. 31 warnings generated. include/linux/hid.h:1037:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference] input->name, c, type); ^ drivers/hid/hid-belkin.c:32:6: note: Assuming the condition is false if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER || ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-belkin.c:32:6: note: Left side of '||' is false drivers/hid/hid-belkin.c:33:4: note: Assuming the condition is false !(quirks & BELKIN_WKBD)) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-belkin.c:32:2: note: Taking false branch if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER || ^ drivers/hid/hid-belkin.c:36:2: note: Control jumps to 'case 60:' at line 39 switch (usage->hid & HID_USAGE) { ^ drivers/hid/hid-belkin.c:39:14: note: Calling 'hid_map_usage_clear' case 0x03c: belkin_map_key_clear(KEY_DOCUMENTS); break; ^ drivers/hid/hid-belkin.c:24:33: note: expanded from macro 'belkin_map_key_clear' #define belkin_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1065:2: note: Calling 'hid_map_usage' hid_map_usage(hidinput, usage, bit, max, type, c); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1008:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1012:2: note: Control jumps to 'case 1:' at line 1021 switch (type) { ^ include/linux/hid.h:1024:3: note: Execution continues on line 1035 break; ^ include/linux/hid.h:1035:15: note: 'c' is <= 'limit' if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:15: note: Left side of '||' is false if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1035:28: note: Assuming 'bmap' is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:28: note: Assuming pointer value is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:2: note: Taking true branch if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1036:3: note: Assuming the condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:639:6: note: expanded from macro 'printk_ratelimited' -- ^~~~~~ drivers/md/dm-ebs-target.c:99:5: 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(pa, ba, cur_len); ^~~~~~ drivers/md/dm-ebs-target.c:103:5: 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(ba, pa, cur_len); ^~~~~~ drivers/md/dm-ebs-target.c:103:5: 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(ba, pa, cur_len); ^~~~~~ drivers/md/dm-ebs-target.c:265:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1 || ^~~~~~ drivers/md/dm-ebs-target.c:265:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1 || ^~~~~~ drivers/md/dm-ebs-target.c:273:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[2], "%hu%c", &tmp1, &dummy) != 1 || ^~~~~~ drivers/md/dm-ebs-target.c:273:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[2], "%hu%c", &tmp1, &dummy) != 1 || ^~~~~~ drivers/md/dm-ebs-target.c:282:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[3], "%hu%c", &tmp1, &dummy) != 1 || !__ebs_check_bs(tmp1)) { ^~~~~~ drivers/md/dm-ebs-target.c:282:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[3], "%hu%c", &tmp1, &dummy) != 1 || !__ebs_check_bs(tmp1)) { ^~~~~~ drivers/md/dm-ebs-target.c:401:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(result, maxlen, ec->u_bs_set ? "%s %llu %u %u" : "%s %llu %u", ^~~~~~~~ drivers/md/dm-ebs-target.c:401:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(result, maxlen, ec->u_bs_set ? "%s %llu %u %u" : "%s %llu %u", ^~~~~~~~ Suppressed 47 warnings (47 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. 52 warnings generated. fs/xfs/xfs_super.c:684: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(ip, 0, sizeof(struct xfs_inode)); ^~~~~~ fs/xfs/xfs_super.c:684: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(ip, 0, sizeof(struct xfs_inode)); ^~~~~~ Suppressed 51 warnings (51 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. 51 warnings generated. fs/xfs/xfs_symlink.c:82:3: 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(link + offset, cur_chunk, byte_cnt); ^~~~~~ fs/xfs/xfs_symlink.c:82:3: 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(link + offset, cur_chunk, byte_cnt); ^~~~~~ fs/xfs/xfs_symlink.c:134:3: 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(link, ip->i_df.if_u1.if_data, pathlen + 1); ^~~~~~ fs/xfs/xfs_symlink.c:134:3: 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(link, ip->i_df.if_u1.if_data, pathlen + 1); ^~~~~~ fs/xfs/xfs_symlink.c:305:4: 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(buf, cur_chunk, byte_cnt); ^~~~~~ fs/xfs/xfs_symlink.c:305:4: 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(buf, cur_chunk, byte_cnt); ^~~~~~ Suppressed 48 warnings (48 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. 52 warnings generated. fs/xfs/libxfs/xfs_symlink_remote.c:48: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(dsl, 0, sizeof(struct xfs_dsymlink_hdr)); ^~~~~~ fs/xfs/libxfs/xfs_symlink_remote.c:48: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(dsl, 0, sizeof(struct xfs_dsymlink_hdr)); ^~~~~~ fs/xfs/libxfs/xfs_symlink_remote.c:178:3: 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(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes); ^~~~~~ fs/xfs/libxfs/xfs_symlink_remote.c:178:3: 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(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes); ^~~~~~ fs/xfs/libxfs/xfs_symlink_remote.c:194: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(buf, ifp->if_u1.if_data, ifp->if_bytes); ^~~~~~ fs/xfs/libxfs/xfs_symlink_remote.c:194: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(buf, ifp->if_u1.if_data, ifp->if_bytes); ^~~~~~ Suppressed 49 warnings (49 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 30 warnings generated. Suppressed 30 warnings (30 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. 36 warnings generated. >> drivers/hwmon/ads7871.c:127:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", val); ^~~~~~~ drivers/hwmon/ads7871.c:127:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", val); ^~~~~~~ Suppressed 35 warnings (35 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. 47 warnings generated. >> drivers/hwmon/mcp3021.c:98:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", in_input); ^~~~~~~ drivers/hwmon/mcp3021.c:98:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", in_input); ^~~~~~~ Suppressed 46 warnings (46 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. 25 warnings generated. Suppressed 25 warnings (25 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. 41 warnings generated. drivers/mtd/devices/docg3.c:1315: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(dst, oobsrc, DOC_LAYOUT_OOB_PAGEINFO_SZ); ^~~~~~ drivers/mtd/devices/docg3.c:1315: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, oobsrc, DOC_LAYOUT_OOB_PAGEINFO_SZ); ^~~~~~ drivers/mtd/devices/docg3.c:1353:3: 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(docg3->oob_write_buf, ops->oobbuf, DOC_LAYOUT_OOB_SIZE); ^~~~~~ drivers/mtd/devices/docg3.c:1353:3: 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(docg3->oob_write_buf, ops->oobbuf, DOC_LAYOUT_OOB_SIZE); ^~~~~~ drivers/mtd/devices/docg3.c:1430: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(oob, 0, sizeof(oob)); ^~~~~~ drivers/mtd/devices/docg3.c:1430: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(oob, 0, sizeof(oob)); ^~~~~~ drivers/mtd/devices/docg3.c:1432:4: 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(oob, docg3->oob_write_buf, DOC_LAYOUT_OOB_SIZE); ^~~~~~ drivers/mtd/devices/docg3.c:1432:4: 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(oob, docg3->oob_write_buf, DOC_LAYOUT_OOB_SIZE); ^~~~~~ drivers/mtd/devices/docg3.c:1436:4: 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(oob, oobbuf, DOC_LAYOUT_OOB_SIZE); ^~~~~~ drivers/mtd/devices/docg3.c:1436:4: 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(oob, oobbuf, DOC_LAYOUT_OOB_SIZE); ^~~~~~ drivers/mtd/devices/docg3.c:1480:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !(dps0 & DOC_DPS_KEY_OK)); ^~~~~~~ drivers/mtd/devices/docg3.c:1480:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !(dps0 & DOC_DPS_KEY_OK)); ^~~~~~~ drivers/mtd/devices/docg3.c:1495:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !(dps1 & DOC_DPS_KEY_OK)); ^~~~~~~ drivers/mtd/devices/docg3.c:1495:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !(dps1 & DOC_DPS_KEY_OK)); ^~~~~~~ Suppressed 34 warnings (34 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. 65 warnings generated. >> drivers/hwmon/w83791d.c:360:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_in_reg(in); ^ drivers/hwmon/w83791d.c:357:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83791d.c:360:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_in_reg(in); ^ drivers/hwmon/w83791d.c:357:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83791d.c:361:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_in_reg(in_min); ^ drivers/hwmon/w83791d.c:357:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83791d.c:361:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_in_reg(in_min); ^ drivers/hwmon/w83791d.c:357:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83791d.c:362:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_in_reg(in_max); ^ drivers/hwmon/w83791d.c:357:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83791d.c:362:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_in_reg(in_max); ^ drivers/hwmon/w83791d.c:357:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83791d.c:436:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->beep_mask >> bitnr) & 1); ^~~~~~~ drivers/hwmon/w83791d.c:436:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->beep_mask >> bitnr) & 1); ^~~~~~~ drivers/hwmon/w83791d.c:482:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/w83791d.c:482:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/w83791d.c:527:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_fan_reg(fan); ^ drivers/hwmon/w83791d.c:523:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83791d.c:527:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_fan_reg(fan); ^ drivers/hwmon/w83791d.c:523:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83791d.c:528:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_fan_reg(fan_min); ^ drivers/hwmon/w83791d.c:523:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83791d.c:528:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_fan_reg(fan_min); ^ drivers/hwmon/w83791d.c:523:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83791d.c:558:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/w83791d.c:558:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/w83791d.c:714:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->pwm[nr]); ^~~~~~~ drivers/hwmon/w83791d.c:714:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->pwm[nr]); ^~~~~~~ drivers/hwmon/w83791d.c:755:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->pwm_enable[nr] + 1); ^~~~~~~ drivers/hwmon/w83791d.c:755:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->pwm_enable[nr] + 1); ^~~~~~~ drivers/hwmon/w83791d.c:821:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->temp_target[nr])); ^~~~~~~ drivers/hwmon/w83791d.c:821:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->temp_target[nr])); ^~~~~~~ drivers/hwmon/w83791d.c:862:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->temp_tolerance[nr])); ^~~~~~~ drivers/hwmon/w83791d.c:862:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->temp_tolerance[nr])); -- ^~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-smbus.c:655:3: note: Loop condition is true. Entering loop body while ((i + 2) <= length) { ^ drivers/i2c/i2c-core-smbus.c:656:13: note: Calling 'i2c_smbus_read_word_data' status = i2c_smbus_read_word_data(client, command + i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-smbus.c:181:11: note: Calling 'i2c_smbus_xfer' status = i2c_smbus_xfer(client->adapter, client->addr, client->flags, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-smbus.c:541:6: note: Assuming 'res' is not equal to 0 if (res) ^~~ drivers/i2c/i2c-core-smbus.c:541:2: note: Taking true branch if (res) ^ drivers/i2c/i2c-core-smbus.c:542:3: note: Returning without writing to 'data->word' return res; ^ drivers/i2c/i2c-core-smbus.c:181:11: note: Returning from 'i2c_smbus_xfer' status = i2c_smbus_xfer(client->adapter, client->addr, client->flags, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-smbus.c:184:10: note: Assuming 'status' is >= 0 return (status < 0) ? status : data.word; ^~~~~~~~~~ drivers/i2c/i2c-core-smbus.c:184:9: note: '?' condition is false return (status < 0) ? status : data.word; ^ drivers/i2c/i2c-core-smbus.c:184:2: note: Undefined or garbage value returned to caller return (status < 0) ? status : data.word; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-smbus.c:235: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(values, &data.block[1], data.block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:235: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(values, &data.block[1], data.block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:258: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.block[1], values, length); ^~~~~~ drivers/i2c/i2c-core-smbus.c:258: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.block[1], values, length); ^~~~~~ drivers/i2c/i2c-core-smbus.c:281: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(values, &data.block[1], data.block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:281: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(values, &data.block[1], data.block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:294: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.block + 1, values, length); ^~~~~~ drivers/i2c/i2c-core-smbus.c:294: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.block + 1, values, length); ^~~~~~ drivers/i2c/i2c-core-smbus.c:410:4: 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(msg[0].buf + 1, data->block, msg[0].len - 1); ^~~~~~ drivers/i2c/i2c-core-smbus.c:410:4: 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(msg[0].buf + 1, data->block, msg[0].len - 1); ^~~~~~ drivers/i2c/i2c-core-smbus.c:425:3: 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(msg[0].buf + 1, data->block, msg[0].len - 1); ^~~~~~ drivers/i2c/i2c-core-smbus.c:425:3: 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(msg[0].buf + 1, data->block, msg[0].len - 1); ^~~~~~ drivers/i2c/i2c-core-smbus.c:447:4: 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(msg[0].buf + 1, data->block + 1, data->block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:447:4: 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(msg[0].buf + 1, data->block + 1, data->block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:497:4: 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->block + 1, msg[1].buf, data->block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:497:4: 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->block + 1, msg[1].buf, data->block[0]); ^~~~~~ drivers/i2c/i2c-core-smbus.c:508:4: 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->block, msg[1].buf, msg[1].buf[0] + 1); ^~~~~~ drivers/i2c/i2c-core-smbus.c:508:4: 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->block, msg[1].buf, msg[1].buf[0] + 1); ^~~~~~ Suppressed 50 warnings (50 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 22 warnings generated. Suppressed 22 warnings (22 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. 37 warnings generated. >> drivers/staging/most/dim2/dim2.c:250: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(dev->mac_addrs, data + 19, 6); ^~~~~~ drivers/staging/most/dim2/dim2.c:250: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(dev->mac_addrs, data + 19, 6); ^~~~~~ >> drivers/staging/most/dim2/dim2.c:860:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(hdm_ch->name, sizeof(hdm_ch->name), "ca%d", i * 2 + 2); ^~~~~~~~ drivers/staging/most/dim2/dim2.c:860:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(hdm_ch->name, sizeof(hdm_ch->name), "ca%d", i * 2 + 2); ^~~~~~~~ drivers/staging/most/dim2/dim2.c:882:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(dev->name, sizeof(dev->name), fmt, res->start); ^~~~~~~~ drivers/staging/most/dim2/dim2.c:882:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(dev->name, sizeof(dev->name), fmt, res->start); ^~~~~~~~ Suppressed 34 warnings (34 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. 15 warnings generated. Suppressed 15 warnings (15 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. 41 warnings generated. drivers/hid/hid-lenovo.c:403:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", data->fn_lock); ^~~~~~~~ drivers/hid/hid-lenovo.c:403:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", data->fn_lock); ^~~~~~~~ drivers/hid/hid-lenovo.c:445:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/hid/hid-lenovo.c:445:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/hid/hid-lenovo.c:606:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->press_to_select); ^~~~~~~~ drivers/hid/hid-lenovo.c:606:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->press_to_select); ^~~~~~~~ drivers/hid/hid-lenovo.c:636:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->dragging); ^~~~~~~~ drivers/hid/hid-lenovo.c:636:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->dragging); ^~~~~~~~ drivers/hid/hid-lenovo.c:666:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->release_to_select); ^~~~~~~~ drivers/hid/hid-lenovo.c:666:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->release_to_select); ^~~~~~~~ drivers/hid/hid-lenovo.c:696:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->select_right); ^~~~~~~~ drivers/hid/hid-lenovo.c:696:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->select_right); ^~~~~~~~ drivers/hid/hid-lenovo.c:726:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/hid/hid-lenovo.c:726:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/hid/hid-lenovo.c:755:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/hid/hid-lenovo.c:755:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/hid/hid-lenovo.c:876:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name_mute, name_sz, "%s:amber:mute", dev_name(&hdev->dev)); ^~~~~~~~ drivers/hid/hid-lenovo.c:876:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name_mute, name_sz, "%s:amber:mute", dev_name(&hdev->dev)); ^~~~~~~~ drivers/hid/hid-lenovo.c:877:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name_micm, name_sz, "%s:amber:micmute", dev_name(&hdev->dev)); ^~~~~~~~ drivers/hid/hid-lenovo.c:877:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name_micm, name_sz, "%s:amber:micmute", dev_name(&hdev->dev)); ^~~~~~~~ include/linux/hid.h:1037:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference] input->name, c, type); ^ drivers/hid/hid-lenovo.c:321:2: note: Control jumps to 'case 12544:' at line 329 switch (hdev->product) { ^ drivers/hid/hid-lenovo.c:335:10: note: Calling 'lenovo_input_mapping_scrollpoint' return lenovo_input_mapping_scrollpoint(hdev, hi, field, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-lenovo.c:224:6: note: Assuming field 'hid' is equal to HID_GD_Z if (usage->hid == HID_GD_Z) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-lenovo.c:224:2: note: Taking true branch if (usage->hid == HID_GD_Z) { ^ drivers/hid/hid-lenovo.c:225:3: note: Calling 'hid_map_usage' hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1008:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1012:2: note: Control jumps to 'case 2:' at line 1017 switch (type) { -- ^~~~~~ drivers/scsi/libsas/sas_discover.c:144: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(port->disc.eeds_b, 0, SAS_ADDR_SIZE); ^~~~~~ drivers/scsi/libsas/sas_discover.c:248:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] list_for_each_entry(dev, &port->dev_list, dev_list_node) ^ include/linux/list.h:640:13: note: expanded from macro 'list_for_each_entry' pos = list_next_entry(pos, member)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:18:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~~~ drivers/scsi/libsas/sas_discover.c:248:2: note: Loop condition is true. Entering loop body list_for_each_entry(dev, &port->dev_list, dev_list_node) ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ drivers/scsi/libsas/sas_discover.c:249:3: note: Calling 'sas_notify_lldd_dev_gone' sas_notify_lldd_dev_gone(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:198:6: note: Assuming field 'lldd_dev_gone' is non-null if (!i->dft->lldd_dev_gone) ^~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:198:2: note: Taking false branch if (!i->dft->lldd_dev_gone) ^ drivers/scsi/libsas/sas_discover.c:201:6: note: Assuming the condition is true if (test_and_clear_bit(SAS_DEV_FOUND, &dev->state)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:201:2: note: Taking true branch if (test_and_clear_bit(SAS_DEV_FOUND, &dev->state)) { ^ drivers/scsi/libsas/sas_discover.c:203:3: note: Calling 'sas_put_device' sas_put_device(dev); ^~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_internal.h:191:2: note: Calling 'kref_put' kref_put(&dev->kref, sas_free_device); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kref.h:64:6: note: Assuming the condition is true if (refcount_dec_and_test(&kref->refcount)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kref.h:64:2: note: Taking true branch if (refcount_dec_and_test(&kref->refcount)) { ^ include/linux/kref.h:65:3: note: Calling 'sas_free_device' release(kref); ^~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:292:6: note: Assuming field 'parent' is null if (dev->parent) ^~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:292:2: note: Taking false branch if (dev->parent) ^ drivers/scsi/libsas/sas_discover.c:299:2: note: Taking false branch if (dev_is_expander(dev->dev_type)) ^ drivers/scsi/libsas/sas_discover.c:302:23: note: Left side of '&&' is false if (dev_is_sata(dev) && dev->sata_dev.ap) { ^ drivers/scsi/libsas/sas_discover.c:310:2: note: Memory is released kfree(dev); ^~~~~~~~~~ include/linux/kref.h:65:3: note: Returning; memory was released release(kref); ^~~~~~~~~~~~~ drivers/scsi/libsas/sas_internal.h:191:2: note: Returning; memory was released kref_put(&dev->kref, sas_free_device); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:203:3: note: Returning; memory was released sas_put_device(dev); ^~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:249:3: note: Returning; memory was released sas_notify_lldd_dev_gone(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:248:2: note: Use of memory after it is freed list_for_each_entry(dev, &port->dev_list, dev_list_node) ^ include/linux/list.h:640:13: note: expanded from macro 'list_for_each_entry' pos = list_next_entry(pos, member)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:18:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~~~ Suppressed 52 warnings (52 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. 36 warnings generated. >> drivers/input/keyboard/stowaway.c:85:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(skbd->phys, sizeof(skbd->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/keyboard/stowaway.c:85:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(skbd->phys, sizeof(skbd->phys), "%s/input0", serio->phys); ^~~~~~~~ >> drivers/input/keyboard/stowaway.c:86: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(skbd->keycode, skbd_keycode, sizeof(skbd->keycode)); ^~~~~~ drivers/input/keyboard/stowaway.c:86: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(skbd->keycode, skbd_keycode, sizeof(skbd->keycode)); ^~~~~~ Suppressed 34 warnings (34 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. 49 warnings generated. drivers/hwmon/g760a.c:117:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", rpm); ^~~~~~~ drivers/hwmon/g760a.c:117:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", rpm); ^~~~~~~ drivers/hwmon/g760a.c:127:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", fan_alarm); ^~~~~~~ drivers/hwmon/g760a.c:127:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", fan_alarm); ^~~~~~~ drivers/hwmon/g760a.c:135:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", PWM_FROM_CNT(data->set_cnt)); ^~~~~~~ drivers/hwmon/g760a.c:135:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", PWM_FROM_CNT(data->set_cnt)); ^~~~~~~ Suppressed 46 warnings (46 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. 65 warnings generated. drivers/hwmon/gl520sm.c:193:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); ^~~~~~~ drivers/hwmon/gl520sm.c:193:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); ^~~~~~~ drivers/hwmon/gl520sm.c:213:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", VDD_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:213:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", VDD_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:215:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", IN_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:215:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", IN_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:226:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", VDD_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:226:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", VDD_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:228:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", IN_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:228:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", IN_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:239:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", VDD_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:239:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", VDD_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:241:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", IN_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:241:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", IN_FROM_REG(r)); ^~~~~~~ drivers/hwmon/gl520sm.c:344:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_input[n], ^~~~~~~ drivers/hwmon/gl520sm.c:344:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_input[n], ^~~~~~~ drivers/hwmon/gl520sm.c:354:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[n], ^~~~~~~ drivers/hwmon/gl520sm.c:354:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[n], ^~~~~~~ drivers/hwmon/gl520sm.c:364:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); ^~~~~~~ drivers/hwmon/gl520sm.c:364:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); ^~~~~~~ drivers/hwmon/gl520sm.c:371:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->fan_off); ^~~~~~~ drivers/hwmon/gl520sm.c:371:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->fan_off); ^~~~~~~ drivers/hwmon/gl520sm.c:507:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_input[n])); ^~~~~~~ drivers/hwmon/gl520sm.c:507:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_input[n])); -- if (ret < 0) ^ drivers/hwmon/ad7418.c:170:28: note: Calling 'LM75_TEMP_TO_REG' data->temp[attr->index] = LM75_TEMP_TO_REG(temp); ^~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm75.h:27:14: note: Assuming '__UNIQUE_ID___x262' is <= '__UNIQUE_ID___y263' int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:104:48: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/hwmon/lm75.h:27:14: note: '?' condition is false int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^ include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/hwmon/lm75.h:27:14: note: '__UNIQUE_ID___x264' is < '__UNIQUE_ID___y265' int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:104:27: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~ drivers/hwmon/lm75.h:27:14: note: '?' condition is true int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^ include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^ include/linux/minmax.h:104:27: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/hwmon/lm75.h:29:12: note: 'ntemp' is < 0 ntemp += (ntemp < 0 ? -250 : 250); ^~~~~ drivers/hwmon/lm75.h:29:12: note: '?' condition is true drivers/hwmon/lm75.h:30:29: note: The result of the left shift is undefined because the left operand is negative return (u16)((ntemp / 500) << 7); ~~~~~~~~~~~~~ ^ Suppressed 46 warnings (46 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. 37 warnings generated. >> drivers/input/keyboard/sunkbd.c:278:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(sunkbd->phys, sizeof(sunkbd->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/keyboard/sunkbd.c:278:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(sunkbd->phys, sizeof(sunkbd->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/keyboard/sunkbd.c:291:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(sunkbd->name, sizeof(sunkbd->name), ^~~~~~~~ drivers/input/keyboard/sunkbd.c:291:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(sunkbd->name, sizeof(sunkbd->name), ^~~~~~~~ >> drivers/input/keyboard/sunkbd.c:293: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(sunkbd->keycode, sunkbd_keycode, sizeof(sunkbd->keycode)); ^~~~~~ drivers/input/keyboard/sunkbd.c:293: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(sunkbd->keycode, sunkbd_keycode, sizeof(sunkbd->keycode)); ^~~~~~ Suppressed 34 warnings (34 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. 20 warnings generated. drivers/mtd/nand/raw/ams-delta.c:199:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &nand_to_mtd(this)->dev; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/ams-delta.c:199:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &nand_to_mtd(this)->dev; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 19 warnings (19 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. 55 warnings generated. >> drivers/mtd/nand/raw/nandsim.c:770: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(ns->buf.byte, 0xFF, ns->geom.pgszoob); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:770: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(ns->buf.byte, 0xFF, ns->geom.pgszoob); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1434:4: 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(ns->buf.byte, 0xFF, num); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1434:4: 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(ns->buf.byte, 0xFF, num); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1458: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(ns->buf.byte, 0xFF, num); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1458: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(ns->buf.byte, 0xFF, num); ^~~~~~ >> drivers/mtd/nand/raw/nandsim.c:1464:3: 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(ns->buf.byte, NS_PAGE_BYTE_OFF(ns), num); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1464:3: 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(ns->buf.byte, NS_PAGE_BYTE_OFF(ns), num); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1516:4: 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(ns->file_buf, 0xff, ns->geom.pgszoob); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1516:4: 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(ns->file_buf, 0xff, ns->geom.pgszoob); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1560: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(mypage->byte, 0xFF, ns->geom.pgszoob); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:1560: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(mypage->byte, 0xFF, ns->geom.pgszoob); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:2112: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(ns->buf.byte + ns->regs.count, buf, len); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:2112: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(ns->buf.byte + ns->regs.count, buf, len); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:2155: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(buf, ns->buf.byte + ns->regs.count, len); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:2155: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(buf, ns->buf.byte + ns->regs.count, len); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:2310: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(ns->ids, id_bytes, sizeof(ns->ids)); ^~~~~~ drivers/mtd/nand/raw/nandsim.c:2310: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(ns->ids, id_bytes, sizeof(ns->ids)); ^~~~~~ Suppressed 46 warnings (46 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. 49 warnings generated. drivers/hwmon/lm77.c:137:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp[attr->index]); ^~~~~~~ drivers/hwmon/lm77.c:137:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp[attr->index]); ^~~~~~~ drivers/hwmon/lm77.c:151:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp); ^~~~~~~ drivers/hwmon/lm77.c:151:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp); ^~~~~~~ drivers/hwmon/lm77.c:208:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/lm77.c:208:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ Suppressed 46 warnings (46 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. 53 warnings generated. drivers/hwmon/lm80.c:268:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr][index])); ^~~~~~~ drivers/hwmon/lm80.c:268:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr][index])); ^~~~~~~ drivers/hwmon/lm80.c:301:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr][index], ^~~~~~~ drivers/hwmon/lm80.c:301:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr][index], ^~~~~~~ drivers/hwmon/lm80.c:312:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/lm80.c:312:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/lm80.c:408:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index])); ^~~~~~~ drivers/hwmon/lm80.c:408:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index])); ^~~~~~~ drivers/hwmon/lm80.c:425:19: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] data->temp[nr] = TEMP_TO_REG(val); ^ drivers/hwmon/lm80.c:78:30: note: expanded from macro 'TEMP_TO_REG' -128000, 127000), 1000) << 8) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ drivers/hwmon/lm80.c:421:6: note: Assuming 'err' is >= 0 if (err < 0) ^~~~~~~ drivers/hwmon/lm80.c:421:2: note: Taking false branch if (err < 0) ^ drivers/hwmon/lm80.c:425:19: note: Assuming '__UNIQUE_ID___x274' is <= '__UNIQUE_ID___y275' data->temp[nr] = TEMP_TO_REG(val); ^ drivers/hwmon/lm80.c:77:46: note: expanded from macro 'TEMP_TO_REG' #define TEMP_TO_REG(temp) (DIV_ROUND_CLOSEST(clamp_val((temp), \ -- ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ include/linux/hid.h:1036:3: note: Loop condition is false. Exiting loop pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. 36 warnings generated. >> drivers/hwmon/max31722.c:59:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (s16)le16_to_cpu(ret) * 125 / 32); ^~~~~~~ drivers/hwmon/max31722.c:59:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (s16)le16_to_cpu(ret) * 125 / 32); ^~~~~~~ Suppressed 35 warnings (35 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. 54 warnings generated. drivers/hwmon/max6639.c:163:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", temp); ^~~~~~~ drivers/hwmon/max6639.c:163:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", temp); ^~~~~~~ drivers/hwmon/max6639.c:175:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_fault[attr->index]); ^~~~~~~ drivers/hwmon/max6639.c:175:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_fault[attr->index]); ^~~~~~~ drivers/hwmon/max6639.c:184:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->temp_therm[attr->index] * 1000)); ^~~~~~~ drivers/hwmon/max6639.c:184:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->temp_therm[attr->index] * 1000)); ^~~~~~~ drivers/hwmon/max6639.c:216:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->temp_alert[attr->index] * 1000)); ^~~~~~~ drivers/hwmon/max6639.c:216:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->temp_alert[attr->index] * 1000)); ^~~~~~~ drivers/hwmon/max6639.c:249:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->temp_ot[attr->index] * 1000)); ^~~~~~~ drivers/hwmon/max6639.c:249:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->temp_ot[attr->index] * 1000)); ^~~~~~~ drivers/hwmon/max6639.c:281:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm[attr->index] * 255 / 120); ^~~~~~~ drivers/hwmon/max6639.c:281:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm[attr->index] * 255 / 120); ^~~~~~~ drivers/hwmon/max6639.c:318:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], ^~~~~~~ drivers/hwmon/max6639.c:318:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], ^~~~~~~ drivers/hwmon/max6639.c:331:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !!(data->status & (1 << attr->index))); ^~~~~~~ drivers/hwmon/max6639.c:331:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !!(data->status & (1 << attr->index))); ^~~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. drivers/nvme/target/io-cmd-file.c:166: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(&req->f.iocb, 0, sizeof(struct kiocb)); ^~~~~~ drivers/nvme/target/io-cmd-file.c:166: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(&req->f.iocb, 0, sizeof(struct kiocb)); ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 52 warnings generated. >> drivers/nvme/target/passthru.c:106: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(id->subnqn, ctrl->subsysnqn, sizeof(id->subnqn)); ^~~~~~ drivers/nvme/target/passthru.c:106: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(id->subnqn, ctrl->subsysnqn, sizeof(id->subnqn)); ^~~~~~ >> drivers/nvme/target/passthru.c:144:4: 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(&id->lbaf[i], 0, sizeof(id->lbaf[i])); ^~~~~~ drivers/nvme/target/passthru.c:144:4: 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(&id->lbaf[i], 0, sizeof(id->lbaf[i])); ^~~~~~ Suppressed 50 warnings (50 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. 48 warnings generated. include/linux/blkdev.h:522:16: warning: The result of the right shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] return sector >> ilog2(q->limits.chunk_sectors); ^ drivers/nvme/target/zns.c:467:26: note: Calling 'bdev_zone_sectors' sector_t zone_sectors = bdev_zone_sectors(bdev); ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:1118:6: note: Assuming 'q' is non-null if (q) ^ include/linux/blkdev.h:1118:2: note: Taking true branch if (q) ^ include/linux/blkdev.h:1119:10: note: Calling 'blk_queue_zone_sectors' return blk_queue_zone_sectors(q); ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:508:9: note: Calling 'blk_queue_is_zoned' return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0; ^~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:497:10: note: Calling 'blk_queue_zoned_model' switch (blk_queue_zoned_model(q)) { ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:490:2: note: Taking true branch if (IS_ENABLED(CONFIG_BLK_DEV_ZONED)) ^ include/linux/blkdev.h:491:3: note: Returning without writing to 'q->limits.zoned', which participates in a condition later return q->limits.zoned; ^ include/linux/blkdev.h:497:10: note: Returning from 'blk_queue_zoned_model' switch (blk_queue_zoned_model(q)) { ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:497:2: note: Control jumps to 'case BLK_ZONED_HM:' at line 499 switch (blk_queue_zoned_model(q)) { ^ include/linux/blkdev.h:500:3: note: Returning without writing to 'q->limits.zoned', which participates in a condition later return true; ^ include/linux/blkdev.h:508:9: note: Returning from 'blk_queue_is_zoned' return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0; ^~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:508:9: note: '?' condition is true include/linux/blkdev.h:508:2: note: Returning without writing to 'q->limits.zoned', which participates in a condition later return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0; ^ include/linux/blkdev.h:1119:10: note: Returning from 'blk_queue_zone_sectors' return blk_queue_zone_sectors(q); ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:467:26: note: Returning from 'bdev_zone_sectors' sector_t zone_sectors = bdev_zone_sectors(bdev); ^~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:471:6: note: 'op' is not equal to REQ_OP_LAST if (op == REQ_OP_LAST) { ^~ drivers/nvme/target/zns.c:471:2: note: Taking false branch if (op == REQ_OP_LAST) { ^ drivers/nvme/target/zns.c:478:6: note: Assuming field 'select_all' is not equal to 0 if (req->cmd->zms.select_all) { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:478:2: note: Taking true branch if (req->cmd->zms.select_all) { ^ drivers/nvme/target/zns.c:479:12: note: Calling 'nvmet_bdev_execute_zmgmt_send_all' status = nvmet_bdev_execute_zmgmt_send_all(req); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:440:2: note: Control jumps to 'case REQ_OP_ZONE_FINISH:' at line 450 switch (zsa_req_op(req->cmd->zms.zsa)) { ^ drivers/nvme/target/zns.c:451:10: note: Calling 'nvmet_bdev_zone_mgmt_emulate_all' return nvmet_bdev_zone_mgmt_emulate_all(req); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:397:6: note: Assuming field 'zbitmap' is non-null if (!d.zbitmap) { ^~~~~~~~~~ drivers/nvme/target/zns.c:397:2: note: Taking false branch if (!d.zbitmap) { ^ drivers/nvme/target/zns.c:404:6: note: Assuming 'ret' is equal to 'nr_zones' if (ret != nr_zones) { ^~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:404:2: note: Taking false branch if (ret != nr_zones) { ^ drivers/nvme/target/zns.c:413:9: note: Assuming the condition is true while (sector < get_capacity(bdev->bd_disk)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/target/zns.c:413:2: note: Loop condition is true. Entering loop body while (sector < get_capacity(bdev->bd_disk)) { ^ drivers/nvme/target/zns.c:414:16: note: Calling 'blk_queue_zone_no' if (test_bit(blk_queue_zone_no(q, sector), d.zbitmap)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/blkdev.h:520:7: note: Calling 'blk_queue_is_zoned' -- ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ include/linux/hid.h:1036:3: note: Loop condition is false. Exiting loop pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 35 warnings generated. drivers/input/rmi4/rmi_f3a.c:70:3: 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(f3a->data_regs, drvdata->attn_data.data, ^~~~~~ drivers/input/rmi4/rmi_f3a.c:70:3: 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(f3a->data_regs, drvdata->attn_data.data, ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 47 warnings generated. drivers/input/rmi4/rmi_i2c.c:105: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(rmi_i2c->tx_buf + 1, buf, len); ^~~~~~ drivers/input/rmi4/rmi_i2c.c:105: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(rmi_i2c->tx_buf + 1, buf, len); ^~~~~~ Suppressed 46 warnings (46 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. 50 warnings generated. >> drivers/hwmon/adc128d818.c:159:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", val); ^~~~~~~ drivers/hwmon/adc128d818.c:159:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", val); ^~~~~~~ drivers/hwmon/adc128d818.c:199:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp * 500);/* 0.5 degrees C resolution */ ^~~~~~~ drivers/hwmon/adc128d818.c:199:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp * 500);/* 0.5 degrees C resolution */ ^~~~~~~ drivers/hwmon/adc128d818.c:218:29: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] data->temp[index] = regval << 1; ~~~~~~ ^ drivers/hwmon/adc128d818.c:213:6: note: Assuming 'err' is >= 0 if (err < 0) ^~~~~~~ drivers/hwmon/adc128d818.c:213:2: note: Taking false branch if (err < 0) ^ drivers/hwmon/adc128d818.c:217:21: note: Left side of '||' is false regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); ^ include/linux/math.h:89:3: note: expanded from macro 'DIV_ROUND_CLOSEST' (((typeof(x))-1) > 0 || \ ^ drivers/hwmon/adc128d818.c:217:21: note: Left side of '||' is false regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); ^ include/linux/math.h:89:3: note: expanded from macro 'DIV_ROUND_CLOSEST' (((typeof(x))-1) > 0 || \ ^ drivers/hwmon/adc128d818.c:217:21: note: Assuming '__x' is <= 0 regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); ^ include/linux/math.h:91:5: note: expanded from macro 'DIV_ROUND_CLOSEST' (((__x) > 0) == ((__d) > 0))) ? \ ^~~~~~~~~ include/linux/minmax.h:137:53: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~ include/linux/minmax.h:124:60: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^~~ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:104:48: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/hwmon/adc128d818.c:217:21: note: '?' condition is false regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); ^ include/linux/math.h:89:2: note: expanded from macro 'DIV_ROUND_CLOSEST' (((typeof(x))-1) > 0 || \ ^ drivers/hwmon/adc128d818.c:217:11: note: Assuming '__UNIQUE_ID___x266' is <= '__UNIQUE_ID___y267' regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:104:48: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/hwmon/adc128d818.c:217:11: note: '?' condition is false regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^ include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ -- ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ include/linux/hid.h:1036:3: note: Loop condition is false. Exiting loop pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. 38 warnings generated. >> drivers/hwmon/adt7x10.c:235:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ADT7X10_REG_TO_TEMP(data, ^~~~~~~ drivers/hwmon/adt7x10.c:235:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ADT7X10_REG_TO_TEMP(data, ^~~~~~~ drivers/hwmon/adt7x10.c:278:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adt7x10.c:278:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adt7x10.c:315:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !!(ret & attr->index)); ^~~~~~~ drivers/hwmon/adt7x10.c:315:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !!(ret & attr->index)); ^~~~~~~ >> drivers/hwmon/adt7x10.c:323:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", data->name); ^~~~~~~ drivers/hwmon/adt7x10.c:323:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", data->name); ^~~~~~~ Suppressed 34 warnings (34 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. 35 warnings generated. Suppressed 35 warnings (35 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. Suppressed 46 warnings (46 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. 3 warnings generated. security/keys/encrypted-keys/ecryptfs_format.c:57:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy((char *)auth_tok->token.password.signature, key_desc, ^~~~~~~ security/keys/encrypted-keys/ecryptfs_format.c:57:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy((char *)auth_tok->token.password.signature, key_desc, ^~~~~~~ Suppressed 2 warnings (2 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 33 warnings generated. Suppressed 33 warnings (33 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. 13 warnings generated. Suppressed 13 warnings (13 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. 49 warnings generated. drivers/md/dm-delay.c:145:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[1], "%llu%c", &tmpll, &dummy) != 1 || tmpll != (sector_t)tmpll) { ^~~~~~ drivers/md/dm-delay.c:145:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[1], "%llu%c", &tmpll, &dummy) != 1 || tmpll != (sector_t)tmpll) { ^~~~~~ drivers/md/dm-delay.c:151:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[2], "%u%c", &c->delay, &dummy) != 1) { ^~~~~~ drivers/md/dm-delay.c:151:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[2], "%u%c", &c->delay, &dummy) != 1) { ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. drivers/mtd/ubi/vmt.c:76:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", vol->reserved_pebs); ^~~~~~~ drivers/mtd/ubi/vmt.c:76:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", vol->reserved_pebs); ^~~~~~~ drivers/mtd/ubi/vmt.c:84:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%s\n", tp); ^~~~~~~ drivers/mtd/ubi/vmt.c:84:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 ret = sprintf(buf, "%s\n", tp); ^~~~~~~ drivers/mtd/ubi/vmt.c:86:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%s\n", vol->name); ^~~~~~~ drivers/mtd/ubi/vmt.c:86:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 ret = sprintf(buf, "%s\n", vol->name); ^~~~~~~ drivers/mtd/ubi/vmt.c:88:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", vol->corrupted); ^~~~~~~ drivers/mtd/ubi/vmt.c:88:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", vol->corrupted); ^~~~~~~ drivers/mtd/ubi/vmt.c:90:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", vol->alignment); ^~~~~~~ drivers/mtd/ubi/vmt.c:90:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", vol->alignment); ^~~~~~~ drivers/mtd/ubi/vmt.c:92:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", vol->usable_leb_size); ^~~~~~~ drivers/mtd/ubi/vmt.c:92:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", vol->usable_leb_size); ^~~~~~~ drivers/mtd/ubi/vmt.c:94:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%lld\n", vol->used_bytes); ^~~~~~~ drivers/mtd/ubi/vmt.c:94:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%lld\n", vol->used_bytes); ^~~~~~~ drivers/mtd/ubi/vmt.c:96:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%d\n", vol->upd_marker); ^~~~~~~ drivers/mtd/ubi/vmt.c:96:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%d\n", vol->upd_marker); ^~~~~~~ drivers/mtd/ubi/vmt.c:230: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(vol->name, req->name, vol->name_len); -- drivers/mux/mmio.c:47:6: note: Assuming the condition is false if (of_device_is_compatible(np, "mmio-mux")) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mux/mmio.c:47:2: note: Taking false branch if (of_device_is_compatible(np, "mmio-mux")) ^ drivers/mux/mmio.c:50:12: note: '?' condition is true regmap = dev_get_regmap(dev->parent, NULL) ?: ERR_PTR(-ENODEV); ^ drivers/mux/mmio.c:51:6: note: Calling 'IS_ERR' if (IS_ERR(regmap)) { ^~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mux/mmio.c:51:6: note: Returning from 'IS_ERR' if (IS_ERR(regmap)) { ^~~~~~~~~~~~~~ drivers/mux/mmio.c:51:2: note: Taking false branch if (IS_ERR(regmap)) { ^ drivers/mux/mmio.c:58:6: note: Assuming 'ret' is not equal to 0 if (ret == 0 || ret % 2) ^~~~~~~~ drivers/mux/mmio.c:58:6: note: Left side of '||' is false drivers/mux/mmio.c:58:18: note: Assuming the condition is false if (ret == 0 || ret % 2) ^~~~~~~ drivers/mux/mmio.c:58:2: note: Taking false branch if (ret == 0 || ret % 2) ^ drivers/mux/mmio.c:60:6: note: Assuming 'ret' is >= 0 if (ret < 0) { ^~~~~~~ drivers/mux/mmio.c:60:2: note: Taking false branch if (ret < 0) { ^ drivers/mux/mmio.c:69:6: note: Calling 'IS_ERR' if (IS_ERR(mux_chip)) ^~~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mux/mmio.c:69:6: note: Returning from 'IS_ERR' if (IS_ERR(mux_chip)) ^~~~~~~~~~~~~~~~ drivers/mux/mmio.c:69:2: note: Taking false branch if (IS_ERR(mux_chip)) ^ drivers/mux/mmio.c:74:14: note: Assuming 'i' is < 'num_fields' for (i = 0; i < num_fields; i++) { ^~~~~~~~~~~~~~ drivers/mux/mmio.c:74:2: note: Loop condition is true. Entering loop body for (i = 0; i < num_fields; i++) { ^ drivers/mux/mmio.c:76:3: note: 'field' initialized here struct reg_field field; ^~~~~~~~~~~~~~~~~~~~~~ drivers/mux/mmio.c:83:7: note: Assuming 'ret' is 0 if (!ret) ^~~~ drivers/mux/mmio.c:83:3: note: Taking true branch if (!ret) ^ drivers/mux/mmio.c:86:7: note: Assuming 'ret' is >= 0 if (ret < 0) { ^~~~~~~ drivers/mux/mmio.c:86:3: note: Taking false branch if (ret < 0) { ^ drivers/mux/mmio.c:96:7: note: Assuming the condition is false if (mask != GENMASK(field.msb, field.lsb)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mux/mmio.c:96:3: note: Taking false branch if (mask != GENMASK(field.msb, field.lsb)) { ^ drivers/mux/mmio.c:102:15: note: Passed-by-value struct argument contains uninitialized data (e.g., field: 'id_size') fields[i] = devm_regmap_field_alloc(dev, regmap, field); ^ ~~~~~ Suppressed 22 warnings (22 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. 24 warnings generated. >> drivers/hwmon/smsc47b397.c:164:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp_from_reg(data->temp[attr->index])); ^~~~~~~ drivers/hwmon/smsc47b397.c:164:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp_from_reg(data->temp[attr->index])); ^~~~~~~ drivers/hwmon/smsc47b397.c:188:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", fan_from_reg(data->fan[attr->index])); ^~~~~~~ drivers/hwmon/smsc47b397.c:188:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", fan_from_reg(data->fan[attr->index])); ^~~~~~~ Suppressed 22 warnings (22 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. 30 warnings generated. >> drivers/hwmon/smsc47m1.c:213:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", rpm); ^~~~~~~ drivers/hwmon/smsc47m1.c:213:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", rpm); ^~~~~~~ drivers/hwmon/smsc47m1.c:224:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", rpm); ^~~~~~~ drivers/hwmon/smsc47m1.c:224:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", rpm); ^~~~~~~ drivers/hwmon/smsc47m1.c:232:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); ^~~~~~~ drivers/hwmon/smsc47m1.c:232:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); ^~~~~~~ drivers/hwmon/smsc47m1.c:240:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/smsc47m1.c:240:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/smsc47m1.c:248:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[attr->index])); ^~~~~~~ drivers/hwmon/smsc47m1.c:248:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[attr->index])); ^~~~~~~ drivers/hwmon/smsc47m1.c:256:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", PWM_EN_FROM_REG(data->pwm[attr->index])); ^~~~~~~ drivers/hwmon/smsc47m1.c:256:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", PWM_EN_FROM_REG(data->pwm[attr->index])); ^~~~~~~ drivers/hwmon/smsc47m1.c:263:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->alarms); ^~~~~~~ drivers/hwmon/smsc47m1.c:263:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->alarms); ^~~~~~~ >> drivers/hwmon/smsc47m1.c:448:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", data->name); ^~~~~~~ drivers/hwmon/smsc47m1.c:448:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", data->name); ^~~~~~~ Suppressed 22 warnings (22 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. 31 warnings generated. drivers/hid/hid-cmedia.c:128: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(cm->switch_map, jack_switch_types, sizeof(cm->switch_map)); ^~~~~~ drivers/hid/hid-cmedia.c:128: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(cm->switch_map, jack_switch_types, sizeof(cm->switch_map)); ^~~~~~ Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 31 warnings generated. include/linux/hid.h:1037:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference] input->name, c, type); ^ drivers/hid/hid-ezkey.c:29:6: note: Assuming the condition is false if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-ezkey.c:29:2: note: Taking false branch if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) ^ drivers/hid/hid-ezkey.c:32:2: note: Control jumps to 'case 562:' at line 40 switch (usage->hid & HID_USAGE) { ^ drivers/hid/hid-ezkey.c:40:14: note: Calling 'hid_map_usage' case 0x232: ez_map_rel(REL_HWHEEL); break; ^ drivers/hid/hid-ezkey.c:22:23: note: expanded from macro 'ez_map_rel' #define ez_map_rel(c) hid_map_usage(hi, usage, bit, max, EV_REL, (c)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1008:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1012:2: note: Control jumps to 'case 2:' at line 1017 switch (type) { ^ include/linux/hid.h:1020:3: note: Execution continues on line 1035 break; ^ include/linux/hid.h:1035:15: note: 'c' is <= 'limit' if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:15: note: Left side of '||' is false if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1035:28: note: Assuming 'bmap' is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:2: note: Taking true branch if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1036:3: note: Assuming the condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:639:6: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:41:28: note: expanded from macro '__ratelimit' #define __ratelimit(state) ___ratelimit(state, __func__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1036:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:639:2: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^ include/linux/hid.h:1036:3: note: Left side of '&&' is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) -- ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ include/linux/hid.h:1036:3: note: Loop condition is false. Exiting loop pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 47 warnings generated. >> fs/minix/bitmap.c:259: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(&minix_i(inode)->u, 0, sizeof(minix_i(inode)->u)); ^~~~~~ fs/minix/bitmap.c:259: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(&minix_i(inode)->u, 0, sizeof(minix_i(inode)->u)); ^~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 71 warnings generated. drivers/md/bcache/btree.c:371: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] bkey_copy(&k.key, &b->key); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/btree.c:371: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 bkey_copy(&k.key, &b->key); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/btree.c:381:4: 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(page_address(bv->bv_page), addr, PAGE_SIZE); ^~~~~~ drivers/md/bcache/btree.c:381:4: 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(page_address(bv->bv_page), addr, PAGE_SIZE); ^~~~~~ drivers/md/bcache/btree.c:939: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] bkey_copy(&b->key, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/btree.c:939: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 bkey_copy(&b->key, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/btree.c:1159: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] bkey_copy(k, &b->key); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/btree.c:1159: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 bkey_copy(k, &b->key); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/btree.c:1340: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(new_nodes, 0, sizeof(new_nodes)); ^~~~~~ drivers/md/bcache/btree.c:1340: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(new_nodes, 0, sizeof(new_nodes)); ^~~~~~ drivers/md/bcache/btree.c:1415:3: 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(bset_bkey_last(n1), ^~~~~~ drivers/md/bcache/btree.c:1415:3: 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(bset_bkey_last(n1), ^~~~~~ drivers/md/bcache/btree.c:1422:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(n2->start, ^~~~~~~ drivers/md/bcache/btree.c:1422:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(n2->start, ^~~~~~~ drivers/md/bcache/btree.c:1466:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(r, r + 1, sizeof(r[0]) * (nodes - 1)); ^~~~~~~ drivers/md/bcache/btree.c:1466:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(r, r + 1, sizeof(r[0]) * (nodes - 1)); ^~~~~~~ drivers/md/bcache/btree.c:1633:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(r + 1, r, sizeof(r[0]) * (GC_MERGE_NODES - 1)); ^~~~~~~ drivers/md/bcache/btree.c:1633:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(r + 1, r, sizeof(r[0]) * (GC_MERGE_NODES - 1)); ^~~~~~~ drivers/md/bcache/btree.c:1796: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(&stats, 0, sizeof(struct gc_stat)); ^~~~~~ drivers/md/bcache/btree.c:1796: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(&stats, 0, sizeof(struct gc_stat)); ^~~~~~ drivers/md/bcache/btree.c:1823: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(&c->gc_stats, &stats, sizeof(struct gc_stat)); ^~~~~~ drivers/md/bcache/btree.c:1823: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(&c->gc_stats, &stats, sizeof(struct gc_stat)); ^~~~~~ drivers/md/bcache/btree.c:1921:2: warning: Value stored to 'cur_idx' is never read [clang-analyzer-deadcode.DeadStores] cur_idx = prev_idx = 0; ^ ~~~~~~~~~~~~ drivers/md/bcache/btree.c:1921:2: note: Value stored to 'cur_idx' is never read cur_idx = prev_idx = 0; -- ^ include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word' (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ ^ include/linux/list.h:37:2: note: Left side of '||' is true WRITE_ONCE(list->next, list); ^ include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:314:28: note: expanded from macro '__native_word' sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) ^ include/linux/list.h:37:2: note: Taking false branch WRITE_ONCE(list->next, list); ^ include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:326:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ include/linux/list.h:37:2: note: Loop condition is false. Exiting loop WRITE_ONCE(list->next, list); ^ include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert' do { \ ^ include/linux/list.h:37:2: note: Loop condition is false. Exiting loop WRITE_ONCE(list->next, list); ^ include/asm-generic/rwonce.h:61:2: note: expanded from macro 'WRITE_ONCE' __WRITE_ONCE(x, val); \ ^ include/asm-generic/rwonce.h:53:35: note: expanded from macro '__WRITE_ONCE' #define __WRITE_ONCE(x, val) \ ^ include/linux/list.h:37:2: note: Loop condition is false. Exiting loop WRITE_ONCE(list->next, list); ^ include/asm-generic/rwonce.h:58:33: note: expanded from macro 'WRITE_ONCE' #define WRITE_ONCE(x, val) \ ^ drivers/mtd/ubi/fastmap.c:564:2: note: Returning from 'INIT_LIST_HEAD' INIT_LIST_HEAD(&used); ^~~~~~~~~~~~~~~~~~~~~ drivers/mtd/ubi/fastmap.c:571:6: note: Assuming 'fm_pos' is >= 'fm_size' if (fm_pos >= fm_size) ^~~~~~~~~~~~~~~~~ drivers/mtd/ubi/fastmap.c:571:2: note: Taking true branch if (fm_pos >= fm_size) ^ drivers/mtd/ubi/fastmap.c:572:3: note: Control jumps to line 787 goto fail_bad; ^ drivers/mtd/ubi/fastmap.c:789:2: note: Assigned value is garbage or undefined list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &used, u.list) { ^ include/linux/list.h:726:7: note: expanded from macro 'list_for_each_entry_safe' n = list_next_entry(pos, member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:18:2: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^ ~~~~~~~~~~~~~ >> drivers/mtd/ubi/fastmap.c:880: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(ubi->fm_buf, 0, ubi->fm_size); ^~~~~~ drivers/mtd/ubi/fastmap.c:880: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(ubi->fm_buf, 0, ubi->fm_size); ^~~~~~ drivers/mtd/ubi/fastmap.c:1143: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(ubi->fm_buf, 0, ubi->fm_size); ^~~~~~ drivers/mtd/ubi/fastmap.c:1143: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(ubi->fm_buf, 0, ubi->fm_size); ^~~~~~ Suppressed 35 warnings (35 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. 49 warnings generated. drivers/hwmon/atxp1.c:83:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] size = sprintf(buf, "%d\n", vid_from_reg(data->reg.vid & ATXP1_VIDMASK, ^~~~~~~ drivers/hwmon/atxp1.c:83:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 size = sprintf(buf, "%d\n", vid_from_reg(data->reg.vid & ATXP1_VIDMASK, ^~~~~~~ drivers/hwmon/atxp1.c:159:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] size = sprintf(buf, "0x%02x\n", data->reg.gpio1 & ATXP1_GPIO1MASK); ^~~~~~~ drivers/hwmon/atxp1.c:159:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 size = sprintf(buf, "0x%02x\n", data->reg.gpio1 & ATXP1_GPIO1MASK); ^~~~~~~ drivers/hwmon/atxp1.c:204:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] size = sprintf(buf, "0x%02x\n", data->reg.gpio2); ^~~~~~~ drivers/hwmon/atxp1.c:204:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 size = sprintf(buf, "0x%02x\n", data->reg.gpio2); ^~~~~~~ Suppressed 46 warnings (46 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. 51 warnings generated. fs/xfs/xfs_xattr.c:121:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(offset, prefix, prefix_len); ^~~~~~~ fs/xfs/xfs_xattr.c:121:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(offset, prefix, prefix_len); ^~~~~~~ fs/xfs/xfs_xattr.c:123:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(offset, (char *)name, namelen); /* real name */ ^~~~~~~ fs/xfs/xfs_xattr.c:123:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(offset, (char *)name, namelen); /* real name */ ^~~~~~~ fs/xfs/xfs_xattr.c:201: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(&context, 0, sizeof(context)); ^~~~~~ fs/xfs/xfs_xattr.c:201: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(&context, 0, sizeof(context)); ^~~~~~ Suppressed 48 warnings (48 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. 47 warnings generated. Suppressed 47 warnings (47 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. 31 warnings generated. include/linux/hid.h:1037:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference] input->name, c, type); ^ drivers/hid/hid-gfrm.c:33:6: note: Assuming 'hdev_type' is equal to GFRM100 if (hdev_type == GFRM100) { ^~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-gfrm.c:33:2: note: Taking true branch if (hdev_type == GFRM100) { ^ drivers/hid/hid-gfrm.c:34:7: note: Assuming the condition is true if (usage->hid == (HID_UP_CONSUMER | 0x4)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-gfrm.c:34:3: note: Taking true branch if (usage->hid == (HID_UP_CONSUMER | 0x4)) { ^ drivers/hid/hid-gfrm.c:36:4: note: Calling 'hid_map_usage_clear' hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_INFO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1065:2: note: Calling 'hid_map_usage' hid_map_usage(hidinput, usage, bit, max, type, c); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1008:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1012:2: note: Control jumps to 'case 1:' at line 1021 switch (type) { ^ include/linux/hid.h:1024:3: note: Execution continues on line 1035 break; ^ include/linux/hid.h:1035:15: note: 'c' is <= 'limit' if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:15: note: Left side of '||' is false if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1035:28: note: Assuming 'bmap' is null if (unlikely(c > limit || !bmap)) { -- ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ include/linux/hid.h:1036:3: note: Loop condition is false. Exiting loop pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. 26 warnings generated. drivers/mtd/devices/phram.c:42: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(start + instr->addr, 0xff, instr->len); ^~~~~~ drivers/mtd/devices/phram.c:42: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(start + instr->addr, 0xff, instr->len); ^~~~~~ drivers/mtd/devices/phram.c:65: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(buf, start + from, len); ^~~~~~ drivers/mtd/devices/phram.c:65: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(buf, start + from, len); ^~~~~~ drivers/mtd/devices/phram.c:75: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(start + to, buf, len); ^~~~~~ drivers/mtd/devices/phram.c:75: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(start + to, buf, len); ^~~~~~ drivers/mtd/devices/phram.c:231:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(str, val); ^~~~~~ drivers/mtd/devices/phram.c:231:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(str, val); ^~~~~~ Suppressed 22 warnings (22 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. 41 warnings generated. >> drivers/mtd/devices/mtd_dataflash.c:484: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(&t, 0, sizeof t); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:484: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(&t, 0, sizeof t); ^~~~~~ >> drivers/mtd/devices/mtd_dataflash.c:494:3: 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(buf, scratch + 4 + base + off, len); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:494:3: 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(buf, scratch + 4 + base + off, len); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:566: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(scratch + 4 + from, buf, len); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:566: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(scratch + 4 + from, buf, len); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:570: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(&t, 0, sizeof t); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:570: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(&t, 0, sizeof t); ^~~~~~ drivers/mtd/devices/mtd_dataflash.c:641:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(priv->name, "spi%d.%d-%s", ^~~~~~~ drivers/mtd/devices/mtd_dataflash.c:641:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 sprintf(priv->name, "spi%d.%d-%s", ^~~~~~~ drivers/mtd/devices/mtd_dataflash.c:686:8: warning: Excessive padding in 'struct flash_info' (10 padding bytes, where 2 is optimal). Optimal fields order: jedec_id, name, nr_pages, pagesize, pageoffset, flags, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct flash_info { ~~~~~~~^~~~~~~~~~~~ drivers/mtd/devices/mtd_dataflash.c:686:8: note: Excessive padding in 'struct flash_info' (10 padding bytes, where 2 is optimal). Optimal fields order: jedec_id, name, nr_pages, pagesize, pageoffset, flags, consider reordering the fields or adding explicit padding members struct flash_info { ~~~~~~~^~~~~~~~~~~~ Suppressed 35 warnings (35 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. 36 warnings generated. Suppressed 36 warnings (36 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. Suppressed 46 warnings (46 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. 48 warnings generated. >> drivers/mfd/ti-lmu.c:159: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(®map_cfg, 0, sizeof(struct regmap_config)); ^~~~~~ drivers/mfd/ti-lmu.c:159: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(®map_cfg, 0, sizeof(struct regmap_config)); ^~~~~~ Suppressed 47 warnings (47 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 30 warnings generated. >> drivers/mtd/tests/speedtest.c:49: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/speedtest.c:49: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 29 warnings (29 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. 74 warnings generated. drivers/cdrom/cdrom.c:691: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(med, &buffer[sizeof(*eh)], sizeof(*med)); ^~~~~~ drivers/cdrom/cdrom.c:691: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(med, &buffer[sizeof(*eh)], sizeof(*med)); ^~~~~~ drivers/cdrom/cdrom.c:712: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(rfd, &buffer[sizeof(struct feature_header)], sizeof (*rfd)); ^~~~~~ drivers/cdrom/cdrom.c:712: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(rfd, &buffer[sizeof(struct feature_header)], sizeof (*rfd)); ^~~~~~ drivers/cdrom/cdrom.c:1381:7: warning: Although the value stored to 'status' is used in the enclosing expression, the value is never actually read from 'status' [clang-analyzer-deadcode.DeadStores] if ((status = cdrom_read_mech_status(cdi, info)) == 0) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/cdrom/cdrom.c:1381:7: note: Although the value stored to 'status' is used in the enclosing expression, the value is never actually read from 'status' if ((status = cdrom_read_mech_status(cdi, info)) == 0) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/cdrom/cdrom.c:1578: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(cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/cdrom/cdrom.c:1578: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(cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/cdrom/cdrom.c:1580: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(buf, 0, len); ^~~~~~ drivers/cdrom/cdrom.c:1580: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(buf, 0, len); ^~~~~~ drivers/cdrom/cdrom.c:1644: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(buf, 0, sizeof(buf)); ^~~~~~ drivers/cdrom/cdrom.c:1644: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(buf, 0, sizeof(buf)); ^~~~~~ drivers/cdrom/cdrom.c:1668:3: 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] copy_key(ai->lsk.key, &buf[4]); ^ drivers/cdrom/cdrom.c:1589:28: note: expanded from macro 'copy_key' #define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key)) ^~~~~~ drivers/cdrom/cdrom.c:1668:3: 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 copy_key(ai->lsk.key, &buf[4]); ^ drivers/cdrom/cdrom.c:1589:28: note: expanded from macro 'copy_key' #define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key)) ^~~~~~ drivers/cdrom/cdrom.c:1679:3: 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] copy_chal(ai->lsc.chal, &buf[4]); ^ drivers/cdrom/cdrom.c:1590:29: note: expanded from macro 'copy_chal' #define copy_chal(dest,src) memcpy((dest), (src), sizeof(dvd_challenge)) ^~~~~~ drivers/cdrom/cdrom.c:1679:3: 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 copy_chal(ai->lsc.chal, &buf[4]); ^ drivers/cdrom/cdrom.c:1590:29: note: expanded from macro 'copy_chal' #define copy_chal(dest,src) memcpy((dest), (src), sizeof(dvd_challenge)) ^~~~~~ drivers/cdrom/cdrom.c:1699:3: 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] copy_key(ai->lstk.title_key, &buf[5]); ^ drivers/cdrom/cdrom.c:1589:28: note: expanded from macro 'copy_key' #define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key)) ^~~~~~ drivers/cdrom/cdrom.c:1699:3: 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 copy_key(ai->lstk.title_key, &buf[5]); ^ drivers/cdrom/cdrom.c:1589:28: note: expanded from macro 'copy_key' #define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key)) ^~~~~~ drivers/cdrom/cdrom.c:1718:3: 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] copy_chal(&buf[4], ai->hsc.chal); ^ drivers/cdrom/cdrom.c:1590:29: note: expanded from macro 'copy_chal' #define copy_chal(dest,src) memcpy((dest), (src), sizeof(dvd_challenge)) ^~~~~~ drivers/cdrom/cdrom.c:1718:3: 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 copy_chal(&buf[4], ai->hsc.chal); ^ drivers/cdrom/cdrom.c:1590:29: note: expanded from macro 'copy_chal' #define copy_chal(dest,src) memcpy((dest), (src), sizeof(dvd_challenge)) ^~~~~~ drivers/cdrom/cdrom.c:1730:3: 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] copy_key(&buf[4], ai->hsk.key); ^ drivers/cdrom/cdrom.c:1589:28: note: expanded from macro 'copy_key' #define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key)) ^~~~~~ drivers/cdrom/cdrom.c:1730:3: 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 copy_key(&buf[4], ai->hsk.key); -- ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ include/linux/hid.h:1036:3: note: '?' condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ include/linux/hid.h:1036:3: note: Loop condition is false. Exiting loop pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. >> drivers/hwmon/w83l785ts.c:117:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index])); ^~~~~~~ drivers/hwmon/w83l785ts.c:117:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index])); ^~~~~~~ Suppressed 46 warnings (46 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. 57 warnings generated. drivers/hwmon/w83l786ng.c:232:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_in_reg(in) ^ drivers/hwmon/w83l786ng.c:229:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:232:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_in_reg(in) ^ drivers/hwmon/w83l786ng.c:229:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:233:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_in_reg(in_min) ^ drivers/hwmon/w83l786ng.c:229:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:233:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_in_reg(in_min) ^ drivers/hwmon/w83l786ng.c:229:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:234:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_in_reg(in_max) ^ drivers/hwmon/w83l786ng.c:229:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:234:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_in_reg(in_max) ^ drivers/hwmon/w83l786ng.c:229:9: note: expanded from macro 'show_in_reg' return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:287:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_fan_reg(fan); ^ drivers/hwmon/w83l786ng.c:283:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83l786ng.c:287:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_fan_reg(fan); ^ drivers/hwmon/w83l786ng.c:283:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83l786ng.c:288:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_fan_reg(fan_min); ^ drivers/hwmon/w83l786ng.c:283:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83l786ng.c:288:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_fan_reg(fan_min); ^ drivers/hwmon/w83l786ng.c:283:9: note: expanded from macro 'show_fan_reg' return sprintf(buf, "%d\n", \ ^~~~~~~ drivers/hwmon/w83l786ng.c:319:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/w83l786ng.c:319:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/w83l786ng.c:413:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr][index])); ^~~~~~~ drivers/hwmon/w83l786ng.c:413:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr][index])); ^~~~~~~ drivers/hwmon/w83l786ng.c:470:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_pwm_reg(pwm_mode) ^ drivers/hwmon/w83l786ng.c:467:9: note: expanded from macro 'show_pwm_reg' return sprintf(buf, "%d\n", data->reg[nr]); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:470:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_pwm_reg(pwm_mode) ^ drivers/hwmon/w83l786ng.c:467:9: note: expanded from macro 'show_pwm_reg' return sprintf(buf, "%d\n", data->reg[nr]); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:471:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] show_pwm_reg(pwm_enable) ^ drivers/hwmon/w83l786ng.c:467:9: note: expanded from macro 'show_pwm_reg' return sprintf(buf, "%d\n", data->reg[nr]); \ ^~~~~~~ drivers/hwmon/w83l786ng.c:471:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 show_pwm_reg(pwm_enable) -- ^~~~~~~ drivers/hwmon/smsc47m192.c:412:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->vrm); ^~~~~~~ drivers/hwmon/smsc47m192.c:412:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->vrm); ^~~~~~~ drivers/hwmon/smsc47m192.c:440:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms & nr) ? 1 : 0); ^~~~~~~ drivers/hwmon/smsc47m192.c:440:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms & nr) ? 1 : 0); ^~~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. drivers/input/serio/parkbd.c:144: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(&parkbd_parport_cb, 0, sizeof(parkbd_parport_cb)); ^~~~~~ drivers/input/serio/parkbd.c:144: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(&parkbd_parport_cb, 0, sizeof(parkbd_parport_cb)); ^~~~~~ drivers/input/serio/parkbd.c:173:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(serio->phys, sizeof(serio->phys), "%s/serio0", parkbd_dev->port->name); ^~~~~~~~ drivers/input/serio/parkbd.c:173:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(serio->phys, sizeof(serio->phys), "%s/serio0", parkbd_dev->port->name); ^~~~~~~~ Suppressed 34 warnings (34 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. 35 warnings generated. drivers/input/serio/libps2.c:245: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(send_param, param, send); ^~~~~~ drivers/input/serio/libps2.c:245: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(send_param, param, send); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 36 warnings generated. drivers/spi/spi-butterfly.c:216: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(&butterfly_cb, 0, sizeof(butterfly_cb)); ^~~~~~ drivers/spi/spi-butterfly.c:216: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(&butterfly_cb, 0, sizeof(butterfly_cb)); ^~~~~~ Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 36 warnings generated. drivers/spi/spi-cadence-xspi.c:363: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(cmd_regs, 0, sizeof(cmd_regs)); ^~~~~~ drivers/spi/spi-cadence-xspi.c:363: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(cmd_regs, 0, sizeof(cmd_regs)); ^~~~~~ Suppressed 35 warnings (35 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 31 warnings generated. drivers/hid/hid-magicmouse.c:858:3: warning: Value stored to 'report' is never read [clang-analyzer-deadcode.DeadStores] report = hid_register_report(hdev, HID_INPUT_REPORT, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-magicmouse.c:858:3: note: Value stored to 'report' is never read report = hid_register_report(hdev, HID_INPUT_REPORT, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 32 warnings generated. >> drivers/hid/hid-microsoft.c:288: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(r, 0, sizeof(*r)); ^~~~~~ drivers/hid/hid-microsoft.c:288: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(r, 0, sizeof(*r)); ^~~~~~ include/linux/hid.h:1037:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference] input->name, c, type); ^ drivers/hid/hid-microsoft.c:189:6: note: Assuming the condition is true if (quirks & MS_ERGONOMY) { ^~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-microsoft.c:189:2: note: Taking true branch if (quirks & MS_ERGONOMY) { ^ drivers/hid/hid-microsoft.c:190:13: note: Calling 'ms_ergonomy_kb_quirk' int ret = ms_ergonomy_kb_quirk(hi, usage, bit, max); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-microsoft.c:85:6: note: Assuming the condition is true if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-microsoft.c:85:2: note: Taking true branch if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { ^ drivers/hid/hid-microsoft.c:86:3: note: Control jumps to 'case 670:' at line 94 switch (usage->hid & HID_USAGE) { ^ drivers/hid/hid-microsoft.c:95:4: note: Calling 'hid_map_usage_clear' ms_map_key_clear(KEY_PROG2); ^ drivers/hid/hid-microsoft.c:78:29: note: expanded from macro 'ms_map_key_clear' #define ms_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1065:2: note: Calling 'hid_map_usage' hid_map_usage(hidinput, usage, bit, max, type, c); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1008:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1012:2: note: Control jumps to 'case 1:' at line 1021 switch (type) { ^ include/linux/hid.h:1024:3: note: Execution continues on line 1035 break; ^ include/linux/hid.h:1035:15: note: 'c' is <= 'limit' if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:15: note: Left side of '||' is false if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1035:28: note: Assuming 'bmap' is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:28: note: Assuming pointer value is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1035:2: note: Taking true branch if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1036:3: note: Assuming the condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:639:6: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:41:28: note: expanded from macro '__ratelimit' #define __ratelimit(state) ___ratelimit(state, __func__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1036:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:639:2: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^ include/linux/hid.h:1036:3: note: Left side of '&&' is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) -- fs/f2fs/f2fs.h:3206:6: note: Assuming 'len' is not equal to 1 if (len == 1 && name[0] == '.') ^~~~~~~~ fs/f2fs/f2fs.h:3206:15: note: Left side of '&&' is false if (len == 1 && name[0] == '.') ^ fs/f2fs/f2fs.h:3209:6: note: Assuming 'len' is equal to 2 if (len == 2 && name[0] == '.' && name[1] == '.') ^~~~~~~~ fs/f2fs/f2fs.h:3209:6: note: Left side of '&&' is true fs/f2fs/f2fs.h:3209:18: note: Array access (from variable 'name') results in a null pointer dereference if (len == 2 && name[0] == '.' && name[1] == '.') ^~~~ fs/f2fs/hash.c:57:9: warning: Array access (from variable 'msg') results in a null pointer dereference [clang-analyzer-core.NullDereference] val = msg[i] + (val << 8); ^ fs/f2fs/hash.c:98:2: note: 'name' initialized here const u8 *name = fname->disk_name.name; ^~~~~~~~~~~~~~ fs/f2fs/hash.c:101:15: note: Assuming 'name' is null WARN_ON_ONCE(!name); ^ include/asm-generic/bug.h:179:41: note: expanded from macro 'WARN_ON_ONCE' #define WARN_ON_ONCE(condition) WARN_ON(condition) ^~~~~~~~~ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ fs/f2fs/hash.c:103:6: note: Calling 'is_dot_dotdot' if (is_dot_dotdot(name, len)) { ^~~~~~~~~~~~~~~~~~~~~~~~ fs/f2fs/f2fs.h:3206:6: note: Assuming 'len' is not equal to 1 if (len == 1 && name[0] == '.') ^~~~~~~~ fs/f2fs/f2fs.h:3206:15: note: Left side of '&&' is false if (len == 1 && name[0] == '.') ^ fs/f2fs/f2fs.h:3209:6: note: Assuming 'len' is not equal to 2 if (len == 2 && name[0] == '.' && name[1] == '.') ^~~~~~~~ fs/f2fs/f2fs.h:3209:15: note: Left side of '&&' is false if (len == 2 && name[0] == '.' && name[1] == '.') ^ fs/f2fs/f2fs.h:3212:2: note: Returning zero, which participates in a condition later return false; ^~~~~~~~~~~~ fs/f2fs/hash.c:103:6: note: Returning from 'is_dot_dotdot' if (is_dot_dotdot(name, len)) { ^~~~~~~~~~~~~~~~~~~~~~~~ fs/f2fs/hash.c:103:2: note: Taking false branch if (is_dot_dotdot(name, len)) { ^ fs/f2fs/hash.c:135:42: note: Passing null pointer value via 1st parameter 'p' fname->hash = cpu_to_le32(TEA_hash_name(name, len)); ^ include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32' #define cpu_to_le32 __cpu_to_le32 ^ include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__cpu_to_le32' #define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) ^ fs/f2fs/hash.c:135:28: note: Calling 'TEA_hash_name' fname->hash = cpu_to_le32(TEA_hash_name(name, len)); ^ include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32' #define cpu_to_le32 __cpu_to_le32 ^ include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__cpu_to_le32' #define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) ^ fs/f2fs/hash.c:80:2: note: Loop condition is true. Entering loop body while (1) { ^ fs/f2fs/hash.c:81:15: note: Passing null pointer value via 1st parameter 'msg' str2hashbuf(p, len, in, 4); ^ fs/f2fs/hash.c:81:3: note: Calling 'str2hashbuf' str2hashbuf(p, len, in, 4); ^~~~~~~~~~~~~~~~~~~~~~~~~~ fs/f2fs/hash.c:52:6: note: Assuming the condition is false if (len > num * 4) ^~~~~~~~~~~~~ fs/f2fs/hash.c:52:2: note: Taking false branch if (len > num * 4) ^ fs/f2fs/hash.c:54:14: note: Assuming 'i' is < 'len' for (i = 0; i < len; i++) { ^~~~~~~ fs/f2fs/hash.c:54:2: note: Loop condition is true. Entering loop body for (i = 0; i < len; i++) { ^ fs/f2fs/hash.c:55:3: note: Taking true branch if ((i % 4) == 0) ^ fs/f2fs/hash.c:57:9: note: Array access (from variable 'msg') results in a null pointer dereference val = msg[i] + (val << 8); ^~~ Suppressed 52 warnings (52 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. 51 warnings generated. >> drivers/md/dm-dust.c:358:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1 || tmp != (sector_t)tmp) { ^~~~~~ drivers/md/dm-dust.c:358:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1 || tmp != (sector_t)tmp) { ^~~~~~ drivers/md/dm-dust.c:461:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1) ^~~~~~ drivers/md/dm-dust.c:461:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1) ^~~~~~ drivers/md/dm-dust.c:481:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1) ^~~~~~ drivers/md/dm-dust.c:481:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1) ^~~~~~ drivers/md/dm-dust.c:484:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(argv[2], "%u%c", &tmp_ui, &dummy) != 1) ^~~~~~ drivers/md/dm-dust.c:484:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(argv[2], "%u%c", &tmp_ui, &dummy) != 1) ^~~~~~ Suppressed 47 warnings (47 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. 35 warnings generated. Suppressed 35 warnings (35 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. 34 warnings generated. Suppressed 34 warnings (34 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. 48 warnings generated. drivers/input/misc/atmel_captouch.c:68:8: warning: Excessive padding in 'struct atmel_captouch_device' (75 padding bytes, where 11 is optimal). Optimal fields order: xfer_buf, client, input, num_btn, keycodes, prev_btn, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct atmel_captouch_device { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/atmel_captouch.c:68:8: note: Excessive padding in 'struct atmel_captouch_device' (75 padding bytes, where 11 is optimal). Optimal fields order: xfer_buf, client, input, num_btn, keycodes, prev_btn, consider reordering the fields or adding explicit padding members struct atmel_captouch_device { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/input/misc/atmel_captouch.c:118: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, &capdev->xfer_buf[2], len); ^~~~~~ drivers/input/misc/atmel_captouch.c:118: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, &capdev->xfer_buf[2], len); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 39 warnings generated. drivers/hwmon/adcxx.c:78:11: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] status = sprintf(buf, "%d\n", value); ^~~~~~~ drivers/hwmon/adcxx.c:78:11: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 status = sprintf(buf, "%d\n", value); ^~~~~~~ drivers/hwmon/adcxx.c:88:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0\n"); ^~~~~~~ drivers/hwmon/adcxx.c:88:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0\n"); ^~~~~~~ drivers/hwmon/adcxx.c:105:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", reference); ^~~~~~~ drivers/hwmon/adcxx.c:105:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", reference); ^~~~~~~ drivers/hwmon/adcxx.c:132:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", to_spi_device(dev)->modalias); ^~~~~~~ drivers/hwmon/adcxx.c:132:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", to_spi_device(dev)->modalias); ^~~~~~~ Suppressed 35 warnings (35 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. 77 warnings generated. >> drivers/hwmon/adm1026.c:473:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", INS_FROM_REG(nr, data->in[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:473:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", INS_FROM_REG(nr, data->in[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:481:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", INS_FROM_REG(nr, data->in_min[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:481:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", INS_FROM_REG(nr, data->in_min[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:509:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", INS_FROM_REG(nr, data->in_max[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:509:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", INS_FROM_REG(nr, data->in_max[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:585:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", INS_FROM_REG(16, data->in[16]) - ^~~~~~~ drivers/hwmon/adm1026.c:585:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", INS_FROM_REG(16, data->in[16]) - ^~~~~~~ drivers/hwmon/adm1026.c:592:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", INS_FROM_REG(16, data->in_min[16]) ^~~~~~~ drivers/hwmon/adm1026.c:592:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", INS_FROM_REG(16, data->in_min[16]) ^~~~~~~ drivers/hwmon/adm1026.c:621:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", INS_FROM_REG(16, data->in_max[16]) ^~~~~~~ drivers/hwmon/adm1026.c:621:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", INS_FROM_REG(16, data->in_max[16]) ^~~~~~~ drivers/hwmon/adm1026.c:659:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], ^~~~~~~ drivers/hwmon/adm1026.c:659:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], ^~~~~~~ drivers/hwmon/adm1026.c:668:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], ^~~~~~~ drivers/hwmon/adm1026.c:668:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], ^~~~~~~ drivers/hwmon/adm1026.c:736:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->fan_div[nr]); ^~~~~~~ drivers/hwmon/adm1026.c:736:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->fan_div[nr]); ^~~~~~~ drivers/hwmon/adm1026.c:797:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:797:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:805:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:805:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:835:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:835:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:876:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_offset[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:876:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_offset[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:912:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG( ^~~~~~~ drivers/hwmon/adm1026.c:912:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG( ^~~~~~~ drivers/hwmon/adm1026.c:922:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_tmin[nr] + ^~~~~~~ drivers/hwmon/adm1026.c:922:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_tmin[nr] + ^~~~~~~ drivers/hwmon/adm1026.c:932:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_tmin[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:932:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_tmin[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:974:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->config1 & CFG1_THERM_HOT) >> 4); ^~~~~~~ drivers/hwmon/adm1026.c:974:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->config1 & CFG1_THERM_HOT) >> 4); ^~~~~~~ drivers/hwmon/adm1026.c:1012:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:1012:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[nr])); ^~~~~~~ drivers/hwmon/adm1026.c:1045:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", DAC_FROM_REG(data->analog_out)); ^~~~~~~ drivers/hwmon/adm1026.c:1045:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", DAC_FROM_REG(data->analog_out)); ^~~~~~~ drivers/hwmon/adm1026.c:1076:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", vid_from_reg(vid, data->vrm)); ^~~~~~~ drivers/hwmon/adm1026.c:1076:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", vid_from_reg(vid, data->vrm)); ^~~~~~~ drivers/hwmon/adm1026.c:1085:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->vrm); ^~~~~~~ drivers/hwmon/adm1026.c:1085:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->vrm); ^~~~~~~ drivers/hwmon/adm1026.c:1112:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", data->alarms); ^~~~~~~ drivers/hwmon/adm1026.c:1112:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", data->alarms); ^~~~~~~ drivers/hwmon/adm1026.c:1122:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/adm1026.c:1122:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/adm1026.c:1158:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", data->alarm_mask); ^~~~~~~ drivers/hwmon/adm1026.c:1158:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", data->alarm_mask); ^~~~~~~ drivers/hwmon/adm1026.c:1199:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", data->gpio); ^~~~~~~ drivers/hwmon/adm1026.c:1199:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", data->gpio); ^~~~~~~ drivers/hwmon/adm1026.c:1233:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", data->gpio_mask); ^~~~~~~ drivers/hwmon/adm1026.c:1233:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", data->gpio_mask); ^~~~~~~ drivers/hwmon/adm1026.c:1267:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm1.pwm)); ^~~~~~~ drivers/hwmon/adm1026.c:1267:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm1.pwm)); ^~~~~~~ drivers/hwmon/adm1026.c:1297:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm1.auto_pwm_min); ^~~~~~~ drivers/hwmon/adm1026.c:1297:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm1.auto_pwm_min); ^~~~~~~ drivers/hwmon/adm1026.c:1328:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ADM1026_PWM_MAX); ^~~~~~~ drivers/hwmon/adm1026.c:1328:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ADM1026_PWM_MAX); ^~~~~~~ drivers/hwmon/adm1026.c:1335:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm1.enable); ^~~~~~~ drivers/hwmon/adm1026.c:1335:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm1.enable); ^~~~~~~ drivers/hwmon/adm1026.c:1574:6: warning: Value stored to 'address' during its initialization is never read [clang-analyzer-deadcode.DeadStores] int address = client->addr; ^~~~~~~ ~~~~~~~~~~~~ drivers/hwmon/adm1026.c:1574:6: note: Value stored to 'address' during its initialization is never read int address = client->addr; ^~~~~~~ ~~~~~~~~~~~~ Suppressed 46 warnings (46 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. 21 warnings generated. >> drivers/mtd/parsers/cmdlinepart.c:198:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(extra_mem, "Partition_%03d", this_part); ^~~~~~~ drivers/mtd/parsers/cmdlinepart.c:198:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(extra_mem, "Partition_%03d", this_part); ^~~~~~~ >> drivers/mtd/parsers/cmdlinepart.c:381:4: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&part->parts[i], &part->parts[i + 1], ^~~~~~~ drivers/mtd/parsers/cmdlinepart.c:381:4: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&part->parts[i], &part->parts[i + 1], ^~~~~~~ Suppressed 19 warnings (19 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. 19 warnings generated. Suppressed 19 warnings (19 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. 25 warnings generated. Suppressed 25 warnings (25 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. 38 warnings generated. drivers/mtd/chips/cfi_probe.c:214: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(cfi->cfiq,0,sizeof(struct cfi_ident)); ^~~~~~ drivers/mtd/chips/cfi_probe.c:214: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(cfi->cfiq,0,sizeof(struct cfi_ident)); ^~~~~~ Suppressed 37 warnings (37 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. 40 warnings generated. drivers/mtd/chips/cfi_util.c:114:21: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] onecmd |= (onecmd << (chip_mode * 16)); ^ drivers/mtd/chips/cfi_util.c:307:6: note: Assuming 'adr' is not equal to 0 if (!adr) ^~~~ drivers/mtd/chips/cfi_util.c:307:2: note: Taking false branch if (!adr) ^ drivers/mtd/chips/cfi_util.c:310:2: note: Left side of '&&' is true printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/mtd/chips/cfi_util.c:310:2: note: Taking true branch printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/mtd/chips/cfi_util.c:310:2: note: '?' condition is true printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ drivers/mtd/chips/cfi_util.c:310:2: note: '?' condition is true printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ drivers/mtd/chips/cfi_util.c:310:2: note: Loop condition is false. Exiting loop printk(KERN_INFO "%s Extended Query Table@0x%4.4X\n", name, adr); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ drivers/mtd/chips/cfi_util.c:313:6: note: Assuming 'extp' is non-null if (!extp) ^~~~~ drivers/mtd/chips/cfi_util.c:313:2: note: Taking false branch if (!extp) ^ drivers/mtd/chips/cfi_util.c:321:2: note: Calling 'cfi_qry_mode_on' cfi_qry_mode_on(base, map, cfi); -- ^~~~~~~ drivers/hwmon/w83627hf.c:906:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); ^~~~~~~ drivers/hwmon/w83627hf.c:906:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); ^~~~~~~ drivers/hwmon/w83627hf.c:981:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", ^~~~~~~ drivers/hwmon/w83627hf.c:981:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", ^~~~~~~ drivers/hwmon/w83627hf.c:1040:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", (long) data->pwm[nr]); ^~~~~~~ drivers/hwmon/w83627hf.c:1040:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", (long) data->pwm[nr]); ^~~~~~~ drivers/hwmon/w83627hf.c:1087:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm_enable[nr]); ^~~~~~~ drivers/hwmon/w83627hf.c:1087:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm_enable[nr]); ^~~~~~~ drivers/hwmon/w83627hf.c:1126:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", ^~~~~~~ drivers/hwmon/w83627hf.c:1126:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", ^~~~~~~ drivers/hwmon/w83627hf.c:1129:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", ^~~~~~~ drivers/hwmon/w83627hf.c:1129:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", ^~~~~~~ drivers/hwmon/w83627hf.c:1175:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", (long) data->sens[nr]); ^~~~~~~ drivers/hwmon/w83627hf.c:1175:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", (long) data->sens[nr]); ^~~~~~~ drivers/hwmon/w83627hf.c:1243:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", data->name); ^~~~~~~ drivers/hwmon/w83627hf.c:1243:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", data->name); ^~~~~~~ Suppressed 22 warnings (22 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. 13 warnings generated. Suppressed 13 warnings (13 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. 54 warnings generated. drivers/target/target_core_rd.c:95:2: warning: Value stored to 'page_count' is never read [clang-analyzer-deadcode.DeadStores] page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_table_array, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_rd.c:95:2: note: Value stored to 'page_count' is never read page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_table_array, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_rd.c:163:4: 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(p, init_payload, PAGE_SIZE); ^~~~~~ drivers/target/target_core_rd.c:163:4: 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(p, init_payload, PAGE_SIZE); ^~~~~~ drivers/target/target_core_rd.c:221:2: warning: Value stored to 'page_count' is never read [clang-analyzer-deadcode.DeadStores] page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_prot_array, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_rd.c:221:2: note: Value stored to 'page_count' is never read page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_prot_array, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_rd.c:487:4: 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(m.addr, rd_addr, len); ^~~~~~ drivers/target/target_core_rd.c:487:4: 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(m.addr, rd_addr, len); ^~~~~~ drivers/target/target_core_rd.c:489:4: 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(rd_addr, m.addr, len); ^~~~~~ drivers/target/target_core_rd.c:489:4: 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(rd_addr, m.addr, len); ^~~~~~ drivers/target/target_core_rd.c:599:15: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ssize_t bl = sprintf(b, "TCM RamDisk ID: %u RamDisk Makeup: rd_mcp\n", ^~~~~~~ drivers/target/target_core_rd.c:599:15: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ssize_t bl = sprintf(b, "TCM RamDisk ID: %u RamDisk Makeup: rd_mcp\n", ^~~~~~~ drivers/target/target_core_rd.c:601:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " PAGES/PAGE_SIZE: %u*%lu" ^~~~~~~ drivers/target/target_core_rd.c:601:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, " PAGES/PAGE_SIZE: %u*%lu" ^~~~~~~ Suppressed 47 warnings (47 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. 36 warnings generated. >> drivers/input/keyboard/xtkbd.c:83:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(xtkbd->phys, sizeof(xtkbd->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/keyboard/xtkbd.c:83:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(xtkbd->phys, sizeof(xtkbd->phys), "%s/input0", serio->phys); ^~~~~~~~ >> drivers/input/keyboard/xtkbd.c:84: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(xtkbd->keycode, xtkbd_keycode, sizeof(xtkbd->keycode)); ^~~~~~ drivers/input/keyboard/xtkbd.c:84: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(xtkbd->keycode, xtkbd_keycode, sizeof(xtkbd->keycode)); ^~~~~~ Suppressed 34 warnings (34 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. 54 warnings generated. drivers/scsi/libsas/sas_scsi_host.c:87:4: 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(sc->sense_buffer, ts->buf, ^~~~~~ drivers/scsi/libsas/sas_scsi_host.c:87:4: 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(sc->sense_buffer, ts->buf, ^~~~~~ drivers/scsi/libsas/sas_scsi_host.c:150: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(task->ssp_task.LUN, &lun.scsi_lun, 8); ^~~~~~ drivers/scsi/libsas/sas_scsi_host.c:150: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(task->ssp_task.LUN, &lun.scsi_lun, 8); ^~~~~~ Suppressed 52 warnings (52 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. 53 warnings generated. drivers/scsi/libsas/sas_task.c:27:3: 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(tstat->buf, iu->sense_data, tstat->buf_valid_size); ^~~~~~ drivers/scsi/libsas/sas_task.c:27:3: 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(tstat->buf, iu->sense_data, tstat->buf_valid_size); ^~~~~~ Suppressed 52 warnings (52 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. 92 warnings generated. >> drivers/scsi/st.c:528:3: 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(SRpnt->sense, rq->sense, SCSI_SENSE_BUFFERSIZE); ^~~~~~ drivers/scsi/st.c:528:3: 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(SRpnt->sense, rq->sense, SCSI_SENSE_BUFFERSIZE); ^~~~~~ >> drivers/scsi/st.c:578: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(rq->cmd, 0, BLK_MAX_CDB); ^~~~~~ drivers/scsi/st.c:578: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(rq->cmd, 0, BLK_MAX_CDB); ^~~~~~ drivers/scsi/st.c:579: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(rq->cmd, cmd, rq->cmd_len); ^~~~~~ drivers/scsi/st.c:579: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(rq->cmd, cmd, rq->cmd_len); ^~~~~~ drivers/scsi/st.c:637: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(SRpnt->cmd, cmd, sizeof(SRpnt->cmd)); ^~~~~~ drivers/scsi/st.c:637: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(SRpnt->cmd, cmd, sizeof(SRpnt->cmd)); ^~~~~~ drivers/scsi/st.c:779: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(cmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:779: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(cmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:974: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((void *) &cmd[0], 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:974: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((void *) &cmd[0], 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1106: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((void *) &cmd[0], 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1106: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((void *) &cmd[0], 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1132: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((void *) &cmd[0], 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1132: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((void *) &cmd[0], 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1377: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(cmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1377: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(cmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1713: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(cmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1713: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(cmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:1828:47: warning: Division by zero [clang-analyzer-core.DivideZero] STps->drv_block += (transfer - undone) / ~~~~~~~~~~~~~~~~~~~~^ drivers/scsi/st.c:1632:6: note: Assuming the condition is false if (mutex_lock_interruptible(&STp->lock)) ^ include/linux/mutex.h:188:40: note: expanded from macro 'mutex_lock_interruptible' #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:1632:2: note: Taking false branch if (mutex_lock_interruptible(&STp->lock)) ^ drivers/scsi/st.c:1635:11: note: Calling 'rw_checks' retval = rw_checks(STp, filp, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:1482:6: note: Assuming the condition is false if (!scsi_block_when_processing_errors(STp->device)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:1482:2: note: Taking false branch if (!scsi_block_when_processing_errors(STp->device)) { ^ drivers/scsi/st.c:1487:6: note: Assuming field 'ready' is equal to ST_READY if (STp->ready != ST_READY) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:1487:2: note: Taking false branch if (STp->ready != ST_READY) { ^ drivers/scsi/st.c:1495:6: note: Assuming field 'defined' is not equal to 0 if (! STp->modes[STp->current_mode].defined) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:1495:2: note: Taking false branch if (! STp->modes[STp->current_mode].defined) { ^ drivers/scsi/st.c:1505:6: note: Assuming field 'pos_unknown' is 0 if (STp->pos_unknown) { ^~~~~~~~~~~~~~~~ drivers/scsi/st.c:1505:2: note: Taking false branch if (STp->pos_unknown) { ^ drivers/scsi/st.c:1510:6: note: Assuming 'count' is not equal to 0 if (count == 0) ^~~~~~~~~~ drivers/scsi/st.c:1510:2: note: Taking false branch if (count == 0) ^ drivers/scsi/st.c:1514:6: note: Assuming field 'in_use' is not equal to 0 if (!STp->in_use) { -- drivers/scsi/st.c:3210:7: note: Assuming 'partition' is equal to field 'partition' if (STp->partition != partition) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3210:3: note: Taking false branch if (STp->partition != partition) { ^ drivers/scsi/st.c:3218:6: note: Assuming field 'immediate' is not equal to 0 if (STp->immediate) { ^~~~~~~~~~~~~~ drivers/scsi/st.c:3218:2: note: Taking true branch if (STp->immediate) { ^ drivers/scsi/st.c:3225:6: note: Assuming 'SRpnt' is non-null if (!SRpnt) ^~~~~~ drivers/scsi/st.c:3225:2: note: Taking false branch if (!SRpnt) ^ drivers/scsi/st.c:3230:6: note: Assuming field 'syscall_result' is not equal to 0 if ((STp->buffer)->syscall_result != 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3230:2: note: Taking true branch if ((STp->buffer)->syscall_result != 0) { ^ drivers/scsi/st.c:3232:7: note: Assuming field 'can_partitions' is not equal to 0 if (STp->can_partitions && ^~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3232:7: note: Left side of '&&' is true drivers/scsi/st.c:3233:7: note: Assuming field 'scsi_level' is >= SCSI_2 (STp->device)->scsi_level >= SCSI_2 && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3232:7: note: Left side of '&&' is true if (STp->can_partitions && ^ drivers/scsi/st.c:3234:12: note: Calling 'find_partition' (p = find_partition(STp)) >= 0) ^~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3263:9: note: 'partition' declared without an initial value int i, partition; ^~~~~~~~~ drivers/scsi/st.c:3266:11: note: Calling 'get_location' if ((i = get_location(STp, &block, &partition, 1)) < 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3106:6: note: Assuming field 'ready' is equal to ST_READY if (STp->ready != ST_READY) ^~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3106:2: note: Taking false branch if (STp->ready != ST_READY) ^ drivers/scsi/st.c:3110:21: note: Field 'scsi_level' is >= SCSI_2 if ((STp->device)->scsi_level < SCSI_2) { ^ drivers/scsi/st.c:3110:2: note: Taking false branch if ((STp->device)->scsi_level < SCSI_2) { ^ drivers/scsi/st.c:3115:8: note: 'logical' is 1 if (!logical && !STp->scsi2_logical) ^~~~~~~ drivers/scsi/st.c:3115:16: note: Left side of '&&' is false if (!logical && !STp->scsi2_logical) ^ drivers/scsi/st.c:3121:6: note: Assuming 'SRpnt' is null if (!SRpnt) ^~~~~~ drivers/scsi/st.c:3121:2: note: Taking true branch if (!SRpnt) ^ drivers/scsi/st.c:3122:3: note: Returning without writing to '*partition' return (STp->buffer)->syscall_result; ^ drivers/scsi/st.c:3266:11: note: Returning from 'get_location' if ((i = get_location(STp, &block, &partition, 1)) < 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3266:6: note: Assuming the condition is false if ((i = get_location(STp, &block, &partition, 1)) < 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:3266:2: note: Taking false branch if ((i = get_location(STp, &block, &partition, 1)) < 0) ^ drivers/scsi/st.c:3268:16: note: The left operand of '>=' is a garbage value if (partition >= ST_NBR_PARTITIONS) ~~~~~~~~~ ^ drivers/scsi/st.c:3335: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(scmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:3335: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(scmd, 0, MAX_COMMAND_SIZE); ^~~~~~ drivers/scsi/st.c:3447: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(bp + psdo, 0, bp[pgo + PP_OFF_NBR_ADD_PARTS] * 2); ^~~~~~ drivers/scsi/st.c:3447: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(bp + psdo, 0, bp[pgo + PP_OFF_NBR_ADD_PARTS] * 2); ^~~~~~ drivers/scsi/st.c:3958: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(page_address(st_bp->reserved_pages[i]), 0, ^~~~~~ drivers/scsi/st.c:3958: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(page_address(st_bp->reserved_pages[i]), 0, ^~~~~~ >> drivers/scsi/st.c:4069:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(page_address(dpage) + dst_offset, ^~~~~~~ drivers/scsi/st.c:4069:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(page_address(dpage) + dst_offset, ^~~~~~~ >> drivers/scsi/st.c:4187:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, 10, "%s%s%s", rew ? "n" : "", ^~~~~~~~ drivers/scsi/st.c:4187:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, 10, "%s%s%s", rew ? "n" : "", ^~~~~~~~ drivers/scsi/st.c:4252:7: warning: Although the value stored to 'stp' is used in the enclosing expression, the value is never actually read from 'stp' [clang-analyzer-deadcode.DeadStores] if ((stp = st_incompatible(SDp))) { ^ ~~~~~~~~~~~~~~~~~~~~ drivers/scsi/st.c:4252:7: note: Although the value stored to 'stp' is used in the enclosing expression, the value is never actually read from 'stp' if ((stp = st_incompatible(SDp))) { ^ ~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/st.c:4354:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(tpnt->name, "st%d", tpnt->index); ^~~~~~~ drivers/scsi/st.c:4354:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(tpnt->name, "st%d", tpnt->index); ^~~~~~~ drivers/scsi/st.c:4571:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] l = snprintf(buf, PAGE_SIZE, "%d\n", STm->defined); ^~~~~~~~ drivers/scsi/st.c:4571:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->defined); ^~~~~~~~ drivers/scsi/st.c:4583:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_blksize); ^~~~~~~~ drivers/scsi/st.c:4583:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_blksize); ^~~~~~~~ drivers/scsi/st.c:4597:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] l = snprintf(buf, PAGE_SIZE, fmt, STm->default_density); ^~~~~~~~ drivers/scsi/st.c:4597:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 l = snprintf(buf, PAGE_SIZE, fmt, STm->default_density); ^~~~~~~~ drivers/scsi/st.c:4609:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_compression - 1); ^~~~~~~~ drivers/scsi/st.c:4609:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_compression - 1); ^~~~~~~~ drivers/scsi/st.c:4638:6: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] l = snprintf(buf, PAGE_SIZE, "0x%08x\n", options); ^~~~~~~~ drivers/scsi/st.c:4638:6: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 l = snprintf(buf, PAGE_SIZE, "0x%08x\n", options); ^~~~~~~~ drivers/scsi/st.c:4656:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4656:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4674:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4674:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4690:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4690:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4707:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4707:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4724:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4724:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4741:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4741:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4759:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4759:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4779:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4779:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4798:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4798:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4816:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lld", ^~~~~~~ drivers/scsi/st.c:4816:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lld", ^~~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. >> drivers/input/mouse/elan_i2c_smbus.c:127: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(val, buf, ETP_CALIBRATE_MAX_LEN); ^~~~~~ drivers/input/mouse/elan_i2c_smbus.c:127: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(val, buf, ETP_CALIBRATE_MAX_LEN); ^~~~~~ Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 35 warnings generated. >> drivers/input/mouse/sermouse.c:243:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(sermouse->phys, sizeof(sermouse->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/mouse/sermouse.c:243:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(sermouse->phys, sizeof(sermouse->phys), "%s/input0", serio->phys); ^~~~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 56 warnings generated. Suppressed 56 warnings (56 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. 35 warnings generated. Suppressed 35 warnings (35 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. 99 warnings generated. kernel/events/core.c:8050: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(comm, 0, sizeof(comm)); ^~~~~~ kernel/events/core.c:8050: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(comm, 0, sizeof(comm)); ^~~~~~ kernel/events/core.c:9071: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(bpf_event.event_id.tag, prog->tag, BPF_TAG_SIZE); ^~~~~~ kernel/events/core.c:9071: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(bpf_event.event_id.tag, prog->tag, BPF_TAG_SIZE); ^~~~~~ kernel/events/core.c:10323:13: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] for (vma = mm->mmap; vma; vma = vma->vm_next) { ^ kernel/events/core.c:10338:39: note: Calling 'perf_event_addr_filters' struct perf_addr_filters_head *ifh = perf_event_addr_filters(event); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf_event.h:1424:6: note: Assuming field 'parent' is null if (event->parent) ^~~~~~~~~~~~~ include/linux/perf_event.h:1424:2: note: Taking false branch if (event->parent) ^ include/linux/perf_event.h:1427:2: note: Returning without writing to 'event->addr_filters.nr_file_filters', which participates in a condition later return ifh; ^ kernel/events/core.c:10338:39: note: Returning from 'perf_event_addr_filters' struct perf_addr_filters_head *ifh = perf_event_addr_filters(event); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/events/core.c:10339:29: note: Left side of '||' is false struct task_struct *task = READ_ONCE(event->ctx->task); ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word' (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ ^ kernel/events/core.c:10339:29: note: Left side of '||' is false struct task_struct *task = READ_ONCE(event->ctx->task); ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word' (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ ^ kernel/events/core.c:10339:29: note: Left side of '||' is true struct task_struct *task = READ_ONCE(event->ctx->task); ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:314:28: note: expanded from macro '__native_word' sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) ^ kernel/events/core.c:10339:29: note: Taking false branch struct task_struct *task = READ_ONCE(event->ctx->task); ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:326:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ -- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/counter/counter-chrdev.c:555:2: note: Taking false branch if (&event_node->l == &counter->events_list) ^ drivers/counter/counter-chrdev.c:559:2: note: Loop condition is true. Entering loop body list_for_each_entry(comp_node, &event_node->comp_list, l) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ drivers/counter/counter-chrdev.c:561:16: note: Calling 'counter_get_data' ev.status = -counter_get_data(counter, comp_node, &ev.value); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/counter/counter-chrdev.c:462:2: note: 'ret' declared without an initial value int ret; ^~~~~~~ drivers/counter/counter-chrdev.c:464:6: note: Assuming field 'type' is not equal to COUNTER_COMPONENT_NONE if (comp_node->component.type == COUNTER_COMPONENT_NONE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/counter/counter-chrdev.c:464:2: note: Taking false branch if (comp_node->component.type == COUNTER_COMPONENT_NONE) ^ drivers/counter/counter-chrdev.c:467:2: note: Control jumps to 'case COUNTER_COMP_COUNT_MODE:' at line 487 switch (comp->type) { ^ drivers/counter/counter-chrdev.c:488:3: note: 'Default' branch taken. Execution continues on line 500 switch (comp_node->component.scope) { ^ drivers/counter/counter-chrdev.c:501:3: note: Undefined or garbage value returned to caller return ret; ^ ~~~ Suppressed 34 warnings (34 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. 33 warnings generated. drivers/input/input-poller.c:143:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", input->poller->poll_interval); ^~~~~~~ drivers/input/input-poller.c:143:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", input->poller->poll_interval); ^~~~~~~ drivers/input/input-poller.c:188:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", input->poller->poll_interval_max); ^~~~~~~ drivers/input/input-poller.c:188:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", input->poller->poll_interval_max); ^~~~~~~ drivers/input/input-poller.c:198:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", input->poller->poll_interval_min); ^~~~~~~ drivers/input/input-poller.c:198:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", input->poller->poll_interval_min); ^~~~~~~ Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 50 warnings generated. drivers/mtd/mtd_blkdevs.c:351:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(gd->disk_name, sizeof(gd->disk_name), ^~~~~~~~ drivers/mtd/mtd_blkdevs.c:351:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(gd->disk_name, sizeof(gd->disk_name), ^~~~~~~~ drivers/mtd/mtd_blkdevs.c:354:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(gd->disk_name, sizeof(gd->disk_name), ^~~~~~~~ drivers/mtd/mtd_blkdevs.c:354:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(gd->disk_name, sizeof(gd->disk_name), ^~~~~~~~ drivers/mtd/mtd_blkdevs.c:359:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(gd->disk_name, sizeof(gd->disk_name), ^~~~~~~~ drivers/mtd/mtd_blkdevs.c:359:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(gd->disk_name, sizeof(gd->disk_name), ^~~~~~~~ Suppressed 47 warnings (47 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. 19 warnings generated. Suppressed 19 warnings (19 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. 48 warnings generated. drivers/hwmon/stts751.c:685:3: warning: Value stored to 'name' is never read [clang-analyzer-deadcode.DeadStores] name = "STTS751-0"; ^ ~~~~~~~~~~~ drivers/hwmon/stts751.c:685:3: note: Value stored to 'name' is never read name = "STTS751-0"; ^ ~~~~~~~~~~~ drivers/hwmon/stts751.c:688:3: warning: Value stored to 'name' is never read [clang-analyzer-deadcode.DeadStores] name = "STTS751-1"; ^ ~~~~~~~~~~~ drivers/hwmon/stts751.c:688:3: note: Value stored to 'name' is never read name = "STTS751-1"; ^ ~~~~~~~~~~~ Suppressed 46 warnings (46 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. 62 warnings generated. >> drivers/hwmon/amc6821.c:273:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp[ix] * 1000); ^~~~~~~ drivers/hwmon/amc6821.c:273:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp[ix] * 1000); ^~~~~~~ drivers/hwmon/amc6821.c:330:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "1"); ^~~~~~~ drivers/hwmon/amc6821.c:330:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "1"); ^~~~~~~ drivers/hwmon/amc6821.c:332:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:332:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:340:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "1"); ^~~~~~~ drivers/hwmon/amc6821.c:340:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "1"); ^~~~~~~ drivers/hwmon/amc6821.c:342:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:342:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:349:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm1); ^~~~~~~ drivers/hwmon/amc6821.c:349:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm1); ^~~~~~~ drivers/hwmon/amc6821.c:374:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm1_enable); ^~~~~~~ drivers/hwmon/amc6821.c:374:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm1_enable); ^~~~~~~ drivers/hwmon/amc6821.c:429:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm1_auto_channels_temp); ^~~~~~~ drivers/hwmon/amc6821.c:429:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm1_auto_channels_temp); ^~~~~~~ drivers/hwmon/amc6821.c:441:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/amc6821.c:441:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/amc6821.c:444:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/amc6821.c:444:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/amc6821.c:458:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm1_auto_point_pwm[ix]); ^~~~~~~ drivers/hwmon/amc6821.c:458:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm1_auto_point_pwm[ix]); ^~~~~~~ drivers/hwmon/amc6821.c:598:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:598:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:599:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (int)(6000000 / data->fan[ix])); ^~~~~~~ drivers/hwmon/amc6821.c:599:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (int)(6000000 / data->fan[ix])); ^~~~~~~ drivers/hwmon/amc6821.c:607:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "1"); ^~~~~~~ drivers/hwmon/amc6821.c:607:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "1"); ^~~~~~~ drivers/hwmon/amc6821.c:609:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:609:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0"); ^~~~~~~ drivers/hwmon/amc6821.c:646:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->fan1_div); ^~~~~~~ drivers/hwmon/amc6821.c:646:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->fan1_div); ^~~~~~~ Suppressed 46 warnings (46 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. 33 warnings generated. >> drivers/hwmon/corsair-psu.c:151: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(priv->cmd_buffer, 0, CMD_BUFFER_SIZE); ^~~~~~ drivers/hwmon/corsair-psu.c:151: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(priv->cmd_buffer, 0, CMD_BUFFER_SIZE); ^~~~~~ >> drivers/hwmon/corsair-psu.c:176:3: 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, priv->cmd_buffer + 2, REPLY_SIZE); ^~~~~~ drivers/hwmon/corsair-psu.c:176:3: 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, priv->cmd_buffer + 2, REPLY_SIZE); ^~~~~~ drivers/hwmon/corsair-psu.c:768: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(priv->cmd_buffer, data, min(CMD_BUFFER_SIZE, size)); ^~~~~~ drivers/hwmon/corsair-psu.c:768: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(priv->cmd_buffer, data, min(CMD_BUFFER_SIZE, size)); ^~~~~~ Suppressed 30 warnings (30 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. 54 warnings generated. drivers/hwmon/dme1737.c:827:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:827:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:911:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:911:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1003:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1003:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1117:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1117:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1253:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1253:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", res); ^~~~~~~ drivers/hwmon/dme1737.c:1468:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->vrm); ^~~~~~~ drivers/hwmon/dme1737.c:1468:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->vrm); ^~~~~~~ drivers/hwmon/dme1737.c:1494:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); ^~~~~~~ drivers/hwmon/dme1737.c:1494:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); ^~~~~~~ drivers/hwmon/dme1737.c:1502:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", data->name); ^~~~~~~ drivers/hwmon/dme1737.c:1502:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", data->name); ^~~~~~~ Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 30 warnings generated. Suppressed 30 warnings (30 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. 49 warnings generated. drivers/hid/hid-wiimote-core.c:95: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(wdata->queue.outq[wdata->queue.head].data, buffer, count); ^~~~~~ drivers/hid/hid-wiimote-core.c:95: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(wdata->queue.outq[wdata->queue.head].data, buffer, count); ^~~~~~ drivers/hid/hid-wiimote-core.c:321: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(cmd, 0, sizeof(cmd)); ^~~~~~ drivers/hid/hid-wiimote-core.c:321: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(cmd, 0, sizeof(cmd)); ^~~~~~ drivers/hid/hid-wiimote-core.c:327: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(&cmd[6], buf, size); ^~~~~~ drivers/hid/hid-wiimote-core.c:327: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(&cmd[6], buf, size); ^~~~~~ drivers/hid/hid-wiimote-core.c:1469:4: 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(wdata->state.cmd_read_buf, &payload[5], size); ^~~~~~ drivers/hid/hid-wiimote-core.c:1469:4: 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(wdata->state.cmd_read_buf, &payload[5], size); ^~~~~~ drivers/hid/hid-wiimote-core.c:1659:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "none\n"); ^~~~~~~ drivers/hid/hid-wiimote-core.c:1659:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "none\n"); -- ^ drivers/hid/hid-steam.c:570:2: note: Loop condition is false. Exiting loop spin_lock_irqsave(&steam->lock, flags); ^ include/linux/spinlock.h:377:43: note: expanded from macro 'spin_lock_irqsave' #define spin_lock_irqsave(lock, flags) \ ^ drivers/hid/hid-steam.c:574:6: note: Assuming 'connected' is true if (connected) { ^~~~~~~~~ drivers/hid/hid-steam.c:574:2: note: Taking true branch if (connected) { ^ drivers/hid/hid-steam.c:575:9: note: Calling 'steam_register' ret = steam_register(steam); ^~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-steam.c:510:6: note: Assuming the condition is true if (!steam->serial_no[0]) { ^~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-steam.c:510:2: note: Taking true branch if (!steam->serial_no[0]) { ^ drivers/hid/hid-steam.c:516:7: note: Calling 'steam_get_serial' if (steam_get_serial(steam) < 0) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-steam.c:241:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ drivers/hid/hid-steam.c:241:2: note: Taking false branch if (ret < 0) ^ drivers/hid/hid-steam.c:243:8: note: Calling 'steam_recv_report' ret = steam_recv_report(steam, reply, sizeof(reply)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-steam.c:137:6: note: Assuming the condition is false if (hid_report_len(r) < 64) ^~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-steam.c:137:2: note: Taking false branch if (hid_report_len(r) < 64) ^ drivers/hid/hid-steam.c:141:6: note: Assuming 'buf' is non-null if (!buf) ^~~~ drivers/hid/hid-steam.c:141:2: note: Taking false branch if (!buf) ^ drivers/hid/hid-steam.c:153:6: note: Assuming 'ret' is <= 0 if (ret > 0) ^~~~~~~ drivers/hid/hid-steam.c:153:2: note: Taking false branch if (ret > 0) ^ drivers/hid/hid-steam.c:156:2: note: Returning without writing to '*data' return ret; ^ drivers/hid/hid-steam.c:243:8: note: Returning from 'steam_recv_report' ret = steam_recv_report(steam, reply, sizeof(reply)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-steam.c:244:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ drivers/hid/hid-steam.c:244:2: note: Taking false branch if (ret < 0) ^ drivers/hid/hid-steam.c:246:15: note: The left operand of '!=' is a garbage value if (reply[0] != 0xae || reply[1] != 0x15 || reply[2] != 0x01) ~~~~~~~~ ^ Suppressed 30 warnings (30 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. 49 warnings generated. drivers/hwmon/max6642.c:202:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/max6642.c:202:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/max6642.c:212:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp_from_reg(data->temp_high[attr2->nr])); ^~~~~~~ drivers/hwmon/max6642.c:212:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp_from_reg(data->temp_high[attr2->nr])); ^~~~~~~ drivers/hwmon/max6642.c:241:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/max6642.c:241:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); ^~~~~~~ Suppressed 46 warnings (46 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. 47 warnings generated. drivers/hwmon/max6650.c:315:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", alarm); ^~~~~~~ drivers/hwmon/max6650.c:315:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", alarm); ^~~~~~~ Suppressed 46 warnings (46 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. 51 warnings generated. >> drivers/hwmon/max6697.c:265:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp * 125); ^~~~~~~ drivers/hwmon/max6697.c:265:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp * 125); ^~~~~~~ drivers/hwmon/max6697.c:282:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp * 1000); ^~~~~~~ drivers/hwmon/max6697.c:282:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp * 1000); ^~~~~~~ drivers/hwmon/max6697.c:297:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms >> index) & 0x1); ^~~~~~~ drivers/hwmon/max6697.c:297:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms >> index) & 0x1); ^~~~~~~ drivers/hwmon/max6697.c:388:25: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return ret < 0 ? ret : sprintf(buf, "%d\n", max6581_offset_to_millic(ret)); ^~~~~~~ drivers/hwmon/max6697.c:388:25: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return ret < 0 ? ret : sprintf(buf, "%d\n", max6581_offset_to_millic(ret)); ^~~~~~~ >> drivers/hwmon/max6697.c:628: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(&p, 0, sizeof(p)); ^~~~~~ drivers/hwmon/max6697.c:628: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(&p, 0, sizeof(p)); ^~~~~~ Suppressed 46 warnings (46 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. 103 warnings generated. drivers/target/target_core_stat.c:52:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); ^~~~~~~~ drivers/target/target_core_stat.c:52:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); ^~~~~~~~ drivers/target/target_core_stat.c:57:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->dev_index); ^~~~~~~~ drivers/target/target_core_stat.c:57:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->dev_index); ^~~~~~~~ drivers/target/target_core_stat.c:62:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "Target\n"); ^~~~~~~~ drivers/target/target_core_stat.c:62:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "Target\n"); ^~~~~~~~ drivers/target/target_core_stat.c:67:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->export_count); ^~~~~~~~ drivers/target/target_core_stat.c:67:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->export_count); ^~~~~~~~ drivers/target/target_core_stat.c:102:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); ^~~~~~~~ drivers/target/target_core_stat.c:102:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); ^~~~~~~~ drivers/target/target_core_stat.c:107:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", to_stat_tgt_dev(item)->dev_index); ^~~~~~~~ drivers/target/target_core_stat.c:107:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_tgt_dev(item)->dev_index); ^~~~~~~~ drivers/target/target_core_stat.c:113:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", LU_COUNT); ^~~~~~~~ drivers/target/target_core_stat.c:113:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", LU_COUNT); ^~~~~~~~ drivers/target/target_core_stat.c:120:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "activated"); ^~~~~~~~ drivers/target/target_core_stat.c:120:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "activated"); ^~~~~~~~ drivers/target/target_core_stat.c:122:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "deactivated"); ^~~~~~~~ drivers/target/target_core_stat.c:122:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "deactivated"); ^~~~~~~~ drivers/target/target_core_stat.c:135:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", non_accessible_lus); ^~~~~~~~ drivers/target/target_core_stat.c:135:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", non_accessible_lus); ^~~~~~~~ drivers/target/target_core_stat.c:141:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:141:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:148:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:148:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:155:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:155:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:200:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); ^~~~~~~~ drivers/target/target_core_stat.c:200:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); ^~~~~~~~ drivers/target/target_core_stat.c:205:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:205:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:211:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", SCSI_LU_INDEX); -- ^~~~~~~~ drivers/target/target_core_stat.c:973:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%s\n", nacl->initiatorname); ^~~~~~~~ drivers/target/target_core_stat.c:973:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%s\n", nacl->initiatorname); ^~~~~~~~ drivers/target/target_core_stat.c:993:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", 0); ^~~~~~~~ drivers/target/target_core_stat.c:993:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", 0); ^~~~~~~~ drivers/target/target_core_stat.c:1013:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", deve->attach_count); ^~~~~~~~ drivers/target/target_core_stat.c:1013:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", deve->attach_count); ^~~~~~~~ drivers/target/target_core_stat.c:1033:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:1033:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%lu\n", ^~~~~~~~ drivers/target/target_core_stat.c:1054:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1054:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1075:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1075:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1096:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", 0); ^~~~~~~~ drivers/target/target_core_stat.c:1096:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", 0); ^~~~~~~~ drivers/target/target_core_stat.c:1116:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", (u32)(((u32)deve->creation_time - ^~~~~~~~ drivers/target/target_core_stat.c:1116:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", (u32)(((u32)deve->creation_time - ^~~~~~~~ drivers/target/target_core_stat.c:1137:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "Ready\n"); ^~~~~~~~ drivers/target/target_core_stat.c:1137:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "Ready\n"); ^~~~~~~~ drivers/target/target_core_stat.c:1208:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1208:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1231:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", lun->lun_index); ^~~~~~~~ drivers/target/target_core_stat.c:1231:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", lun->lun_index); ^~~~~~~~ drivers/target/target_core_stat.c:1253:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", tpg->se_tpg_tfo->tpg_get_tag(tpg)); ^~~~~~~~ drivers/target/target_core_stat.c:1253:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", tpg->se_tpg_tfo->tpg_get_tag(tpg)); ^~~~~~~~ drivers/target/target_core_stat.c:1276:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1276:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", ^~~~~~~~ drivers/target/target_core_stat.c:1297:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%u\n", nacl->acl_index); ^~~~~~~~ drivers/target/target_core_stat.c:1297:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%u\n", nacl->acl_index); ^~~~~~~~ drivers/target/target_core_stat.c:1321: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(buf, 0, 64); ^~~~~~ drivers/target/target_core_stat.c:1321: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(buf, 0, 64); ^~~~~~ drivers/target/target_core_stat.c:1325:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(page, PAGE_SIZE, "%s+i+%s\n", nacl->initiatorname, buf); ^~~~~~~~ drivers/target/target_core_stat.c:1325:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(page, PAGE_SIZE, "%s+i+%s\n", nacl->initiatorname, buf); ^~~~~~~~ Suppressed 31 warnings (31 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. 49 warnings generated. >> drivers/input/mouse/cyapa.c:139: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(&buf[1], values, len); ^~~~~~ drivers/input/mouse/cyapa.c:139: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(&buf[1], values, len); ^~~~~~ drivers/input/mouse/cyapa.c:1088: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(fw_name, buf, count); ^~~~~~ drivers/input/mouse/cyapa.c:1088: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(fw_name, buf, count); ^~~~~~ >> drivers/input/mouse/cyapa.c:1277:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(cyapa->phys, "i2c-%d-%04x/input0", client->adapter->nr, ^~~~~~~ drivers/input/mouse/cyapa.c:1277:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(cyapa->phys, "i2c-%d-%04x/input0", client->adapter->nr, ^~~~~~~ Suppressed 46 warnings (46 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. 52 warnings generated. >> drivers/input/mouse/cyapa_gen3.c:621:3: 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(&cmd[1], payload, cmd_len); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:621:3: 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(&cmd[1], payload, cmd_len); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:658: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(write_block_cmd.key, security_key, sizeof(security_key)); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:658: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(write_block_cmd.key, security_key, sizeof(security_key)); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:660: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(write_block_cmd.block_data, data, CYAPA_FW_BLOCK_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:660: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(write_block_cmd.block_data, data, CYAPA_FW_BLOCK_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:993: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(&cyapa->product_id[0], &query_data[0], 5); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:993: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(&cyapa->product_id[0], &query_data[0], 5); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:995: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(&cyapa->product_id[6], &query_data[5], 6); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:995: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(&cyapa->product_id[6], &query_data[5], 6); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:997: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(&cyapa->product_id[13], &query_data[11], 2); ^~~~~~ drivers/input/mouse/cyapa_gen3.c:997: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(&cyapa->product_id[13], &query_data[11], 2); ^~~~~~ Suppressed 46 warnings (46 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. 50 warnings generated. drivers/hwmon/menf21bmc_hwmon.c:104:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", input_names[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:104:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", input_names[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:116:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", drv_data->in_val[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:116:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", drv_data->in_val[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:125:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", drv_data->in_min[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:125:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", drv_data->in_min[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:134:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", drv_data->in_max[attr->index]); ^~~~~~~ drivers/hwmon/menf21bmc_hwmon.c:134:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", drv_data->in_max[attr->index]); ^~~~~~~ Suppressed 46 warnings (46 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. 52 warnings generated. drivers/hwmon/lm75.h:30:29: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] return (u16)((ntemp / 500) << 7); ^ drivers/hwmon/nct6775.c:2494:6: note: Assuming 'err' is >= 0 if (err < 0) ^~~~~~~ drivers/hwmon/nct6775.c:2494:2: note: Taking false branch if (err < 0) ^ drivers/hwmon/nct6775.c:2498:26: note: Calling 'LM75_TEMP_TO_REG' data->temp[index][nr] = LM75_TEMP_TO_REG(val); ^~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm75.h:27:14: note: Assuming '__UNIQUE_ID___x187' is <= '__UNIQUE_ID___y188' int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/minmax.h:104:48: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once' typeof(x) unique_x = (x); \ ^ drivers/hwmon/lm75.h:27:14: note: '?' condition is false int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^ include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/hwmon/lm75.h:27:14: note: '__UNIQUE_ID___x189' is < '__UNIQUE_ID___y190' int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:104:27: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~ drivers/hwmon/lm75.h:27:14: note: '?' condition is true int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); ^ include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^ include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) ^ include/linux/minmax.h:104:27: note: expanded from macro 'min_t' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/hwmon/lm75.h:29:12: note: 'ntemp' is < 0 ntemp += (ntemp < 0 ? -250 : 250); ^~~~~ drivers/hwmon/lm75.h:29:12: note: '?' condition is true drivers/hwmon/lm75.h:30:29: note: The result of the left shift is undefined because the left operand is negative return (u16)((ntemp / 500) << 7); ~~~~~~~~~~~~~ ^ >> drivers/hwmon/nct6775.c:1429:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(su->name, sizeof(su->name), ^~~~~~~~ drivers/hwmon/nct6775.c:1429:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(su->name, sizeof(su->name), ^~~~~~~~ drivers/hwmon/nct6775.c:1890:10: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] reg = data->read_value(data, ^ drivers/hwmon/nct6775.c:1852:14: note: Assuming 'i' is < field 'pwm_num' for (i = 0; i < data->pwm_num; i++) { ^~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1852:2: note: Loop condition is true. Entering loop body for (i = 0; i < data->pwm_num; i++) { ^ drivers/hwmon/nct6775.c:1853:7: note: Assuming the condition is true if (!(data->has_pwm & BIT(i))) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1853:3: note: Taking true branch if (!(data->has_pwm & BIT(i))) ^ drivers/hwmon/nct6775.c:1854:4: note: Execution continues on line 1852 continue; ^ drivers/hwmon/nct6775.c:1852:14: note: Assuming 'i' is < field 'pwm_num' for (i = 0; i < data->pwm_num; i++) { ^~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1852:2: note: Loop condition is true. Entering loop body for (i = 0; i < data->pwm_num; i++) { ^ drivers/hwmon/nct6775.c:1853:7: note: Assuming the condition is true if (!(data->has_pwm & BIT(i))) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1853:3: note: Taking true branch if (!(data->has_pwm & BIT(i))) ^ drivers/hwmon/nct6775.c:1854:4: note: Execution continues on line 1852 continue; ^ drivers/hwmon/nct6775.c:1852:14: note: Assuming 'i' is < field 'pwm_num' for (i = 0; i < data->pwm_num; i++) { ^~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1852:2: note: Loop condition is true. Entering loop body for (i = 0; i < data->pwm_num; i++) { ^ drivers/hwmon/nct6775.c:1853:7: note: Assuming the condition is true if (!(data->has_pwm & BIT(i))) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1853:3: note: Taking true branch if (!(data->has_pwm & BIT(i))) ^ drivers/hwmon/nct6775.c:1854:4: note: Execution continues on line 1852 continue; ^ drivers/hwmon/nct6775.c:1852:33: note: The value 3 is assigned to 'i' for (i = 0; i < data->pwm_num; i++) { ^~~ drivers/hwmon/nct6775.c:1852:14: note: Assuming 'i' is < field 'pwm_num' for (i = 0; i < data->pwm_num; i++) { ^~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1852:2: note: Loop condition is true. Entering loop body for (i = 0; i < data->pwm_num; i++) { ^ drivers/hwmon/nct6775.c:1853:7: note: Assuming the condition is false if (!(data->has_pwm & BIT(i))) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1853:3: note: Taking false branch if (!(data->has_pwm & BIT(i))) ^ drivers/hwmon/nct6775.c:1856:3: note: Loop condition is true. Entering loop body for (j = 0; j < ARRAY_SIZE(data->fan_time); j++) { ^ drivers/hwmon/nct6775.c:1856:3: note: Loop condition is true. Entering loop body drivers/hwmon/nct6775.c:1856:3: note: Loop condition is true. Entering loop body drivers/hwmon/nct6775.c:1856:3: note: Loop condition is false. Execution continues on line 1861 drivers/hwmon/nct6775.c:1863:7: note: Assuming the condition is false if (!data->target_temp[i] || ^~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1863:7: note: Left side of '||' is false drivers/hwmon/nct6775.c:1864:7: note: Assuming the condition is false data->pwm_enable[i] == thermal_cruise) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1863:3: note: Taking false branch if (!data->target_temp[i] || ^ drivers/hwmon/nct6775.c:1866:7: note: Assuming the condition is false if (!data->target_speed[i] || ^~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1866:7: note: Left side of '||' is false drivers/hwmon/nct6775.c:1867:7: note: Assuming the condition is false data->pwm_enable[i] == speed_cruise) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1866:3: note: Taking false branch if (!data->target_speed[i] || ^ drivers/hwmon/nct6775.c:1875:15: note: Assuming 'j' is >= field 'auto_pwm_num' for (j = 0; j < data->auto_pwm_num; j++) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/nct6775.c:1875:3: note: Loop condition is false. Execution continues on line 1886 for (j = 0; j < data->auto_pwm_num; j++) { ^ drivers/hwmon/nct6775.c:1888:3: note: Control jumps to 'case nct6775:' at line 1889 switch (data->kind) { ^ drivers/hwmon/nct6775.c:1890:10: note: 2nd function call argument is an uninitialized value reg = data->read_value(data, ^ >> drivers/hwmon/nct6775.c:2029:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", in_from_reg(data->in[nr][index], nr)); ^~~~~~~ drivers/hwmon/nct6775.c:2029:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", in_from_reg(data->in[nr][index], nr)); ^~~~~~~ drivers/hwmon/nct6775.c:2061:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ drivers/hwmon/nct6775.c:2061:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ drivers/hwmon/nct6775.c:2099:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", alarm); ^~~~~~~ drivers/hwmon/nct6775.c:2099:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", alarm); ^~~~~~~ drivers/hwmon/nct6775.c:2109:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ drivers/hwmon/nct6775.c:2109:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ drivers/hwmon/nct6775.c:2160:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", beep); ^~~~~~~ drivers/hwmon/nct6775.c:2160:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", beep); ^~~~~~~ drivers/hwmon/nct6775.c:2246:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->rpm[nr]); ^~~~~~~ drivers/hwmon/nct6775.c:2246:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->rpm[nr]); ^~~~~~~ drivers/hwmon/nct6775.c:2256:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/nct6775.c:2256:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/nct6775.c:2268:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", div_from_reg(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/nct6775.c:2268:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", div_from_reg(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/nct6775.c:2372:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", p ? : 4); ^~~~~~~ drivers/hwmon/nct6775.c:2372:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", p ? : 4); ^~~~~~~ >> drivers/hwmon/nct6775.c:2468:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", data->temp_label[data->temp_src[nr]]); ^~~~~~~ drivers/hwmon/nct6775.c:2468:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", data->temp_label[data->temp_src[nr]]); ^~~~~~~ drivers/hwmon/nct6775.c:2479:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", LM75_TEMP_FROM_REG(data->temp[index][nr])); ^~~~~~~ drivers/hwmon/nct6775.c:2479:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", LM75_TEMP_FROM_REG(data->temp[index][nr])); ^~~~~~~ drivers/hwmon/nct6775.c:2511:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_offset[sattr->index] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:2511:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_offset[sattr->index] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:2545:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (int)data->temp_type[nr]); ^~~~~~~ drivers/hwmon/nct6775.c:2545:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (int)data->temp_type[nr]); ^~~~~~~ drivers/hwmon/nct6775.c:2679:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm_mode[sattr->index]); ^~~~~~~ drivers/hwmon/nct6775.c:2679:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm_mode[sattr->index]); ^~~~~~~ drivers/hwmon/nct6775.c:2736:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", pwm); ^~~~~~~ drivers/hwmon/nct6775.c:2736:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", pwm); ^~~~~~~ drivers/hwmon/nct6775.c:2839:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->pwm_enable[sattr->index]); ^~~~~~~ drivers/hwmon/nct6775.c:2839:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->pwm_enable[sattr->index]); ^~~~~~~ drivers/hwmon/nct6775.c:2901:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", sel); ^~~~~~~ drivers/hwmon/nct6775.c:2901:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", sel); ^~~~~~~ drivers/hwmon/nct6775.c:3001:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->target_temp[sattr->index] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3001:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->target_temp[sattr->index] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3035:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/nct6775.c:3035:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/nct6775.c:3074:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_tolerance[index][nr] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3074:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_tolerance[index][nr] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3139:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", tolerance); ^~~~~~~ drivers/hwmon/nct6775.c:3139:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", tolerance); ^~~~~~~ drivers/hwmon/nct6775.c:3201:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->weight_temp[index][nr] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3201:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->weight_temp[index][nr] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3249:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/nct6775.c:3249:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/nct6775.c:3283:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->auto_pwm[sattr->nr][sattr->index]); ^~~~~~~ drivers/hwmon/nct6775.c:3283:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->auto_pwm[sattr->nr][sattr->index]); ^~~~~~~ drivers/hwmon/nct6775.c:3372:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->auto_temp[nr][point] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3372:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->auto_temp[nr][point] * 1000); ^~~~~~~ drivers/hwmon/nct6775.c:3550:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); ^~~~~~~ drivers/hwmon/nct6775.c:3550:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); ^~~~~~~ >> drivers/hwmon/nct6775.c:5092:4: 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(&res, 0, sizeof(res)); ^~~~~~ drivers/hwmon/nct6775.c:5092:4: 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(&res, 0, sizeof(res)); ^~~~~~ Suppressed 22 warnings (22 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. 62 warnings generated. drivers/hwmon/adm1031.c:325:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", GET_FAN_AUTO_BITFIELD(data, nr)); ^~~~~~~ drivers/hwmon/adm1031.c:325:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", GET_FAN_AUTO_BITFIELD(data, nr)); ^~~~~~~ drivers/hwmon/adm1031.c:390:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:390:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:398:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:398:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:428:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:428:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:471:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:471:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:564:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", value); ^~~~~~~ drivers/hwmon/adm1031.c:564:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", value); ^~~~~~~ drivers/hwmon/adm1031.c:572:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", FAN_DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:572:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", FAN_DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:579:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:579:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:674:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG_EXT(data->temp[nr], ext)); ^~~~~~~ drivers/hwmon/adm1031.c:674:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG_EXT(data->temp[nr], ext)); ^~~~~~~ drivers/hwmon/adm1031.c:681:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:681:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/adm1031.c:689:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:689:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:696:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:696:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:703:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:703:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[nr])); ^~~~~~~ drivers/hwmon/adm1031.c:815:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->alarm); ^~~~~~~ drivers/hwmon/adm1031.c:815:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->alarm); ^~~~~~~ drivers/hwmon/adm1031.c:825:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (data->alarm >> bitnr) & 1); ^~~~~~~ drivers/hwmon/adm1031.c:825:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (data->alarm >> bitnr) & 1); ^~~~~~~ drivers/hwmon/adm1031.c:854:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->update_interval); -- ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ include/linux/hid.h:1037:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:656:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:640:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 30 warnings (30 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. 57 warnings generated. Suppressed 57 warnings (57 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. 53 warnings generated. drivers/md/bcache/util.c:111:16: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] t = q & ~(~0 << 10); ~~ ^ drivers/md/bcache/util.c:99:6: note: Assuming 'v' is >= 0 if (v < 0) ^~~~~ drivers/md/bcache/util.c:99:2: note: Taking false branch if (v < 0) ^ drivers/md/bcache/util.c:111:16: note: The result of the left shift is undefined because the left operand is negative t = q & ~(~0 << 10); ~~ ^ drivers/md/bcache/util.c:119:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "-%llu.%i%c", q, t * 10 / 1024, units[u]); ^~~~~~~ drivers/md/bcache/util.c:119:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "-%llu.%i%c", q, t * 10 / 1024, units[u]); ^~~~~~~ drivers/md/bcache/util.c:121:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%llu.%i%c", q, t * 10 / 1024, units[u]); ^~~~~~~ drivers/md/bcache/util.c:121:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%llu.%i%c", q, t * 10 / 1024, units[u]); ^~~~~~~ drivers/md/bcache/util.c:138: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(uuid, 0, 16); ^~~~~~ drivers/md/bcache/util.c:138: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(uuid, 0, 16); ^~~~~~ Suppressed 49 warnings (49 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. 49 warnings generated. Suppressed 49 warnings (49 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. 47 warnings generated. Suppressed 47 warnings (47 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. 38 warnings generated. drivers/bcma/main.c:36:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%03X\n", core->id.manuf); ^~~~~~~ drivers/bcma/main.c:36:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%03X\n", core->id.manuf); ^~~~~~~ drivers/bcma/main.c:43:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%03X\n", core->id.id); ^~~~~~~ drivers/bcma/main.c:43:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%03X\n", core->id.id); ^~~~~~~ drivers/bcma/main.c:50:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%02X\n", core->id.rev); ^~~~~~~ drivers/bcma/main.c:50:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%02X\n", core->id.rev); ^~~~~~~ drivers/bcma/main.c:57:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%X\n", core->id.class); ^~~~~~~ drivers/bcma/main.c:57:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%X\n", core->id.class); ^~~~~~~ Suppressed 34 warnings (34 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. 60 warnings generated. >> drivers/block/null_blk/main.c:244:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", val); ^~~~~~~~ drivers/block/null_blk/main.c:244:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", val); ^~~~~~~~ drivers/block/null_blk/main.c:250:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%lu\n", val); ^~~~~~~~ drivers/block/null_blk/main.c:250:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%lu\n", val); ^~~~~~~~ drivers/block/null_blk/main.c:255:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, "%u\n", val); ^~~~~~~~ drivers/block/null_blk/main.c:255:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, "%u\n", val); ^~~~~~~~ drivers/block/null_blk/main.c:588:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(page, PAGE_SIZE, ^~~~~~~~ drivers/block/null_blk/main.c:588:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(page, PAGE_SIZE, ^~~~~~~~ >> drivers/block/null_blk/main.c:792: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(t_page->bitmap, 0, sizeof(t_page->bitmap)); ^~~~~~ drivers/block/null_blk/main.c:792: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(t_page->bitmap, 0, sizeof(t_page->bitmap)); ^~~~~~ drivers/block/null_blk/main.c:972:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = radix_tree_delete_item(&nullb->dev->data, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/null_blk/main.c:972:4: note: Value stored to 'ret' is never read ret = radix_tree_delete_item(&nullb->dev->data, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/block/null_blk/main.c:989:4: 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(dst + offset, src + offset, ^~~~~~ drivers/block/null_blk/main.c:989:4: 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 + offset, src + offset, ^~~~~~ drivers/block/null_blk/main.c:1080:3: 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(dst + offset, src + off + count, temp); ^~~~~~ drivers/block/null_blk/main.c:1080:3: 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 + offset, src + off + count, temp); ^~~~~~ drivers/block/null_blk/main.c:1112:4: 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(dst + off + count, 0, temp); ^~~~~~ drivers/block/null_blk/main.c:1112:4: 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(dst + off + count, 0, temp); ^~~~~~ drivers/block/null_blk/main.c:1116:3: 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(dst + off + count, src + offset, temp); ^~~~~~ drivers/block/null_blk/main.c:1116:3: 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 + off + count, src + offset, temp); ^~~~~~ drivers/block/null_blk/main.c:1133: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(dst + off, 0xFF, len); ^~~~~~ drivers/block/null_blk/main.c:1133: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(dst + off, 0xFF, len); ^~~~~~ >> drivers/block/null_blk/main.c:1863:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN); ^~~~~~~ drivers/block/null_blk/main.c:1863:2: note: Call to function 'strncpy' 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 'strncpy_s' in case of C11 strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN); ^~~~~~~ >> drivers/block/null_blk/main.c:2070:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(nullb->disk_name, "nullb%d", nullb->index); ^~~~~~~ drivers/block/null_blk/main.c:2070:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(nullb->disk_name, "nullb%d", nullb->index); ^~~~~~~ Suppressed 47 warnings (47 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. 21 warnings generated. drivers/mtd/ssfdc.c:337: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(ssfdc->logic_block_map, 0xff, sizeof(ssfdc->logic_block_map[0]) * ^~~~~~ drivers/mtd/ssfdc.c:337: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(ssfdc->logic_block_map, 0xff, sizeof(ssfdc->logic_block_map[0]) * ^~~~~~ drivers/mtd/ssfdc.c:400: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(buf, 0xff, SECTOR_SIZE); ^~~~~~ drivers/mtd/ssfdc.c:400: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(buf, 0xff, SECTOR_SIZE); ^~~~~~ Suppressed 19 warnings (19 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. 44 warnings generated. >> drivers/mtd/spi-nor/core.c:228:3: 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(buf, op.data.buf.in, nbytes); ^~~~~~ drivers/mtd/spi-nor/core.c:228:3: 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(buf, op.data.buf.in, nbytes); ^~~~~~ drivers/mtd/spi-nor/core.c:277:3: 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(nor->bouncebuf, buf, op.data.nbytes); ^~~~~~ drivers/mtd/spi-nor/core.c:277:3: 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(nor->bouncebuf, buf, op.data.nbytes); ^~~~~~ drivers/mtd/spi-nor/core.c:2234:24: warning: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'int' [clang-analyzer-core.UndefinedBinaryOperatorResult] erase->size_mask = (1 << erase->size_shift) - 1; ^ drivers/mtd/spi-nor/core.c:3359:6: note: Assuming 'nor' is non-null if (!nor) ^~~~ drivers/mtd/spi-nor/core.c:3359:2: note: Taking false branch if (!nor) ^ drivers/mtd/spi-nor/core.c:3368:6: note: Assuming 'data' is null if (data && data->name) ^~~~ drivers/mtd/spi-nor/core.c:3368:11: note: Left side of '&&' is false if (data && data->name) ^ drivers/mtd/spi-nor/core.c:3371:16: note: Field 'name' is non-null if (!nor->mtd.name) ^ drivers/mtd/spi-nor/core.c:3371:2: note: Taking false branch if (!nor->mtd.name) ^ drivers/mtd/spi-nor/core.c:3380:6: note: 'data' is null if (data && data->type) ^~~~ drivers/mtd/spi-nor/core.c:3380:11: note: Left side of '&&' is false if (data && data->type) ^ drivers/mtd/spi-nor/core.c:3382:11: note: Assuming the condition is false else if (!strcmp(spi->modalias, "spi-nor")) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:3382:7: note: Taking false branch else if (!strcmp(spi->modalias, "spi-nor")) ^ drivers/mtd/spi-nor/core.c:3387:8: note: Calling 'spi_nor_scan' ret = spi_nor_scan(nor, flash_name, &hwcaps); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:3208:6: note: 'ret' is 0 if (ret) ^~~ drivers/mtd/spi-nor/core.c:3208:2: note: Taking false branch if (ret) ^ drivers/mtd/spi-nor/core.c:3227:6: note: Assuming field 'bouncebuf' is non-null if (!nor->bouncebuf) ^~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:3227:2: note: Taking false branch if (!nor->bouncebuf) ^ drivers/mtd/spi-nor/core.c:3231:2: note: Taking false branch if (IS_ERR(info)) ^ drivers/mtd/spi-nor/core.c:3236:2: note: Loop condition is false. Exiting loop mutex_init(&nor->lock); ^ include/linux/mutex.h:101:32: note: expanded from macro 'mutex_init' #define mutex_init(mutex) \ ^ drivers/mtd/spi-nor/core.c:3239:8: note: Calling 'spi_nor_init_params' ret = spi_nor_init_params(nor); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:2867:6: note: Assuming field 'params' is non-null if (!nor->params) ^~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:2867:2: note: Taking false branch if (!nor->params) ^ drivers/mtd/spi-nor/core.c:2872:6: note: Assuming field 'parse_sfdp' is false if (nor->info->parse_sfdp) { ^~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:2872:2: note: Taking false branch if (nor->info->parse_sfdp) { ^ drivers/mtd/spi-nor/core.c:2878:13: note: Assuming the condition is true } else if (nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:2878:9: note: Taking true branch } else if (nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP) { ^ drivers/mtd/spi-nor/core.c:2879:3: note: Calling 'spi_nor_no_sfdp_init_params' spi_nor_no_sfdp_init_params(nor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:2575:6: note: Assuming the condition is false if (no_sfdp_flags & SPI_NOR_DUAL_READ) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/core.c:2575:2: note: Taking false branch if (no_sfdp_flags & SPI_NOR_DUAL_READ) { ^ drivers/mtd/spi-nor/core.c:2582:6: note: Assuming the condition is false if (no_sfdp_flags & SPI_NOR_QUAD_READ) { -- drivers/md/persistent-data/dm-btree.c:1619:3: 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(value_le, value_ptr(bn, n->index), c->info->value_type.size); ^~~~~~ drivers/md/persistent-data/dm-btree.c:1619:3: 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(value_le, value_ptr(bn, n->index), c->info->value_type.size); ^~~~~~ Suppressed 47 warnings (47 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. 59 warnings generated. drivers/hwmon/nct7802.c:94:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (mode >> (2 * sattr->index) & 3) + 2); ^~~~~~~ drivers/hwmon/nct7802.c:94:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (mode >> (2 * sattr->index) & 3) + 2); ^~~~~~~ drivers/hwmon/nct7802.c:127:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "1\n"); ^~~~~~~ drivers/hwmon/nct7802.c:127:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "1\n"); ^~~~~~~ drivers/hwmon/nct7802.c:133:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", !(regval & (1 << sattr->index))); ^~~~~~~ drivers/hwmon/nct7802.c:133:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", !(regval & (1 << sattr->index))); ^~~~~~~ drivers/hwmon/nct7802.c:145:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "255\n"); ^~~~~~~ drivers/hwmon/nct7802.c:145:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "255\n"); ^~~~~~~ drivers/hwmon/nct7802.c:151:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", val); ^~~~~~~ drivers/hwmon/nct7802.c:151:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", val); ^~~~~~~ drivers/hwmon/nct7802.c:182:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", enabled + 1); ^~~~~~~ drivers/hwmon/nct7802.c:182:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", enabled + 1); ^~~~~~~ drivers/hwmon/nct7802.c:369:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", voltage); ^~~~~~~ drivers/hwmon/nct7802.c:369:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", voltage); ^~~~~~~ drivers/hwmon/nct7802.c:444:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%u\n", !!(data->in_status & (1 << sattr->index))); ^~~~~~~ drivers/hwmon/nct7802.c:444:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%u\n", !!(data->in_status & (1 << sattr->index))); ^~~~~~~ drivers/hwmon/nct7802.c:461:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", temp); ^~~~~~~ drivers/hwmon/nct7802.c:461:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", temp); ^~~~~~~ drivers/hwmon/nct7802.c:494:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", speed); ^~~~~~~ drivers/hwmon/nct7802.c:494:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", speed); ^~~~~~~ drivers/hwmon/nct7802.c:508:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", speed); ^~~~~~~ drivers/hwmon/nct7802.c:508:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", speed); ^~~~~~~ drivers/hwmon/nct7802.c:541:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", !!(val & (1 << bit))); ^~~~~~~ drivers/hwmon/nct7802.c:541:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", !!(val & (1 << bit))); ^~~~~~~ drivers/hwmon/nct7802.c:556:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", !!(regval & (1 << sattr->index))); ^~~~~~~ drivers/hwmon/nct7802.c:556:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", !!(regval & (1 << sattr->index))); ^~~~~~~ Suppressed 46 warnings (46 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. 29 warnings generated. Suppressed 29 warnings (29 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 36 warnings generated. >> drivers/mtd/tests/pagetest.c:74: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(twopages, 0, bufsize); ^~~~~~ drivers/mtd/tests/pagetest.c:74: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(twopages, 0, bufsize); ^~~~~~ drivers/mtd/tests/pagetest.c:95: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(twopages, 0, bufsize); ^~~~~~ drivers/mtd/tests/pagetest.c:95: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(twopages, 0, bufsize); ^~~~~~ >> drivers/mtd/tests/pagetest.c:99:3: 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(boundary, writebuf + mtd->erasesize - pgsize, pgsize); ^~~~~~ drivers/mtd/tests/pagetest.c:99:3: 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(boundary, writebuf + mtd->erasesize - pgsize, pgsize); ^~~~~~ drivers/mtd/tests/pagetest.c:214:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(writebuf, "There is no data like this!"); ^~~~~~ drivers/mtd/tests/pagetest.c:214:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(writebuf, "There is no data like this!"); ^~~~~~ drivers/mtd/tests/pagetest.c:220: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(readbuf, 0, pgsize); ^~~~~~ drivers/mtd/tests/pagetest.c:220: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(readbuf, 0, pgsize); ^~~~~~ drivers/mtd/tests/pagetest.c:239:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(writebuf, "There is no data like this!"); ^~~~~~ drivers/mtd/tests/pagetest.c:239:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(writebuf, "There is no data like this!"); ^~~~~~ drivers/mtd/tests/pagetest.c:250: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(readbuf, 0, pgsize); ^~~~~~ drivers/mtd/tests/pagetest.c:250: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(readbuf, 0, pgsize); ^~~~~~ Suppressed 29 warnings (29 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. 47 warnings generated. mm/shuffle.c:17:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buffer, "%c\n", shuffle_param ? 'Y' : 'N'); ^~~~~~~ mm/shuffle.c:17:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buffer, "%c\n", shuffle_param ? 'Y' : 'N'); ^~~~~~~ Suppressed 46 warnings (46 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. 31 warnings generated. Suppressed 31 warnings (31 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. 53 warnings generated. mm/memblock.c:342:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&type->regions[r], &type->regions[r + 1], ^~~~~~~ mm/memblock.c:342:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&type->regions[r], &type->regions[r + 1], ^~~~~~~ mm/memblock.c:464: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(new_array, type->regions, old_size); ^~~~~~ mm/memblock.c:464: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(new_array, type->regions, old_size); ^~~~~~ mm/memblock.c:465: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(new_array + type->max, 0, old_size); ^~~~~~ mm/memblock.c:465: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(new_array + type->max, 0, old_size); ^~~~~~ mm/memblock.c:516:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(next, next + 1, (type->cnt - (i + 2)) * sizeof(*next)); ^~~~~~~ mm/memblock.c:516:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(next, next + 1, (type->cnt - (i + 2)) * sizeof(*next)); ^~~~~~~ mm/memblock.c:542:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(rgn + 1, rgn, (type->cnt - idx) * sizeof(*rgn)); ^~~~~~~ mm/memblock.c:542:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(rgn + 1, rgn, (type->cnt - idx) * sizeof(*rgn)); ^~~~~~~ mm/memblock.c:1185:36: warning: The result of the '<<' expression is undefined [clang-analyzer-core.UndefinedBinaryOperatorResult] *idx = (u32)idx_a | (u64)idx_b << 32; ~~~~~~~~~~~^~~~~ mm/memblock.c:1123:16: note: Assuming the condition is false if (WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n")) ^ include/asm-generic/bug.h:180:46: note: expanded from macro 'WARN_ONCE' #define WARN_ONCE(condition, format...) WARN(condition, format) ~~~~~^~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:173:25: note: expanded from macro 'WARN' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ mm/memblock.c:1123:6: note: Taking false branch if (WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n")) ^ include/asm-generic/bug.h:180:41: note: expanded from macro 'WARN_ONCE' #define WARN_ONCE(condition, format...) WARN(condition, format) ^ include/asm-generic/bug.h:174:2: note: expanded from macro 'WARN' no_printk(format); \ ^ include/linux/printk.h:131:2: note: expanded from macro 'no_printk' if (0) \ ^ mm/memblock.c:1123:2: note: Taking false branch if (WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n")) -- ^~~~~~~~ drivers/input/serio/arc_ps2.c:167:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(io->phys, sizeof(io->phys), "arc/serio%d", index); ^~~~~~~~ Suppressed 34 warnings (34 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. 49 warnings generated. drivers/input/keyboard/atkbd.c:1060: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(atkbd->keycode, 0, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1060: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(atkbd->keycode, 0, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1078:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &atkbd->ps2dev.serio->dev; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/keyboard/atkbd.c:1078:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &atkbd->ps2dev.serio->dev; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/keyboard/atkbd.c:1082: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(atkbd->keycode, 0, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1082: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(atkbd->keycode, 0, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1098:3: 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(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1098:3: 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(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1100:3: 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(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1100:3: 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(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode)); ^~~~~~ drivers/input/keyboard/atkbd.c:1138:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(atkbd->name, sizeof(atkbd->name), ^~~~~~~~ drivers/input/keyboard/atkbd.c:1138:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(atkbd->name, sizeof(atkbd->name), ^~~~~~~~ drivers/input/keyboard/atkbd.c:1141:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(atkbd->name, sizeof(atkbd->name), ^~~~~~~~ drivers/input/keyboard/atkbd.c:1141:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(atkbd->name, sizeof(atkbd->name), ^~~~~~~~ drivers/input/keyboard/atkbd.c:1145:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(atkbd->phys, sizeof(atkbd->phys), ^~~~~~~~ drivers/input/keyboard/atkbd.c:1145:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(atkbd->phys, sizeof(atkbd->phys), ^~~~~~~~ drivers/input/keyboard/atkbd.c:1434:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", atkbd->extra ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1434:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", atkbd->extra ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1515: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(atkbd->force_release_mask, new_mask, sizeof(atkbd->force_release_mask)); ^~~~~~ drivers/input/keyboard/atkbd.c:1515: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(atkbd->force_release_mask, new_mask, sizeof(atkbd->force_release_mask)); ^~~~~~ drivers/input/keyboard/atkbd.c:1522:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", atkbd->scroll ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1522:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", atkbd->scroll ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1570:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", atkbd->set); ^~~~~~~ drivers/input/keyboard/atkbd.c:1570:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", atkbd->set); ^~~~~~~ drivers/input/keyboard/atkbd.c:1625:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", atkbd->softrepeat ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1625:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", atkbd->softrepeat ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1679:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", atkbd->softraw ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1679:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", atkbd->softraw ? 1 : 0); ^~~~~~~ drivers/input/keyboard/atkbd.c:1725:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lu\n", atkbd->err_count); ^~~~~~~ drivers/input/keyboard/atkbd.c:1725:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lu\n", atkbd->err_count); ^~~~~~~ Suppressed 34 warnings (34 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. 44 warnings generated. >> drivers/hwmon/it87.c:863:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", in_from_reg(data, nr, data->in[nr][index])); ^~~~~~~ drivers/hwmon/it87.c:863:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", in_from_reg(data, nr, data->in[nr][index])); ^~~~~~~ drivers/hwmon/it87.c:951:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr][index])); ^~~~~~~ drivers/hwmon/it87.c:951:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr][index])); ^~~~~~~ drivers/hwmon/it87.c:1030:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "6\n"); /* Intel PECI */ ^~~~~~~ drivers/hwmon/it87.c:1030:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "6\n"); /* Intel PECI */ ^~~~~~~ drivers/hwmon/it87.c:1032:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "3\n"); /* thermal diode */ ^~~~~~~ drivers/hwmon/it87.c:1032:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "3\n"); /* thermal diode */ ^~~~~~~ drivers/hwmon/it87.c:1034:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "4\n"); /* thermistor */ ^~~~~~~ drivers/hwmon/it87.c:1034:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "4\n"); /* thermistor */ ^~~~~~~ drivers/hwmon/it87.c:1035:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0\n"); /* disabled */ ^~~~~~~ drivers/hwmon/it87.c:1035:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0\n"); /* disabled */ ^~~~~~~ drivers/hwmon/it87.c:1122:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", speed); ^~~~~~~ drivers/hwmon/it87.c:1122:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", speed); ^~~~~~~ drivers/hwmon/it87.c:1132:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/it87.c:1132:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr])); ^~~~~~~ drivers/hwmon/it87.c:1142:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", pwm_mode(data, nr)); ^~~~~~~ drivers/hwmon/it87.c:1142:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", pwm_mode(data, nr)); ^~~~~~~ drivers/hwmon/it87.c:1152:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/it87.c:1152:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/it87.c:1172:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", freq); ^~~~~~~ drivers/hwmon/it87.c:1172:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", freq); ^~~~~~~ drivers/hwmon/it87.c:1458:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (int)BIT(map)); ^~~~~~~ drivers/hwmon/it87.c:1458:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (int)BIT(map)); ^~~~~~~ drivers/hwmon/it87.c:1516:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/it87.c:1516:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/it87.c:1552:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->auto_pwm[nr][1] & 0x7f); ^~~~~~~ drivers/hwmon/it87.c:1552:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->auto_pwm[nr][1] & 0x7f); ^~~~~~~ drivers/hwmon/it87.c:1590:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", TEMP_FROM_REG(reg)); ^~~~~~~ drivers/hwmon/it87.c:1590:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", TEMP_FROM_REG(reg)); ^~~~~~~ drivers/hwmon/it87.c:1805:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->alarms); ^~~~~~~ drivers/hwmon/it87.c:1805:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->alarms); ^~~~~~~ drivers/hwmon/it87.c:1815:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/it87.c:1815:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); ^~~~~~~ drivers/hwmon/it87.c:1870:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", (data->beeps >> bitnr) & 1); ^~~~~~~ drivers/hwmon/it87.c:1870:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", (data->beeps >> bitnr) & 1); ^~~~~~~ drivers/hwmon/it87.c:1920:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->vrm); ^~~~~~~ drivers/hwmon/it87.c:1920:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->vrm); ^~~~~~~ drivers/hwmon/it87.c:1943:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%ld\n", (long)vid_from_reg(data->vid, data->vrm)); ^~~~~~~ drivers/hwmon/it87.c:1943:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%ld\n", (long)vid_from_reg(data->vid, data->vrm)); ^~~~~~~ >> drivers/hwmon/it87.c:1973:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", label); ^~~~~~~ drivers/hwmon/it87.c:1973:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", label); ^~~~~~~ >> drivers/hwmon/it87.c:3311: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(&sio_data, 0, sizeof(struct it87_sio_data)); ^~~~~~ drivers/hwmon/it87.c:3311: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(&sio_data, 0, sizeof(struct it87_sio_data)); ^~~~~~ Suppressed 22 warnings (22 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. 71 warnings generated. drivers/ata/libata-core.c:92:8: warning: Excessive padding in 'struct ata_force_param' (4 padding bytes, where 0 is optimal). Optimal fields order: name, xfer_mask, horkage_on, horkage_off, lflags, cbl, spd_limit, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct ata_force_param { ~~~~~~~^~~~~~~~~~~~~~~~~ drivers/ata/libata-core.c:92:8: note: Excessive padding in 'struct ata_force_param' (4 padding bytes, where 0 is optimal). Optimal fields order: name, xfer_mask, horkage_on, horkage_off, lflags, cbl, spd_limit, consider reordering the fields or adding explicit padding members struct ata_force_param { ~~~~~~~^~~~~~~~~~~~~~~~~ drivers/ata/libata-core.c:1512:3: 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(qc->cdb, cdb, ATAPI_CDB_LEN); ^~~~~~ drivers/ata/libata-core.c:1512:3: 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(qc->cdb, cdb, ATAPI_CDB_LEN); ^~~~~~ drivers/ata/libata-core.c:2114:3: 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(cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); ^~~~~~ drivers/ata/libata-core.c:2114:3: 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(cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); ^~~~~~ drivers/ata/libata-core.c:2139:3: 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(cmds, ap->sector_buf, ATA_LOG_NCQ_NON_DATA_SIZE); ^~~~~~ drivers/ata/libata-core.c:2139:3: 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(cmds, ap->sector_buf, ATA_LOG_NCQ_NON_DATA_SIZE); ^~~~~~ drivers/ata/libata-core.c:2205:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(desc, desc_sz, "NCQ (not used)"); ^~~~~~~~ drivers/ata/libata-core.c:2205:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(desc, desc_sz, "NCQ (not used)"); ^~~~~~~~ drivers/ata/libata-core.c:2211:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(desc, desc_sz, "NCQ (not used)"); ^~~~~~~~ drivers/ata/libata-core.c:2211:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(desc, desc_sz, "NCQ (not used)"); ^~~~~~~~ drivers/ata/libata-core.c:2238:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(desc, desc_sz, "NCQ (depth %d)%s", ddepth, aa_desc); ^~~~~~~~ drivers/ata/libata-core.c:2238:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(desc, desc_sz, "NCQ (depth %d)%s", ddepth, aa_desc); ^~~~~~~~ drivers/ata/libata-core.c:2240:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(desc, desc_sz, "NCQ (depth %d/%d)%s", hdepth, ^~~~~~~~ drivers/ata/libata-core.c:2240:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(desc, desc_sz, "NCQ (depth %d/%d)%s", hdepth, ^~~~~~~~ drivers/ata/libata-core.c:2626:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(revbuf, 7, "CFA"); ^~~~~~~~ drivers/ata/libata-core.c:2626:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(revbuf, 7, "CFA"); ^~~~~~~~ drivers/ata/libata-core.c:2628:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id)); ^~~~~~~~ drivers/ata/libata-core.c:2628:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id)); ^~~~~~~~ drivers/ata/libata-core.c:3250:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "%s:%s", ^~~~~~~~ drivers/ata/libata-core.c:3250:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "%s:%s", ^~~~~~~~ drivers/ata/libata-core.c:3254:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "%s", ^~~~~~~~ drivers/ata/libata-core.c:3254:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "%s", ^~~~~~~~ drivers/ata/libata-core.c:3735: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(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); ^~~~~~ drivers/ata/libata-core.c:3735: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(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); ^~~~~~ drivers/ata/libata-core.c:4619:7: warning: Access to field 'ap' results in a dereference of a null pointer (loaded from variable 'qc') [clang-analyzer-core.NullDereference] ap = qc->ap; ^~ drivers/ata/libata-core.c:4618:15: note: Assuming 'qc' is equal to null WARN_ON_ONCE(qc == NULL); /* ata_qc_from_tag _might_ return NULL */ ^ include/asm-generic/bug.h:179:41: note: expanded from macro 'WARN_ON_ONCE' #define WARN_ON_ONCE(condition) WARN_ON(condition) ~~~~~~~~^~~~~~~~~~ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ drivers/ata/libata-core.c:4619:7: note: Access to field 'ap' results in a dereference of a null pointer (loaded from variable 'qc') ap = qc->ap; ^~ drivers/ata/libata-core.c:5238: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((void *)dev + ATA_DEVICE_CLEAR_BEGIN, 0, ^~~~~~ drivers/ata/libata-core.c:5238: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((void *)dev + ATA_DEVICE_CLEAR_BEGIN, 0, ^~~~~~ drivers/ata/libata-core.c:5261: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((void *)link + ATA_LINK_CLEAR_BEGIN, 0, ^~~~~~ drivers/ata/libata-core.c:5261: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((void *)link + ATA_LINK_CLEAR_BEGIN, 0, ^~~~~~ drivers/ata/libata-core.c:5517:18: warning: Access to field 'pio_mask' results in a dereference of a null pointer (loaded from variable 'pi') [clang-analyzer-core.NullDereference] ap->pio_mask = pi->pio_mask; ^~ drivers/ata/libata-core.c:5508:6: note: Assuming 'host' is non-null if (!host) ^~~~~ drivers/ata/libata-core.c:5508:2: note: Taking false branch if (!host) ^ drivers/ata/libata-core.c:5511:21: note: Null pointer value stored to 'pi' for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) { ^~~~~~~~~ drivers/ata/libata-core.c:5511:32: note: Assuming 'i' is < field 'n_ports' for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) { ^~~~~~~~~~~~~~~~~ drivers/ata/libata-core.c:5511:2: note: Loop condition is true. Entering loop body for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) { ^ drivers/ata/libata-core.c:5514:7: note: Assuming the condition is false if (ppi[j]) ^~~~~~ drivers/ata/libata-core.c:5514:3: note: Taking false branch if (ppi[j]) ^ drivers/ata/libata-core.c:5517:18: note: Access to field 'pio_mask' results in a dereference of a null pointer (loaded from variable 'pi') ap->pio_mask = pi->pio_mask; ^~ Suppressed 54 warnings (54 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. 22 warnings generated. Suppressed 22 warnings (22 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. 62 warnings generated. >> drivers/mtd/nand/raw/cadence-nand-controller.c:758: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(&cdns_ctrl->irq_status, 0, sizeof(cdns_ctrl->irq_status)); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:758: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(&cdns_ctrl->irq_status, 0, sizeof(cdns_ctrl->irq_status)); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:759: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(&cdns_ctrl->irq_mask, 0, sizeof(cdns_ctrl->irq_mask)); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:759: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(&cdns_ctrl->irq_mask, 0, sizeof(cdns_ctrl->irq_mask)); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:924: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(cdma_desc, 0, sizeof(struct cadence_nand_cdma_desc)); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:924: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(cdma_desc, 0, sizeof(struct cadence_nand_cdma_desc)); ^~~~~~ >> drivers/mtd/nand/raw/cadence-nand-controller.c:1414: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(buf + cdns_chip->bbm_offs, cdns_ctrl->buf, cdns_chip->bbm_len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1414: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(buf + cdns_chip->bbm_offs, cdns_ctrl->buf, cdns_chip->bbm_len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1443: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(cdns_ctrl->buf + mtd->writesize, 0xFF, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1443: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(cdns_ctrl->buf + mtd->writesize, 0xFF, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1476:3: 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(cdns_ctrl->buf + mtd->writesize, chip->oob_poi, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1476:3: 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(cdns_ctrl->buf + mtd->writesize, chip->oob_poi, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1480: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(cdns_ctrl->buf, buf, mtd->writesize); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1480: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(cdns_ctrl->buf, buf, mtd->writesize); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1497: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(cdns_ctrl->buf, 0xFF, mtd->writesize); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1497: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(cdns_ctrl->buf, 0xFF, mtd->writesize); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1529: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(tmp_buf, 0xff, size); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1529: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(tmp_buf, 0xff, size); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1544:4: 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(tmp_buf + pos, buf, len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1544:4: 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(tmp_buf + pos, buf, len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1548:5: 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(tmp_buf + writesize + oob_skip, buf, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1548:5: 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(tmp_buf + writesize + oob_skip, buf, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1562:3: 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(tmp_buf + writesize, oob, oob_skip); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1562:3: 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(tmp_buf + writesize, oob, oob_skip); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1565:3: 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(tmp_buf + oob_data_offset, oob, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1565:3: 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(tmp_buf + oob_data_offset, oob, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1582:4: 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(tmp_buf + pos, oob, len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1582:4: 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(tmp_buf + pos, oob, len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1586:5: 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(tmp_buf + writesize + oob_skip, oob, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1586:5: 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(tmp_buf + writesize + oob_skip, oob, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1656:3: 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(buf, cdns_ctrl->buf, mtd->writesize); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1656:3: 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(buf, cdns_ctrl->buf, mtd->writesize); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1658:4: 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(chip->oob_poi, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1658:4: 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(chip->oob_poi, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1745:4: 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(buf, tmp_buf + pos, len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1745:4: 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(buf, tmp_buf + pos, len); ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1749:5: 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(buf, tmp_buf + writesize + oob_skip, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1749:5: 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(buf, tmp_buf + writesize + oob_skip, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1763:3: 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(oob, tmp_buf + oob_data_offset, ^~~~~~ drivers/mtd/nand/raw/cadence-nand-controller.c:1763:3: 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(oob, tmp_buf + oob_data_offset, -- ^ ~~~~~~~~~~~~ drivers/md/bcache/writeback.c:987:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(name, sizeof(name), "bch_dirty_init[%d]", i); ^~~~~~~~ drivers/md/bcache/writeback.c:987:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(name, sizeof(name), "bch_dirty_init[%d]", i); ^~~~~~~~ Suppressed 51 warnings (51 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. 51 warnings generated. drivers/scsi/sr.c:684:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(disk->disk_name, "sr%d", minor); ^~~~~~~ drivers/scsi/sr.c:684:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(disk->disk_name, "sr%d", minor); ^~~~~~~ drivers/scsi/sr.c:707:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(cd->cdi.name, "sr%d", minor); ^~~~~~~ drivers/scsi/sr.c:707:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(cd->cdi.name, "sr%d", minor); ^~~~~~~ drivers/scsi/sr.c:767: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((void *) &cmd[1], 0, 9); ^~~~~~ drivers/scsi/sr.c:767: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((void *) &cmd[1], 0, 9); ^~~~~~ drivers/scsi/sr.c:768: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(buffer, 0, sizeof(buffer)); ^~~~~~ drivers/scsi/sr.c:768: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(buffer, 0, sizeof(buffer)); ^~~~~~ Suppressed 47 warnings (47 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. 57 warnings generated. drivers/scsi/sr_ioctl.c:48: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:48: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:78: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:78: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:141: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:141: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:162: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:162: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:268: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:268: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:393: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:393: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:404: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(mcn->medium_catalog_number, buffer + 9, 13); ^~~~~~ drivers/scsi/sr_ioctl.c:404: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(mcn->medium_catalog_number, buffer + 9, 13); ^~~~~~ drivers/scsi/sr_ioctl.c:426: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:426: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:481: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:481: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:539: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_ioctl.c:539: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ Suppressed 47 warnings (47 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. 53 warnings generated. >> drivers/ata/libata-sff.c:611:4: 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(buf, pad, slop); ^~~~~~ drivers/ata/libata-sff.c:611:4: 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(buf, pad, slop); ^~~~~~ drivers/ata/libata-sff.c:613:4: 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(pad, buf, slop); ^~~~~~ drivers/ata/libata-sff.c:613:4: 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(pad, buf, slop); ^~~~~~ >> drivers/ata/libata-sff.c:1814: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(&tf, 0, sizeof(tf)); ^~~~~~ drivers/ata/libata-sff.c:1814: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(&tf, 0, sizeof(tf)); ^~~~~~ Suppressed 50 warnings (50 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. 51 warnings generated. >> drivers/ata/libata-pmp.c:679: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(dev->gscr, gscr, sizeof(gscr[0]) * SATA_PMP_GSCR_DWORDS); ^~~~~~ drivers/ata/libata-pmp.c:679: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(dev->gscr, gscr, sizeof(gscr[0]) * SATA_PMP_GSCR_DWORDS); ^~~~~~ Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 62 warnings generated. >> drivers/ata/libahci.c:264:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%x\n", hpriv->cap); ^~~~~~~ drivers/ata/libahci.c:264:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%x\n", hpriv->cap); ^~~~~~~ drivers/ata/libahci.c:274:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%x\n", hpriv->cap2); ^~~~~~~ drivers/ata/libahci.c:274:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%x\n", hpriv->cap2); ^~~~~~~ drivers/ata/libahci.c:284:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%x\n", hpriv->version); ^~~~~~~ drivers/ata/libahci.c:284:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%x\n", hpriv->version); ^~~~~~~ drivers/ata/libahci.c:296:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = sprintf(buf, "%x\n", readl(port_mmio + PORT_CMD)); ^~~~~~~ drivers/ata/libahci.c:296:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ret = sprintf(buf, "%x\n", readl(port_mmio + PORT_CMD)); ^~~~~~~ >> drivers/ata/libahci.c:418:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s%s%s%s\n", ^~~~~~~ drivers/ata/libahci.c:418:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s%s%s%s\n", ^~~~~~~ drivers/ata/libahci.c:1142:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] rc += sprintf(buf, "%lx\n", emp->led_state); ^~~~~~~ drivers/ata/libahci.c:1142:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 rc += sprintf(buf, "%lx\n", emp->led_state); ^~~~~~~ drivers/ata/libahci.c:1218:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", emp->blink_policy); ^~~~~~~ drivers/ata/libahci.c:1218:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", emp->blink_policy); ^~~~~~~ drivers/ata/libahci.c:1275:2: warning: Value stored to 'tmp' is never read [clang-analyzer-deadcode.DeadStores] tmp = readl(mmio + HOST_CTL); ^ drivers/ata/libahci.c:1275:2: note: Value stored to 'tmp' is never read >> drivers/ata/libahci.c:1657: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(cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32); ^~~~~~ drivers/ata/libahci.c:1657: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(cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32); ^~~~~~ >> drivers/ata/libahci.c:1658:3: 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(cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, qc->dev->cdb_len); ^~~~~~ drivers/ata/libahci.c:1658:3: 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(cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, qc->dev->cdb_len); ^~~~~~ drivers/ata/libahci.c:1741:2: warning: 3rd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] ahci_scr_write(&ap->link, SCR_ERROR, serror); ^ drivers/ata/libahci.c:1962:13: note: Loop condition is false. Exiting loop irq_stat = readl(mmio + HOST_IRQ_STAT); ^ arch/riscv/include/asm/mmio.h:140:30: note: expanded from macro 'readl' #define readl(c) ({ u32 __v; __io_br(); __v = readl_cpu(c); __io_ar(__v); __v; }) ^ arch/riscv/include/asm/mmio.h:133:19: note: expanded from macro '__io_br' #define __io_br() do {} while (0) ^ drivers/ata/libahci.c:1963:6: note: Assuming 'irq_stat' is not equal to 0 if (!irq_stat) ^~~~~~~~~ drivers/ata/libahci.c:1963:2: note: Taking false branch if (!irq_stat) ^ drivers/ata/libahci.c:1970:7: note: Calling 'ahci_handle_port_intr' rc = ahci_handle_port_intr(host, irq_masked); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1928:14: note: Assuming 'i' is < field 'n_ports' for (i = 0; i < host->n_ports; i++) { ^~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1928:2: note: Loop condition is true. Entering loop body for (i = 0; i < host->n_ports; i++) { ^ drivers/ata/libahci.c:1931:7: note: Assuming the condition is false if (!(irq_masked & (1 << i))) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1931:3: note: Taking false branch if (!(irq_masked & (1 << i))) ^ drivers/ata/libahci.c:1935:7: note: Assuming 'ap' is non-null if (ap) { ^~ drivers/ata/libahci.c:1935:3: note: Taking true branch if (ap) { ^ drivers/ata/libahci.c:1936:4: note: Calling 'ahci_port_intr' ahci_port_intr(ap); ^~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1902:11: note: Loop condition is false. Exiting loop status = readl(port_mmio + PORT_IRQ_STAT); ^ arch/riscv/include/asm/mmio.h:140:30: note: expanded from macro 'readl' #define readl(c) ({ u32 __v; __io_br(); __v = readl_cpu(c); __io_ar(__v); __v; }) ^ arch/riscv/include/asm/mmio.h:133:19: note: expanded from macro '__io_br' #define __io_br() do {} while (0) ^ drivers/ata/libahci.c:1905:2: note: Calling 'ahci_handle_port_interrupt' ahci_handle_port_interrupt(ap, port_mmio, status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1819:19: note: Assuming the condition is true int resetting = !!(ap->pflags & ATA_PFLAG_RESETTING); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1824:2: note: Taking false branch if (unlikely(resetting)) ^ drivers/ata/libahci.c:1827:6: note: Assuming the condition is false if (sata_lpm_ignore_phy_events(&ap->link)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1827:2: note: Taking false branch if (sata_lpm_ignore_phy_events(&ap->link)) { ^ drivers/ata/libahci.c:1832:6: note: Assuming the condition is false if (unlikely(status & PORT_IRQ_ERROR)) { ^ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ drivers/ata/libahci.c:1832:2: note: Taking true branch if (unlikely(status & PORT_IRQ_ERROR)) { ^ drivers/ata/libahci.c:1833:3: note: Calling 'ahci_error_intr' ahci_error_intr(ap, status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1711:2: note: 'serror' declared without an initial value u32 serror; ^~~~~~~~~~ drivers/ata/libahci.c:1714:6: note: Assuming field 'fbs_enabled' is false if (pp->fbs_enabled) { ^~~~~~~~~~~~~~~ drivers/ata/libahci.c:1714:2: note: Taking false branch if (pp->fbs_enabled) { ^ drivers/ata/libahci.c:1725:3: note: Loop condition is false. Execution continues on line 1729 ata_for_each_link(link, ap, EDGE) ^ include/linux/libata.h:1676:2: note: expanded from macro 'ata_for_each_link' for ((link) = ata_link_next(NULL, (ap), ATA_LITER_##mode); (link); \ ^ drivers/ata/libahci.c:1729:7: note: 'link' is null if (!link) ^~~~ drivers/ata/libahci.c:1729:2: note: Taking true branch if (!link) ^ drivers/ata/libahci.c:1740:2: note: Calling 'ahci_scr_read' ahci_scr_read(&ap->link, SCR_ERROR, &serror); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:622:6: note: Assuming 'offset' is 0 if (offset) { ^~~~~~ drivers/ata/libahci.c:622:2: note: Taking false branch if (offset) { ^ drivers/ata/libahci.c:626:2: note: Returning without writing to '*val' return -EINVAL; ^ drivers/ata/libahci.c:1740:2: note: Returning from 'ahci_scr_read' ahci_scr_read(&ap->link, SCR_ERROR, &serror); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/libahci.c:1741:2: note: 3rd function call argument is an uninitialized value ahci_scr_write(&ap->link, SCR_ERROR, serror); ^ ~~~~~~ >> drivers/ata/libahci.c:2355:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(pp->irq_desc, 8, ^~~~~~~~ drivers/ata/libahci.c:2355:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(pp->irq_desc, 8, ^~~~~~~~ Suppressed 50 warnings (50 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. 30 warnings generated. Suppressed 30 warnings (30 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. 50 warnings generated. drivers/hid/i2c-hid/i2c-hid-core.c:238: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(cmd->data + length, args, args_len); ^~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:238: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(cmd->data + length, args, args_len); ^~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:385: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(&args[index], buf, data_len); ^~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:385: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(&args[index], buf, data_len); ^~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:640: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(buf, ihid->rawbuf + 2, count); ^~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:640: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(buf, ihid->rawbuf + 2, count); ^~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:1002:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", ^~~~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:1002:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", ^~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 47 warnings generated. drivers/ssb/main.c:363:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ssb_config_attr(core_num, core_index, "%u\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:363:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ssb_config_attr(core_num, core_index, "%u\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:364:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ssb_config_attr(coreid, id.coreid, "0x%04x\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:364:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ssb_config_attr(coreid, id.coreid, "0x%04x\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:365:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ssb_config_attr(vendor, id.vendor, "0x%04x\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:365:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ssb_config_attr(vendor, id.vendor, "0x%04x\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:366:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ssb_config_attr(revision, id.revision, "%u\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:366:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ssb_config_attr(revision, id.revision, "%u\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:367:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ssb_config_attr(irq, irq, "%u\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ ^~~~~~~ drivers/ssb/main.c:367:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ssb_config_attr(irq, irq, "%u\n") ^ drivers/ssb/main.c:359:9: note: expanded from macro 'ssb_config_attr' return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ -- ^~ ~~~~~~~~~~~~~~~~ drivers/target/target_core_xcopy.c:417:23: warning: Value stored to 'xpt_cmd' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct xcopy_pt_cmd *xpt_cmd = container_of(se_cmd, ^~~~~~~ drivers/target/target_core_xcopy.c:417:23: note: Value stored to 'xpt_cmd' during its initialization is never read struct xcopy_pt_cmd *xpt_cmd = container_of(se_cmd, ^~~~~~~ drivers/target/target_core_xcopy.c:472: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(&xcopy_pt_tpg, 0, sizeof(struct se_portal_group)); ^~~~~~ drivers/target/target_core_xcopy.c:472: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(&xcopy_pt_tpg, 0, sizeof(struct se_portal_group)); ^~~~~~ drivers/target/target_core_xcopy.c:478: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(&xcopy_pt_nacl, 0, sizeof(struct se_node_acl)); ^~~~~~ drivers/target/target_core_xcopy.c:478: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(&xcopy_pt_nacl, 0, sizeof(struct se_node_acl)); ^~~~~~ drivers/target/target_core_xcopy.c:481: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(&xcopy_pt_sess, 0, sizeof(struct se_session)); ^~~~~~ drivers/target/target_core_xcopy.c:481: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(&xcopy_pt_sess, 0, sizeof(struct se_session)); ^~~~~~ drivers/target/target_core_xcopy.c:594: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(&xpt_cmd, 0, sizeof(xpt_cmd)); ^~~~~~ drivers/target/target_core_xcopy.c:594: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(&xpt_cmd, 0, sizeof(xpt_cmd)); ^~~~~~ drivers/target/target_core_xcopy.c:597: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(&cdb[0], 0, 16); ^~~~~~ drivers/target/target_core_xcopy.c:597: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(&cdb[0], 0, 16); ^~~~~~ drivers/target/target_core_xcopy.c:639: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(&xpt_cmd, 0, sizeof(xpt_cmd)); ^~~~~~ drivers/target/target_core_xcopy.c:639: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(&xpt_cmd, 0, sizeof(xpt_cmd)); ^~~~~~ drivers/target/target_core_xcopy.c:642: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(&cdb[0], 0, 16); ^~~~~~ drivers/target/target_core_xcopy.c:642: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(&cdb[0], 0, 16); ^~~~~~ drivers/target/target_core_xcopy.c:803:2: warning: Value stored to 'list_id' is never read [clang-analyzer-deadcode.DeadStores] list_id = p[0]; ^ ~~~~ drivers/target/target_core_xcopy.c:803:2: note: Value stored to 'list_id' is never read list_id = p[0]; ^ ~~~~ drivers/target/target_core_xcopy.c:804:2: warning: Value stored to 'list_id_usage' is never read [clang-analyzer-deadcode.DeadStores] list_id_usage = (p[1] & 0x18) >> 3; ^ ~~~~~~~~~~~~~~~~~~ drivers/target/target_core_xcopy.c:804:2: note: Value stored to 'list_id_usage' is never read list_id_usage = (p[1] & 0x18) >> 3; ^ ~~~~~~~~~~~~~~~~~~ Suppressed 14 warnings (14 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. 34 warnings generated. Suppressed 34 warnings (34 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. 39 warnings generated. drivers/comedi/comedi_fops.c:399:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:399:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:455:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:455:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:512:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:512:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:568:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:568:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%u\n", size); ^~~~~~~~ drivers/comedi/comedi_fops.c:937: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(&devinfo, 0, sizeof(devinfo)); ^~~~~~ drivers/comedi/comedi_fops.c:937: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(&devinfo, 0, sizeof(devinfo)); ^~~~~~ Suppressed 34 warnings (34 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. 47 warnings generated. >> drivers/input/keyboard/dlink-dir685-touchkeys.c:37: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(buf, 0, sizeof(buf)); ^~~~~~ drivers/input/keyboard/dlink-dir685-touchkeys.c:37: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(buf, 0, sizeof(buf)); ^~~~~~ Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 36 warnings generated. drivers/input/keyboard/gpio_keys_polled.c:93: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(bdev->rel_axis_seen, 0, sizeof(bdev->rel_axis_seen)); ^~~~~~ drivers/input/keyboard/gpio_keys_polled.c:93: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(bdev->rel_axis_seen, 0, sizeof(bdev->rel_axis_seen)); ^~~~~~ drivers/input/keyboard/gpio_keys_polled.c:94: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(bdev->abs_axis_seen, 0, sizeof(bdev->abs_axis_seen)); ^~~~~~ drivers/input/keyboard/gpio_keys_polled.c:94: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(bdev->abs_axis_seen, 0, sizeof(bdev->abs_axis_seen)); ^~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 33 warnings generated. Suppressed 33 warnings (33 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. 35 warnings generated. drivers/mtd/ftl.c:177:26: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (header.BlockSize != 9 || ^ drivers/mtd/ftl.c:1012:6: note: Assuming 'partition' is non-null if (!partition) { ^~~~~~~~~~ drivers/mtd/ftl.c:1012:2: note: Taking false branch if (!partition) { ^ drivers/mtd/ftl.c:1020:7: note: Calling 'scan_header' if ((scan_header(partition) == 0) && ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/ftl.c:158:19: note: Assuming 1048576 is >= field 'size' max_offset = (0x100000mbd.mtd->size)?0x100000:part->mbd.mtd->size; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/ftl.c:158:18: note: '?' condition is false max_offset = (0x100000mbd.mtd->size)?0x100000:part->mbd.mtd->size; ^ drivers/mtd/ftl.c:161:3: note: Assuming the condition is false (offset + sizeof(header)) < max_offset; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/ftl.c:160:5: note: Loop condition is false. Execution continues on line 173 for (offset = 0; ^ drivers/mtd/ftl.c:173:9: note: Assuming 'offset' is not equal to 'max_offset' if (offset == max_offset) { ^~~~~~~~~~~~~~~~~~~~ drivers/mtd/ftl.c:173:5: note: Taking false branch if (offset == max_offset) { ^ drivers/mtd/ftl.c:177:26: note: The left operand of '!=' is a garbage value if (header.BlockSize != 9 || ~~~~~~~~~~~~~~~~ ^ drivers/mtd/ftl.c:270:5: 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(part->VirtualBlockMap, 0xff, blocks * sizeof(uint32_t)); ^~~~~~ drivers/mtd/ftl.c:270:5: 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(part->VirtualBlockMap, 0xff, blocks * sizeof(uint32_t)); ^~~~~~ drivers/mtd/ftl.c:482:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = 0; ^ ~ drivers/mtd/ftl.c:482:5: note: Value stored to 'ret' is never read ret = 0; ^ ~ drivers/mtd/ftl.c:771:6: 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(buffer, 0, SECTOR_SIZE); ^~~~~~ drivers/mtd/ftl.c:771:6: 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(buffer, 0, SECTOR_SIZE); ^~~~~~ Suppressed 31 warnings (31 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. 53 warnings generated. drivers/mtd/nftlcore.c:245: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(BlockMap, 0xff, sizeof(BlockMap)); ^~~~~~ drivers/mtd/nftlcore.c:245: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(BlockMap, 0xff, sizeof(BlockMap)); ^~~~~~ drivers/mtd/nftlcore.c:246: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(BlockFreeFound, 0, sizeof(BlockFreeFound)); ^~~~~~ drivers/mtd/nftlcore.c:246: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(BlockFreeFound, 0, sizeof(BlockFreeFound)); ^~~~~~ drivers/mtd/nftlcore.c:334:30: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (BlockLastState[block] != SECTOR_FREE && -- ^ ~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_log.c:1605: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(head, 0, sizeof(xlog_rec_header_t)); ^~~~~~ fs/xfs/xfs_log.c:1605: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(head, 0, sizeof(xlog_rec_header_t)); ^~~~~~ fs/xfs/xfs_log.c:1612:3: 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(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); ^~~~~~ fs/xfs/xfs_log.c:1612:3: 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(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); ^~~~~~ fs/xfs/xfs_log.c:2578:5: 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(ptr, reg->i_addr + copy_off, copy_len); ^~~~~~ fs/xfs/xfs_log.c:2578:5: 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(ptr, reg->i_addr + copy_off, copy_len); ^~~~~~ fs/xfs/xfs_log.c:2666: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(iclog->ic_header.h_cycle_data, 0, ^~~~~~ fs/xfs/xfs_log.c:2666: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(iclog->ic_header.h_cycle_data, 0, ^~~~~~ Suppressed 51 warnings (51 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. 53 warnings generated. fs/xfs/xfs_log_cil.c:249:4: 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(lv, 0, xlog_cil_iovec_space(niovecs)); ^~~~~~ fs/xfs/xfs_log_cil.c:249:4: 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(lv, 0, xlog_cil_iovec_space(niovecs)); ^~~~~~ fs/xfs/xfs_log_cil.c:998:16: warning: Access to field 'lv_next' results in a dereference of a null pointer (loaded from variable 'lv') [clang-analyzer-core.NullDereference] lv->lv_next = item->li_lv; ~~ ^ fs/xfs/xfs_log_cil.c:904:9: note: Assuming 'push_seq' is <= field 'sequence' ASSERT(push_seq <= ctx->sequence); ^ fs/xfs/xfs_linux.h:215:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^~~~ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/xfs_log_cil.c:904:2: note: '?' condition is true ASSERT(push_seq <= ctx->sequence); ^ fs/xfs/xfs_linux.h:215:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/xfs_log_cil.c:916:6: note: Assuming the condition is false if (waitqueue_active(&cil->xc_push_wait)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_log_cil.c:916:2: note: Taking false branch if (waitqueue_active(&cil->xc_push_wait)) ^ fs/xfs/xfs_log_cil.c:924:6: note: Assuming the condition is false if (list_empty(&cil->xc_cil)) { ^~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_log_cil.c:924:2: note: Taking false branch if (list_empty(&cil->xc_cil)) { ^ fs/xfs/xfs_log_cil.c:932:6: note: Assuming 'push_seq' is >= field 'sequence' if (push_seq < ctx->sequence) { ^~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_log_cil.c:932:2: note: Taking false branch if (push_seq < ctx->sequence) { ^ fs/xfs/xfs_log_cil.c:961:2: note: Calling 'list_add' list_add(&ctx->committing, &cil->xc_committing); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:88:2: note: Value assigned to field 'lv_chain', which participates in a condition later __list_add(new, head, head->next); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_log_cil.c:961:2: note: Returning from 'list_add' list_add(&ctx->committing, &cil->xc_committing); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_log_cil.c:987:2: note: Null pointer value stored to 'lv' lv = NULL; ^~~~~~~~~ fs/xfs/xfs_log_cil.c:989:2: note: Loop condition is true. Entering loop body while (!list_empty(&cil->xc_cil)) { ^ fs/xfs/xfs_log_cil.c:995:7: note: Assuming field 'lv_chain' is non-null if (!ctx->lv_chain) ^~~~~~~~~~~~~~ fs/xfs/xfs_log_cil.c:995:3: note: Taking false branch if (!ctx->lv_chain) ^ fs/xfs/xfs_log_cil.c:998:16: note: Access to field 'lv_next' results in a dereference of a null pointer (loaded from variable 'lv') lv->lv_next = item->li_lv; ~~ ^ Suppressed 51 warnings (51 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. 42 warnings generated. >> drivers/mtd/spi-nor/sfdp.c:225: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(buf, dma_safe_buf, len); ^~~~~~ drivers/mtd/spi-nor/sfdp.c:225: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(buf, dma_safe_buf, len); ^~~~~~ >> drivers/mtd/spi-nor/sfdp.c:453: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(&bfpt, 0, sizeof(bfpt)); ^~~~~~ drivers/mtd/spi-nor/sfdp.c:453: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(&bfpt, 0, sizeof(bfpt)); ^~~~~~ drivers/mtd/spi-nor/sfdp.c:517: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(¶ms->erase_map, 0, sizeof(params->erase_map)); ^~~~~~ drivers/mtd/spi-nor/sfdp.c:517: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(¶ms->erase_map, 0, sizeof(params->erase_map)); ^~~~~~ drivers/mtd/spi-nor/sfdp.c:930:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] return ret; ^ drivers/mtd/spi-nor/sfdp.c:1275:6: note: 'err' is >= 0 if (err < 0) ^~~ drivers/mtd/spi-nor/sfdp.c:1275:2: note: Taking false branch if (err < 0) ^ drivers/mtd/spi-nor/sfdp.c:1279:6: note: Assuming field 'signature' is equal to SFDP_SIGNATURE if (le32_to_cpu(header.signature) != SFDP_SIGNATURE || ^ include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu' #define le32_to_cpu __le32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ drivers/mtd/spi-nor/sfdp.c:1279:6: note: Left side of '||' is false if (le32_to_cpu(header.signature) != SFDP_SIGNATURE || ^ include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu' #define le32_to_cpu __le32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ drivers/mtd/spi-nor/sfdp.c:1280:6: note: Assuming field 'major' is equal to SFDP_JESD216_MAJOR header.major != SFDP_JESD216_MAJOR) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/sfdp.c:1279:2: note: Taking false branch if (le32_to_cpu(header.signature) != SFDP_SIGNATURE || ^ drivers/mtd/spi-nor/sfdp.c:1288:6: note: Assuming the condition is false if (SFDP_PARAM_HEADER_ID(bfpt_header) != SFDP_BFPT_ID || ^ drivers/mtd/spi-nor/sfdp.c:14:33: note: expanded from macro 'SFDP_PARAM_HEADER_ID' #define SFDP_PARAM_HEADER_ID(p) (((p)->id_msb << 8) | (p)->id_lsb) ^ drivers/mtd/spi-nor/sfdp.c:1288:6: note: Left side of '||' is false if (SFDP_PARAM_HEADER_ID(bfpt_header) != SFDP_BFPT_ID || ^ drivers/mtd/spi-nor/sfdp.c:14:33: note: expanded from macro 'SFDP_PARAM_HEADER_ID' #define SFDP_PARAM_HEADER_ID(p) (((p)->id_msb << 8) | (p)->id_lsb) ^ drivers/mtd/spi-nor/sfdp.c:1289:6: note: Assuming field 'major' is equal to SFDP_JESD216_MAJOR bfpt_header->major != SFDP_JESD216_MAJOR) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/spi-nor/sfdp.c:1288:2: note: Taking false branch if (SFDP_PARAM_HEADER_ID(bfpt_header) != SFDP_BFPT_ID || ^ drivers/mtd/spi-nor/sfdp.c:1306:6: note: Assuming field 'nph' is not equal to 0 if (header.nph) { ^~~~~~~~~~ drivers/mtd/spi-nor/sfdp.c:1306:2: note: Taking true branch if (header.nph) { ^ drivers/mtd/spi-nor/sfdp.c:1310:7: note: Assuming 'param_headers' is non-null if (!param_headers) ^~~~~~~~~~~~~~ drivers/mtd/spi-nor/sfdp.c:1310:3: note: Taking false branch if (!param_headers) ^ drivers/mtd/spi-nor/sfdp.c:1315:7: note: 'err' is >= 0 if (err < 0) { ^~~ drivers/mtd/spi-nor/sfdp.c:1315:3: note: Taking false branch if (err < 0) { ^ drivers/mtd/spi-nor/sfdp.c:1325:14: note: 'i' is < field 'nph' for (i = 0; i < header.nph; i++) { ^ drivers/mtd/spi-nor/sfdp.c:1325:2: note: Loop condition is true. Entering loop body for (i = 0; i < header.nph; i++) { ^ drivers/mtd/spi-nor/sfdp.c:1327:15: note: Assuming '__UNIQUE_ID___x272' is <= '__UNIQUE_ID___y273' sfdp_size = max_t(size_t, sfdp_size, ^ include/linux/minmax.h:112:27: note: expanded from macro 'max_t' #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) -- ^~~ drivers/mtd/spi-nor/sfdp.c:910:2: note: Taking false branch if (ret) ^ drivers/mtd/spi-nor/sfdp.c:917:2: note: Taking true branch if (IS_ERR(sector_map)) { ^ drivers/mtd/spi-nor/sfdp.c:919:3: note: Control jumps to line 929 goto out; ^ drivers/mtd/spi-nor/sfdp.c:929:2: note: Memory is released kfree(smpt); ^~~~~~~~~~~ drivers/mtd/spi-nor/sfdp.c:930:2: note: Use of memory after it is freed return ret; ^ ~~~ Suppressed 38 warnings (38 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. 48 warnings generated. drivers/hwmon/lm90.c:996:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", !!(client->flags & I2C_CLIENT_PEC)); ^~~~~~~ drivers/hwmon/lm90.c:996:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", !!(client->flags & I2C_CLIENT_PEC)); ^~~~~~~ drivers/hwmon/lm90.c:1075:41: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] data->temp11[index] = temp_to_s8(val) << 8; ^ drivers/hwmon/lm90.c:1442:2: note: Control jumps to 'case hwmon_temp:' at line 1445 switch (type) { ^ drivers/hwmon/lm90.c:1446:10: note: Calling 'lm90_temp_write' return lm90_temp_write(dev, attr, channel, val); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1290:6: note: 'err' is 0 if (err) ^~~ drivers/hwmon/lm90.c:1290:2: note: Taking false branch if (err) ^ drivers/hwmon/lm90.c:1293:2: note: Control jumps to 'case hwmon_temp_offset:' @line 1323 switch (attr) { ^ drivers/hwmon/lm90.c:1324:9: note: Calling 'lm90_set_temp11' err = lm90_set_temp11(data, REMOTE_OFFSET, val); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1062:6: note: Assuming field 'kind' is not equal to lm99 if (data->kind == lm99 && index <= 2) { ^~~~~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1062:25: note: Left side of '&&' is false if (data->kind == lm99 && index <= 2) { ^ drivers/hwmon/lm90.c:1068:6: note: Assuming the condition is false if (data->flags & LM90_HAVE_EXTENDED_TEMP) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1068:2: note: Taking false branch if (data->flags & LM90_HAVE_EXTENDED_TEMP) ^ drivers/hwmon/lm90.c:1070:11: note: Assuming field 'kind' is not equal to max6646 else if (data->kind == max6646) ^~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1070:7: note: Taking false branch else if (data->kind == max6646) ^ drivers/hwmon/lm90.c:1072:11: note: Assuming the condition is false else if (data->flags & LM90_HAVE_REM_LIMIT_EXT) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1072:7: note: Taking false branch else if (data->flags & LM90_HAVE_REM_LIMIT_EXT) ^ drivers/hwmon/lm90.c:1075:25: note: Calling 'temp_to_s8' data->temp11[index] = temp_to_s8(val) << 8; ^~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:898:6: note: Assuming the condition is true if (val <= -128000) ^~~~~~~~~~~~~~ drivers/hwmon/lm90.c:898:2: note: Taking true branch if (val <= -128000) ^ drivers/hwmon/lm90.c:899:3: note: Returning the value -128 return -128; ^~~~~~~~~~~ drivers/hwmon/lm90.c:1075:25: note: Returning from 'temp_to_s8' data->temp11[index] = temp_to_s8(val) << 8; ^~~~~~~~~~~~~~~ drivers/hwmon/lm90.c:1075:41: note: The result of the left shift is undefined because the left operand is negative data->temp11[index] = temp_to_s8(val) << 8; ~~~~~~~~~~~~~~~ ^ Suppressed 46 warnings (46 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. 48 warnings generated. fs/io-wq.c:627:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, sizeof(buf), "iou-wrk-%d", wq->task->pid); ^~~~~~~~ fs/io-wq.c:627:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, sizeof(buf), "iou-wrk-%d", wq->task->pid); ^~~~~~~~ Suppressed 47 warnings (47 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. 48 warnings generated. >> drivers/input/misc/pcf8574_keypad.c:121:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(lp->name, DRV_NAME); ^~~~~~~ drivers/input/misc/pcf8574_keypad.c:121:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(lp->name, DRV_NAME); ^~~~~~~ drivers/input/misc/pcf8574_keypad.c:122:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(lp->phys, "kp_data/input0"); ^~~~~~~ drivers/input/misc/pcf8574_keypad.c:122:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(lp->phys, "kp_data/input0"); ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 48 warnings generated. drivers/input/input.c:721: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(dev->key, 0, sizeof(dev->key)); ^~~~~~ drivers/input/input.c:721: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(dev->key, 0, sizeof(dev->key)); ^~~~~~ drivers/input/input.c:834: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(ke->scancode, &index, sizeof(index)); ^~~~~~ drivers/input/input.c:834: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(ke->scancode, &index, sizeof(index)); ^~~~~~ drivers/input/input.c:1073:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, buf_size, "%lx", bits) : 0; ^~~~~~~~ drivers/input/input.c:1073:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, buf_size, "%lx", bits) : 0; ^~~~~~~~ drivers/input/input.c:1354:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf, max(size, 0), "%c", name); ^~~~~~~~ drivers/input/input.c:1354:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf, max(size, 0), "%c", name); ^~~~~~~~ drivers/input/input.c:1357:11: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, max(size - len, 0), "%X,", i); ^~~~~~~~ drivers/input/input.c:1357:11: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, max(size - len, 0), "%X,", i); ^~~~~~~~ drivers/input/input.c:1366:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, max(size, 0), ^~~~~~~~ drivers/input/input.c:1366:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, max(size, 0), ^~~~~~~~ drivers/input/input.c:1391:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, max(size - len, 0), "\n"); ^~~~~~~~ drivers/input/input.c:1391:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, max(size - len, 0), "\n"); ^~~~~~~~ drivers/input/input.c:1514:12: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, max(buf_size - len, 0), " "); ^~~~~~~~ drivers/input/input.c:1514:12: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, max(buf_size - len, 0), " "); ^~~~~~~~ drivers/input/input.c:1522:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, buf_size, "%d", 0); ^~~~~~~~ drivers/input/input.c:1522:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, buf_size, "%d", 0); ^~~~~~~~ drivers/input/input.c:1525:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len += snprintf(buf + len, max(buf_size - len, 0), "\n"); ^~~~~~~~ drivers/input/input.c:1525:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len += snprintf(buf + len, max(buf_size - len, 0), "\n"); ^~~~~~~~ drivers/input/input.c:2170: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] INPUT_CLEANSE_BITMASK(dev, KEY, key); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2170: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 INPUT_CLEANSE_BITMASK(dev, KEY, key); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ -- ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2175: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] INPUT_CLEANSE_BITMASK(dev, SND, snd); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2175: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 INPUT_CLEANSE_BITMASK(dev, SND, snd); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2176: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] INPUT_CLEANSE_BITMASK(dev, FF, ff); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2176: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 INPUT_CLEANSE_BITMASK(dev, FF, ff); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2177: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] INPUT_CLEANSE_BITMASK(dev, SW, sw); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ drivers/input/input.c:2177: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 INPUT_CLEANSE_BITMASK(dev, SW, sw); ^ drivers/input/input.c:2164:4: note: expanded from macro 'INPUT_CLEANSE_BITMASK' memset(dev->bits##bit, 0, \ ^~~~~~ Suppressed 30 warnings (30 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. 52 warnings generated. drivers/md/dm-rq.c:163:2: warning: Access to field 'type' results in a dereference of a null pointer (loaded from field 'ti') [clang-analyzer-core.NullDereference] tio->ti->type->release_clone_rq(clone, NULL); ^ drivers/md/dm-rq.c:259:6: note: Assuming 'clone' is non-null if (!clone) { ^~~~~~ drivers/md/dm-rq.c:259:2: note: Taking false branch if (!clone) { ^ drivers/md/dm-rq.c:268:6: note: Assuming the condition is false if (rq->rq_flags & RQF_FAILED) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-rq.c:268:2: note: Taking false branch if (rq->rq_flags & RQF_FAILED) ^ drivers/md/dm-rq.c:271:2: note: Calling 'dm_done' dm_done(clone, tio->error, mapped); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-rq.c:209:6: note: Assuming field 'ti' is null if (tio->ti) { ^~~~~~~ drivers/md/dm-rq.c:209:2: note: Taking false branch if (tio->ti) { ^ drivers/md/dm-rq.c:216:15: note: Assuming 'error' is not equal to 5 if (unlikely(error == BLK_STS_TARGET)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/md/dm-rq.c:216:2: note: Taking false branch if (unlikely(error == BLK_STS_TARGET)) { ^ drivers/md/dm-rq.c:228:2: note: Control jumps to 'case 0:' at line 229 switch (r) { ^ drivers/md/dm-rq.c:231:3: note: Calling 'dm_end_request' dm_end_request(clone, error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-rq.c:163:2: note: Access to field 'type' results in a dereference of a null pointer (loaded from field 'ti') tio->ti->type->release_clone_rq(clone, NULL); ^ ~~ drivers/md/dm-rq.c:368: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(&tio->info, 0, sizeof(tio->info)); ^~~~~~ drivers/md/dm-rq.c:368: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(&tio->info, 0, sizeof(tio->info)); ^~~~~~ drivers/md/dm-rq.c:432:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", 0); ^~~~~~~ drivers/md/dm-rq.c:432:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", 0); ^~~~~~~ Suppressed 49 warnings (49 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. 31 warnings generated. >> drivers/mtd/tests/nandbiterrs.c:138: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(&oldstats, &mtd->ecc_stats, sizeof(oldstats)); ^~~~~~ drivers/mtd/tests/nandbiterrs.c:138: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(&oldstats, &mtd->ecc_stats, sizeof(oldstats)); ^~~~~~ >> drivers/mtd/tests/nandbiterrs.c:267: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(bitstats, 0, sizeof(bitstats)); ^~~~~~ drivers/mtd/tests/nandbiterrs.c:267: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(bitstats, 0, sizeof(bitstats)); ^~~~~~ Suppressed 29 warnings (29 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 54 warnings generated. drivers/mtd/mtdcore.c:660:3: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores] error = 0; ^ ~ drivers/mtd/mtdcore.c:660:3: note: Value stored to 'error' is never read error = 0; ^ ~ drivers/mtd/mtdcore.c:751: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(&mtd->dev, 0, sizeof(mtd->dev)); ^~~~~~ drivers/mtd/mtdcore.c:751: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(&mtd->dev, 0, sizeof(mtd->dev)); ^~~~~~ drivers/mtd/mtdcore.c:1026: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(&master->reboot_notifier, 0, sizeof(master->reboot_notifier)); ^~~~~~ drivers/mtd/mtdcore.c:1026: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(&master->reboot_notifier, 0, sizeof(master->reboot_notifier)); ^~~~~~ drivers/mtd/mtdcore.c:1648: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(oobecc, 0, sizeof(*oobecc)); ^~~~~~ drivers/mtd/mtdcore.c:1648: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(oobecc, 0, sizeof(*oobecc)); ^~~~~~ drivers/mtd/mtdcore.c:1682: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(oobfree, 0, sizeof(*oobfree)); ^~~~~~ drivers/mtd/mtdcore.c:1682: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(oobfree, 0, sizeof(*oobfree)); ^~~~~~ drivers/mtd/mtdcore.c:1719: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(oobregion, 0, sizeof(*oobregion)); ^~~~~~ drivers/mtd/mtdcore.c:1719: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(oobregion, 0, sizeof(*oobregion)); ^~~~~~ drivers/mtd/mtdcore.c:1796:3: 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(buf, oobbuf + oobregion.offset, cnt); ^~~~~~ drivers/mtd/mtdcore.c:1796:3: 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(buf, oobbuf + oobregion.offset, cnt); ^~~~~~ drivers/mtd/mtdcore.c:1839:3: 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(oobbuf + oobregion.offset, buf, cnt); ^~~~~~ drivers/mtd/mtdcore.c:1839:3: 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(oobbuf + oobregion.offset, buf, cnt); ^~~~~~ Suppressed 46 warnings (46 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. 52 warnings generated. drivers/target/target_core_alua.c:888:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(md_buf, ALUA_MD_BUF_LEN, ^~~~~~~~ drivers/target/target_core_alua.c:888:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(md_buf, ALUA_MD_BUF_LEN, ^~~~~~~~ drivers/target/target_core_alua.c:998:2: warning: Value stored to 'prev_state' is never read [clang-analyzer-deadcode.DeadStores] prev_state = tg_pt_gp->tg_pt_gp_alua_access_state; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_alua.c:998:2: note: Value stored to 'prev_state' is never read prev_state = tg_pt_gp->tg_pt_gp_alua_access_state; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_alua.c:1183:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(md_buf, ALUA_MD_BUF_LEN, "alua_tg_pt_offline=%d\n" ^~~~~~~~ drivers/target/target_core_alua.c:1183:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(md_buf, ALUA_MD_BUF_LEN, "alua_tg_pt_offline=%d\n" ^~~~~~~~ drivers/target/target_core_alua.c:1794:26: warning: Access to field 'tg_pt_gp_dev' results in a dereference of a null pointer (loaded from variable 'tg_pt_gp') [clang-analyzer-core.NullDereference] struct se_device *dev = tg_pt_gp->tg_pt_gp_dev; ^ drivers/target/target_core_alua.c:1904:26: note: Left side of '||' is false struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev); ^ include/linux/rcupdate.h:408:32: note: expanded from macro 'rcu_dereference_raw' #define rcu_dereference_raw(p) __rcu_dereference_raw(p, __UNIQUE_ID(rcu)) ^ include/linux/rcupdate.h:405:20: note: expanded from macro '__rcu_dereference_raw' typeof(p) local = READ_ONCE(p); \ ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word' (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ ^ drivers/target/target_core_alua.c:1904:26: note: Left side of '||' is false struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev); -- include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:326:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ drivers/target/target_core_alua.c:1809:2: note: Loop condition is false. Exiting loop rcu_assign_pointer(lun->lun_tg_pt_gp, tg_pt_gp); ^ include/linux/rcupdate.h:455:3: note: expanded from macro 'rcu_assign_pointer' smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ ^ include/asm-generic/barrier.h:164:55: note: expanded from macro 'smp_store_release' #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0) ^ arch/riscv/include/asm/barrier.h:34:2: note: expanded from macro '__smp_store_release' WRITE_ONCE(*p, v); \ ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert' do { \ ^ drivers/target/target_core_alua.c:1809:2: note: Loop condition is false. Exiting loop rcu_assign_pointer(lun->lun_tg_pt_gp, tg_pt_gp); ^ include/linux/rcupdate.h:455:3: note: expanded from macro 'rcu_assign_pointer' smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ ^ include/asm-generic/barrier.h:164:55: note: expanded from macro 'smp_store_release' #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0) ^ arch/riscv/include/asm/barrier.h:34:2: note: expanded from macro '__smp_store_release' WRITE_ONCE(*p, v); \ ^ include/asm-generic/rwonce.h:61:2: note: expanded from macro 'WRITE_ONCE' __WRITE_ONCE(x, val); \ ^ include/asm-generic/rwonce.h:53:35: note: expanded from macro '__WRITE_ONCE' #define __WRITE_ONCE(x, val) \ ^ drivers/target/target_core_alua.c:1809:2: note: Loop condition is false. Exiting loop rcu_assign_pointer(lun->lun_tg_pt_gp, tg_pt_gp); ^ include/linux/rcupdate.h:455:3: note: expanded from macro 'rcu_assign_pointer' smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ ^ include/asm-generic/barrier.h:164:55: note: expanded from macro 'smp_store_release' #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0) ^ arch/riscv/include/asm/barrier.h:34:2: note: expanded from macro '__smp_store_release' WRITE_ONCE(*p, v); \ ^ include/asm-generic/rwonce.h:58:33: note: expanded from macro 'WRITE_ONCE' #define WRITE_ONCE(x, val) \ ^ drivers/target/target_core_alua.c:1809:2: note: Loop condition is false. Exiting loop rcu_assign_pointer(lun->lun_tg_pt_gp, tg_pt_gp); ^ include/linux/rcupdate.h:455:3: note: expanded from macro 'rcu_assign_pointer' smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ ^ include/asm-generic/barrier.h:164:55: note: expanded from macro 'smp_store_release' #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0) ^ arch/riscv/include/asm/barrier.h:30:39: note: expanded from macro '__smp_store_release' #define __smp_store_release(p, v) \ ^ drivers/target/target_core_alua.c:1809:2: note: Loop condition is false. Exiting loop rcu_assign_pointer(lun->lun_tg_pt_gp, tg_pt_gp); ^ include/linux/rcupdate.h:455:3: note: expanded from macro 'rcu_assign_pointer' smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ ^ include/asm-generic/barrier.h:164:33: note: expanded from macro 'smp_store_release' #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0) ^ drivers/target/target_core_alua.c:1809:2: note: Loop condition is false. Exiting loop rcu_assign_pointer(lun->lun_tg_pt_gp, tg_pt_gp); ^ include/linux/rcupdate.h:447:44: note: expanded from macro 'rcu_assign_pointer' #define rcu_assign_pointer(p, v) \ ^ drivers/target/target_core_alua.c:1810:41: note: Passing null pointer value via 2nd parameter 'head' list_add_tail(&lun->lun_tg_pt_gp_link, &tg_pt_gp->tg_pt_gp_lun_list); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_alua.c:1810:2: note: Calling 'list_add_tail' list_add_tail(&lun->lun_tg_pt_gp_link, &tg_pt_gp->tg_pt_gp_lun_list); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:102:18: note: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'head') __list_add(new, head->prev, head); ^~~~ Suppressed 31 warnings (31 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. 35 warnings generated. >> drivers/counter/microchip-tcb-capture.c:337:3: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(clk_name, sizeof(clk_name), "t%d_clk", channel); ^~~~~~~~ drivers/counter/microchip-tcb-capture.c:337:3: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(clk_name, sizeof(clk_name), "t%d_clk", channel); ^~~~~~~~ Suppressed 34 warnings (34 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. 72 warnings generated. drivers/most/core.c:175:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(buf, ""); ^~~~~~ drivers/most/core.c:175:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(buf, ""); ^~~~~~ drivers/most/core.c:177:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "rx "); ^~~~~~ drivers/most/core.c:177:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "rx "); ^~~~~~ drivers/most/core.c:179:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "tx "); ^~~~~~ drivers/most/core.c:179:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "tx "); ^~~~~~ drivers/most/core.c:180:2: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "\n"); ^~~~~~ drivers/most/core.c:180:2: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "\n"); ^~~~~~ drivers/most/core.c:191:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcpy(buf, ""); ^~~~~~ drivers/most/core.c:191:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy(buf, ""); ^~~~~~ drivers/most/core.c:193:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "control "); ^~~~~~ drivers/most/core.c:193:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "control "); ^~~~~~ drivers/most/core.c:195:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "async "); ^~~~~~ drivers/most/core.c:195:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "async "); ^~~~~~ drivers/most/core.c:197:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "sync "); ^~~~~~ drivers/most/core.c:197:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "sync "); ^~~~~~ drivers/most/core.c:199:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "isoc "); ^~~~~~ drivers/most/core.c:199:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "isoc "); ^~~~~~ drivers/most/core.c:200:2: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] strcat(buf, "\n"); ^~~~~~ drivers/most/core.c:200:2: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 strcat(buf, "\n"); ^~~~~~ drivers/most/core.c:211:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:211:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:222:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:222:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:233:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:233:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:244:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:244:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%d\n", ^~~~~~~~ drivers/most/core.c:254:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%d\n", c->is_starving); ^~~~~~~~ drivers/most/core.c:254:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "%d\n", c->is_starving); ^~~~~~~~ drivers/most/core.c:263:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "%d\n", c->cfg.num_buffers); -- ^~~~~~~~ drivers/most/core.c:413:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "i2s\n"); ^~~~~~~~ drivers/most/core.c:415:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "tsi\n"); ^~~~~~~~ drivers/most/core.c:415:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "tsi\n"); ^~~~~~~~ drivers/most/core.c:417:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "hbi\n"); ^~~~~~~~ drivers/most/core.c:417:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "hbi\n"); ^~~~~~~~ drivers/most/core.c:419:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "mlb_dim\n"); ^~~~~~~~ drivers/most/core.c:419:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "mlb_dim\n"); ^~~~~~~~ drivers/most/core.c:421:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "mlb_dim2\n"); ^~~~~~~~ drivers/most/core.c:421:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "mlb_dim2\n"); ^~~~~~~~ drivers/most/core.c:423:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "usb\n"); ^~~~~~~~ drivers/most/core.c:423:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "usb\n"); ^~~~~~~~ drivers/most/core.c:425:10: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "pcie\n"); ^~~~~~~~ drivers/most/core.c:425:10: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "pcie\n"); ^~~~~~~~ drivers/most/core.c:427:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return snprintf(buf, PAGE_SIZE, "unknown\n"); ^~~~~~~~ drivers/most/core.c:427:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 return snprintf(buf, PAGE_SIZE, "unknown\n"); ^~~~~~~~ drivers/most/core.c:1322:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(c->name, STRING_SIZE, "ch%d", i); ^~~~~~~~ drivers/most/core.c:1322:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(c->name, STRING_SIZE, "ch%d", i); ^~~~~~~~ drivers/most/core.c:1324:4: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(c->name, STRING_SIZE, "%s", name_suffix); ^~~~~~~~ drivers/most/core.c:1324:4: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(c->name, STRING_SIZE, "%s", name_suffix); ^~~~~~~~ Suppressed 34 warnings (34 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. 55 warnings generated. drivers/md/dm-table.c:117: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(n_highs, -1, sizeof(*n_highs) * num); ^~~~~~ drivers/md/dm-table.c:117: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(n_highs, -1, sizeof(*n_highs) * num); ^~~~~~ drivers/md/dm-table.c:359:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) { ^~~~~~ drivers/md/dm-table.c:359:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) { ^~~~~~ drivers/md/dm-table.c:491:3: 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(argv, old_argv, *size * sizeof(*argv)); ^~~~~~ drivers/md/dm-table.c:491:3: 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(argv, old_argv, *size * sizeof(*argv)); ^~~~~~ drivers/md/dm-table.c:652: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(tgt, 0, sizeof(*tgt)); ^~~~~~ drivers/md/dm-table.c:652: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(tgt, 0, sizeof(*tgt)); ^~~~~~ drivers/md/dm-table.c:743:7: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] (sscanf(arg_str, "%u%c", value, &dummy) != 1) || ^~~~~~ drivers/md/dm-table.c:743:7: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 (sscanf(arg_str, "%u%c", value, &dummy) != 1) || ^~~~~~ drivers/md/dm-table.c:1298: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(profile->modes_supported, 0xFF, ^~~~~~ drivers/md/dm-table.c:1298: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(profile->modes_supported, 0xFF, ^~~~~~ Suppressed 49 warnings (49 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. 70 warnings generated. >> drivers/input/mouse/cyapa_gen5.c:497:5: 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(buf, pip->empty_buf, length); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:497:5: 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(buf, pip->empty_buf, length); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:517:4: 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(buf, pip->empty_buf, length); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:517:4: 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(buf, pip->empty_buf, length); ^~~~~~ >> drivers/input/mouse/cyapa_gen5.c:783: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(resp_data, 0, sizeof(resp_data)); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:783: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(resp_data, 0, sizeof(resp_data)); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1066: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1066: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1083: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(cmd_data->key, cyapa_pip_bl_cmd_key, CYAPA_TSG_BL_KEY_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1083: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(cmd_data->key, cyapa_pip_bl_cmd_key, CYAPA_TSG_BL_KEY_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1089: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(cmd_data->metadata_raw_parameter, data, ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1089: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(cmd_data->metadata_raw_parameter, data, ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1191: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(resp_data, 0, resp_len); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1191: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(resp_data, 0, resp_len); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1338: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1338: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1360: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(flash_row_head->flash_data, record_data, record_len); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1360: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(flash_row_head->flash_data, record_data, record_len); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1442: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1442: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1500: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1500: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(cmd, 0, CYAPA_TSG_MAX_CMD_SIZE); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1553: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(cmd, 0, sizeof(cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1553: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(cmd, 0, sizeof(cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1801: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(cmd, 0, sizeof(cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1801: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(cmd, 0, sizeof(cmd)); ^~~~~~ drivers/input/mouse/cyapa_gen5.c:1856:16: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult] value |= -1 << num_bits; ^ drivers/input/mouse/cyapa_gen5.c:2318:6: note: Assuming the condition is false if (!cyapa_is_pip_app_mode(cyapa)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/mouse/cyapa_gen5.c:2318:2: note: Taking false branch if (!cyapa_is_pip_app_mode(cyapa)) ^ drivers/input/mouse/cyapa_gen5.c:2323:6: note: 'error' is 0 if (error) ^~~~~ drivers/input/mouse/cyapa_gen5.c:2323:2: note: Taking false branch if (error) ^ drivers/input/mouse/cyapa_gen5.c:2328:10: note: Calling 'cyapa_gen5_read_mutual_idac_data' error = cyapa_gen5_read_mutual_idac_data(cyapa, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/mouse/cyapa_gen5.c:2133:10: note: Calling 'cyapa_gen5_read_idac_data' error = cyapa_gen5_read_idac_data(cyapa, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/mouse/cyapa_gen5.c:1952:6: note: 'cmd_code' is equal to PIP_RETRIEVE_DATA_STRUCTURE if (cmd_code != PIP_RETRIEVE_DATA_STRUCTURE || ^~~~~~~~ drivers/input/mouse/cyapa_gen5.c:1952:6: note: Left side of '||' is false drivers/input/mouse/cyapa_gen5.c:1953:4: note: 'idac_data_type' is equal to GEN5_RETRIEVE_MUTUAL_PWC_DATA (idac_data_type != GEN5_RETRIEVE_MUTUAL_PWC_DATA && ^~~~~~~~~~~~~~ drivers/input/mouse/cyapa_gen5.c:1953:52: note: Left side of '&&' is false (idac_data_type != GEN5_RETRIEVE_MUTUAL_PWC_DATA && ^ drivers/input/mouse/cyapa_gen5.c:1955:4: note: 'data_size' is non-null !data_size || !idac_max || !idac_min || !idac_ave) ^~~~~~~~~ drivers/input/mouse/cyapa_gen5.c:1952:6: note: Left side of '||' is false -- ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:693:4: 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(buffer+buflen, elem_base, ECCBUF_SIZE-buflen); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:693:4: 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(buffer+buflen, elem_base, ECCBUF_SIZE-buflen); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:713:4: 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(buffer, 0xff, ECCBUF_SIZE); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:713:4: 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(buffer, 0xff, ECCBUF_SIZE); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:714:4: 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(buffer, elem_base + thislen, buflen); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:714:4: 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(buffer, elem_base + thislen, buflen); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:714:29: warning: The right operand of '+' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] memcpy(buffer, elem_base + thislen, buflen); ^ ~~~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:667:22: note: 'thislen' declared without an initial value size_t totlen = 0, thislen; ^~~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:672:6: note: Assuming field 'writesize' is not equal to 0 if (!ECCBUF_SIZE) { ^~~~~~~~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:672:2: note: Taking false branch if (!ECCBUF_SIZE) { ^ drivers/mtd/chips/cfi_cmdset_0020.c:678:11: note: Calling 'kmalloc' buffer = kmalloc(ECCBUF_SIZE, GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/slab.h:569:2: note: Taking false branch if (__builtin_constant_p(size)) { ^ include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later return __kmalloc(size, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:678:11: note: Returning from 'kmalloc' buffer = kmalloc(ECCBUF_SIZE, GFP_KERNEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:679:6: note: Assuming 'buffer' is non-null if (!buffer) ^~~~~~~ drivers/mtd/chips/cfi_cmdset_0020.c:679:2: note: Taking false branch if (!buffer) ^ drivers/mtd/chips/cfi_cmdset_0020.c:682:12: note: Assuming 'i' is < 'count' for (i=0; i> drivers/mtd/nand/raw/arasan-nand-controller.c:458: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(anand->hw_ecc, 0, chip->ecc.bytes); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:458: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(anand->hw_ecc, 0, chip->ecc.bytes); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:489:4: 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(raw_buf, 0xFF, chip->ecc.size); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:489:4: 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(raw_buf, 0xFF, chip->ecc.size); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:594: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(nfc_op, 0, sizeof(*nfc_op)); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:594: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(nfc_op, 0, sizeof(*nfc_op)); ^~~~~~ >> drivers/mtd/nand/raw/arasan-nand-controller.c:701:4: 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(&buf[offset], &remainder, last_len); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:701:4: 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(&buf[offset], &remainder, last_len); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:703:4: 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(&remainder, &buf[offset], last_len); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:703:4: 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(&remainder, &buf[offset], last_len); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:816: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(subop->instrs[1].ctx.data.buf.in, &tmp, 1); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:816: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(subop->instrs[1].ctx.data.buf.in, &tmp, 1); ^~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1379:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn] return ret; ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1438:6: note: Assuming 'nfc' is non-null if (!nfc) ^~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1438:2: note: Taking false branch if (!nfc) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1447:2: note: Taking false branch if (IS_ERR(nfc->base)) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1453:2: note: Taking false branch if (IS_ERR(nfc->controller_clk)) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1457:2: note: Taking false branch if (IS_ERR(nfc->bus_clk)) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1461:6: note: 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1461:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1465:6: note: 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1465:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1468:33: note: 64 is equal to 64 ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); ^ include/linux/dma-mapping.h:76:27: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1468:33: note: '?' condition is true ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); ^ include/linux/dma-mapping.h:76:26: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1469:6: note: Assuming 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1469:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1473:6: note: 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1473:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1476:8: note: Calling 'anfc_chips_init' ret = anfc_chips_init(nfc); ^~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1362:2: note: 'ret' declared without an initial value int ret; ^~~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1364:6: note: Assuming 'nchips' is not equal to 0 if (!nchips) { ^~~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1364:2: note: Taking false branch if (!nchips) { ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1370:29: note: Assuming 'nand_np' is equal to null for_each_child_of_node(np, nand_np) { ^ include/linux/of.h:1368:48: note: expanded from macro 'for_each_child_of_node' for (child = of_get_next_child(parent, NULL); child != NULL; \ ^~~~~~~~~~~~~ drivers/mtd/nand/raw/arasan-nand-controller.c:1370:2: note: Loop condition is false. Execution continues on line 1379 for_each_child_of_node(np, nand_np) { ^ include/linux/of.h:1368:2: note: expanded from macro 'for_each_child_of_node' for (child = of_get_next_child(parent, NULL); child != NULL; \ ^ drivers/mtd/nand/raw/arasan-nand-controller.c:1379:2: note: Undefined or garbage value returned to caller return ret; ^ ~~~ Suppressed 34 warnings (34 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. -- ^ fs/xfs/libxfs/xfs_dir2_node.c:830:7: note: '?' condition is false if (be32_to_cpu(lep->address) == XFS_DIR2_NULL_DATAPTR) ^ include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu' #define be32_to_cpu __be32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:41:26: note: expanded from macro '__be32_to_cpu' #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) ^ include/uapi/linux/swab.h:118:3: note: expanded from macro '__swab32' (__builtin_constant_p((__u32)(x)) ? \ ^ fs/xfs/libxfs/xfs_dir2_node.c:830:7: note: Assuming the condition is false if (be32_to_cpu(lep->address) == XFS_DIR2_NULL_DATAPTR) ^ include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu' #define be32_to_cpu __be32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:41:26: note: expanded from macro '__be32_to_cpu' #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) ^ include/uapi/linux/swab.h:118:2: note: expanded from macro '__swab32' (__builtin_constant_p((__u32)(x)) ? \ ^ fs/xfs/libxfs/xfs_dir2_node.c:830:3: note: Taking false branch if (be32_to_cpu(lep->address) == XFS_DIR2_NULL_DATAPTR) ^ fs/xfs/libxfs/xfs_dir2_node.c:836:13: note: '?' condition is false be32_to_cpu(lep->address)); ^ include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu' #define be32_to_cpu __be32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:41:26: note: expanded from macro '__be32_to_cpu' #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) ^ include/uapi/linux/swab.h:118:3: note: expanded from macro '__swab32' (__builtin_constant_p((__u32)(x)) ? \ ^ fs/xfs/libxfs/xfs_dir2_node.c:843:7: note: Assuming 'newdb' is equal to 'curdb' if (newdb != curdb) { ^~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:843:3: note: Taking false branch if (newdb != curdb) { ^ fs/xfs/libxfs/xfs_dir2_node.c:873:43: note: Access to field 'b_addr' results in a dereference of a null pointer (loaded from variable 'curbp') dep = (xfs_dir2_data_entry_t *)((char *)curbp->b_addr + ^~~~~ fs/xfs/libxfs/xfs_dir2_node.c:977:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&dents[start_d + count], &dents[start_d], ^~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:977:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&dents[start_d + count], &dents[start_d], ^~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:999: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(&dents[start_d], &sents[start_s], ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:999: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(&dents[start_d], &sents[start_s], ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1008:3: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove(&sents[start_s], &sents[start_s + count], ^~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1008:3: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove(&sents[start_s], &sents[start_s + count], ^~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1510:2: warning: Value stored to 'ents' is never read [clang-analyzer-deadcode.DeadStores] ents = leafhdr.ents; ^ ~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1510:2: note: Value stored to 'ents' is never read ents = leafhdr.ents; ^ ~~~~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1534:3: 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(&state->altpath, &state->path, sizeof(state->path)); ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1534:3: 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(&state->altpath, &state->path, sizeof(state->path)); ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1572:3: warning: Value stored to 'ents' is never read [clang-analyzer-deadcode.DeadStores] ents = hdr2.ents; ^ ~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1572:3: note: Value stored to 'ents' is never read ents = hdr2.ents; ^ ~~~~~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1595: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(&state->altpath, &state->path, sizeof(state->path)); ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1595: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(&state->altpath, &state->path, sizeof(state->path)); ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1973: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(dep->name, args->name, dep->namelen); ^~~~~~ fs/xfs/libxfs/xfs_dir2_node.c:1973: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(dep->name, args->name, dep->namelen); ^~~~~~ Suppressed 49 warnings (49 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. 55 warnings generated. >> drivers/hwmon/lm95234.c:215:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/lm95234.c:215:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ^~~~~~~ drivers/hwmon/lm95234.c:229:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u", !!(data->status & mask)); ^~~~~~~ drivers/hwmon/lm95234.c:229:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u", !!(data->status & mask)); ^~~~~~~ >> drivers/hwmon/lm95234.c:242:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, data->sensor_type & mask ? "1\n" : "2\n"); ^~~~~~~ drivers/hwmon/lm95234.c:242:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, data->sensor_type & mask ? "1\n" : "2\n"); ^~~~~~~ drivers/hwmon/lm95234.c:286:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u", data->tcrit2[index] * 1000); ^~~~~~~ drivers/hwmon/lm95234.c:286:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u", data->tcrit2[index] * 1000); ^~~~~~~ drivers/hwmon/lm95234.c:325:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d", ^~~~~~~ drivers/hwmon/lm95234.c:325:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d", ^~~~~~~ drivers/hwmon/lm95234.c:335:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u", data->tcrit1[index] * 1000); ^~~~~~~ drivers/hwmon/lm95234.c:335:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u", data->tcrit1[index] * 1000); ^~~~~~~ drivers/hwmon/lm95234.c:374:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d", ^~~~~~~ drivers/hwmon/lm95234.c:374:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d", ^~~~~~~ drivers/hwmon/lm95234.c:415:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d", data->toffset[index] * 500); ^~~~~~~ drivers/hwmon/lm95234.c:415:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d", data->toffset[index] * 500); ^~~~~~~ drivers/hwmon/lm95234.c:453:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lu\n", ^~~~~~~ drivers/hwmon/lm95234.c:453:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lu\n", ^~~~~~~ Suppressed 46 warnings (46 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. 53 warnings generated. drivers/target/target_core_iblock.c:642:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, "iBlock device: %pg", bd); ^~~~~~~ drivers/target/target_core_iblock.c:642:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, "iBlock device: %pg", bd); ^~~~~~~ drivers/target/target_core_iblock.c:644:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " UDEV PATH: %s", ^~~~~~~ drivers/target/target_core_iblock.c:644:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 bl += sprintf(b + bl, " UDEV PATH: %s", ^~~~~~~ drivers/target/target_core_iblock.c:646:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " readonly: %d\n", ib_dev->ibd_readonly); ^~~~~~~ drivers/target/target_core_iblock.c:646:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, " readonly: %d\n", ib_dev->ibd_readonly); ^~~~~~~ drivers/target/target_core_iblock.c:648:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " "); ^~~~~~~ drivers/target/target_core_iblock.c:648:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, " "); ^~~~~~~ drivers/target/target_core_iblock.c:650:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, "Major: %d Minor: %d %s\n", ^~~~~~~ drivers/target/target_core_iblock.c:650:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 bl += sprintf(b + bl, "Major: %d Minor: %d %s\n", ^~~~~~~ drivers/target/target_core_iblock.c:654:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, "Major: 0 Minor: 0\n"); ^~~~~~~ drivers/target/target_core_iblock.c:654:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl += sprintf(b + bl, "Major: 0 Minor: 0\n"); ^~~~~~~ Suppressed 47 warnings (47 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 29 warnings generated. Suppressed 29 warnings (29 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 33 warnings generated. >> drivers/mtd/tests/subpagetest.c:40: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(buf, 0, len); ^~~~~~ drivers/mtd/tests/subpagetest.c:40: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(buf, 0, len); ^~~~~~ drivers/mtd/tests/subpagetest.c:130:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] err = 0; ^ ~ drivers/mtd/tests/subpagetest.c:130:4: note: Value stored to 'err' is never read err = 0; ^ ~ drivers/mtd/tests/subpagetest.c:219: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(writebuf, 0xff, subpgsize); ^~~~~~ drivers/mtd/tests/subpagetest.c:219: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(writebuf, 0xff, subpgsize); ^~~~~~ drivers/mtd/tests/subpagetest.c:220:33: warning: Division by zero [clang-analyzer-core.DivideZero] for (j = 0; j < mtd->erasesize / subpgsize; ++j) { ^ drivers/mtd/tests/subpagetest.c:274:2: note: Left side of '&&' is true printk(KERN_INFO "\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/mtd/tests/subpagetest.c:274:2: note: Taking true branch printk(KERN_INFO "\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/mtd/tests/subpagetest.c:274:2: note: '?' condition is true printk(KERN_INFO "\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ drivers/mtd/tests/subpagetest.c:274:2: note: '?' condition is true printk(KERN_INFO "\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ drivers/mtd/tests/subpagetest.c:274:2: note: Loop condition is false. Exiting loop printk(KERN_INFO "\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ drivers/mtd/tests/subpagetest.c:275:2: note: Left side of '&&' is true printk(KERN_INFO "=================================================\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/mtd/tests/subpagetest.c:275:2: note: Taking true branch printk(KERN_INFO "=================================================\n"); ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ -- ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert' do { \ ^ drivers/md/raid10.c:3719:11: note: Left side of '||' is false rdev = rcu_dereference(conf->mirrors[d].replacement); ^ include/linux/rcupdate.h:603:28: note: expanded from macro 'rcu_dereference' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^ include/linux/rcupdate.h:532:5: note: expanded from macro 'rcu_dereference_check' (c) || rcu_read_lock_held(), __rcu) ^ drivers/md/raid10.c:3719:11: note: Assuming the condition is false rdev = rcu_dereference(conf->mirrors[d].replacement); ^ include/linux/rcupdate.h:603:28: note: expanded from macro 'rcu_dereference' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:531:2: note: expanded from macro 'rcu_dereference_check' __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:392:19: note: expanded from macro '__rcu_dereference_check' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \ ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:319:8: note: expanded from macro 'RCU_LOCKDEP_WARN' if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ ^ drivers/md/raid10.c:3719:11: note: Left side of '&&' is false rdev = rcu_dereference(conf->mirrors[d].replacement); ^ include/linux/rcupdate.h:603:28: note: expanded from macro 'rcu_dereference' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^ include/linux/rcupdate.h:531:2: note: expanded from macro 'rcu_dereference_check' __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ ^ include/linux/rcupdate.h:392:2: note: expanded from macro '__rcu_dereference_check' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \ ^ include/linux/rcupdate.h:319:11: note: expanded from macro 'RCU_LOCKDEP_WARN' if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ ^ drivers/md/raid10.c:3719:11: note: Loop condition is false. Exiting loop rdev = rcu_dereference(conf->mirrors[d].replacement); ^ include/linux/rcupdate.h:603:28: note: expanded from macro 'rcu_dereference' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^ include/linux/rcupdate.h:531:2: note: expanded from macro 'rcu_dereference_check' __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ ^ include/linux/rcupdate.h:392:2: note: expanded from macro '__rcu_dereference_check' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \ ^ include/linux/rcupdate.h:317:2: note: expanded from macro 'RCU_LOCKDEP_WARN' do { \ ^ drivers/md/raid10.c:3720:8: note: Assuming 'rdev' is not equal to NULL if (rdev == NULL || test_bit(Faulty, &rdev->flags)) { ^~~~~~~~~~~~ drivers/md/raid10.c:3720:8: note: Left side of '||' is false drivers/md/raid10.c:3720:24: note: Assuming the condition is false if (rdev == NULL || test_bit(Faulty, &rdev->flags)) { ^ include/asm-generic/bitops/non-atomic.h:120:18: note: expanded from macro 'test_bit' #define test_bit arch_test_bit ^ drivers/md/raid10.c:3720:4: note: Taking false branch if (rdev == NULL || test_bit(Faulty, &rdev->flags)) { ^ drivers/md/raid10.c:3727:4: note: Null pointer value stored to 'bio' bio = r10_bio->devs[i].repl_bio; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/raid10.c:3728:19: note: Access to field 'bi_status' results in a dereference of a null pointer (loaded from variable 'bio') bio->bi_status = BLK_STS_IOERR; ~~~ ^ drivers/md/raid10.c:4568:3: 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(conf->mirrors_new, conf->mirrors, ^~~~~~ drivers/md/raid10.c:4568:3: 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(conf->mirrors_new, conf->mirrors, ^~~~~~ Suppressed 51 warnings (51 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 34 warnings generated. >> drivers/mtd/tests/readtest.c:43: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(buf, 0 , pgsize); ^~~~~~ drivers/mtd/tests/readtest.c:43: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(buf, 0 , pgsize); ^~~~~~ >> drivers/mtd/tests/readtest.c:90:8: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] p += sprintf(p, "%05x: ", i); ^~~~~~~ drivers/mtd/tests/readtest.c:90:8: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 p += sprintf(p, "%05x: ", i); ^~~~~~~ drivers/mtd/tests/readtest.c:92:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] p += sprintf(p, "%02x", (unsigned int)iobuf[i]); ^~~~~~~ drivers/mtd/tests/readtest.c:92:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 p += sprintf(p, "%02x", (unsigned int)iobuf[i]); ^~~~~~~ drivers/mtd/tests/readtest.c:104:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] p += sprintf(p, "%05x: ", i); ^~~~~~~ drivers/mtd/tests/readtest.c:104:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 p += sprintf(p, "%05x: ", i); ^~~~~~~ drivers/mtd/tests/readtest.c:106:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] p += sprintf(p, "%02x", ^~~~~~~ drivers/mtd/tests/readtest.c:106:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 p += sprintf(p, "%02x", ^~~~~~~ Suppressed 29 warnings (29 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. 50 warnings generated. drivers/md/dm-zoned-reclaim.c:380:2: warning: Value stored to 'rzone' is never read [clang-analyzer-deadcode.DeadStores] rzone = dzone; ^ ~~~~~ drivers/md/dm-zoned-reclaim.c:380:2: note: Value stored to 'rzone' is never read rzone = dzone; ^ ~~~~~ drivers/md/dm-zoned-reclaim.c:382:2: warning: Value stored to 'start' is never read [clang-analyzer-deadcode.DeadStores] start = jiffies; ^ ~~~~~~~ drivers/md/dm-zoned-reclaim.c:382:2: note: Value stored to 'start' is never read start = jiffies; ^ ~~~~~~~ drivers/md/dm-zoned-reclaim.c:409:4: warning: Value stored to 'rzone' is never read [clang-analyzer-deadcode.DeadStores] rzone = bzone; ^ ~~~~~ drivers/md/dm-zoned-reclaim.c:409:4: note: Value stored to 'rzone' is never read rzone = bzone; ^ ~~~~~ Suppressed 47 warnings (47 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. 16 warnings generated. >> drivers/leds/trigger/ledtrig-oneshot.c:43:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", oneshot_data->invert); ^~~~~~~ drivers/leds/trigger/ledtrig-oneshot.c:43:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", oneshot_data->invert); ^~~~~~~ drivers/leds/trigger/ledtrig-oneshot.c:73:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); ^~~~~~~ drivers/leds/trigger/ledtrig-oneshot.c:73:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); ^~~~~~~ drivers/leds/trigger/ledtrig-oneshot.c:97:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); ^~~~~~~ drivers/leds/trigger/ledtrig-oneshot.c:97:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); ^~~~~~~ Suppressed 13 warnings (13 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. 48 warnings generated. drivers/md/dm-flakey.c:216:6: warning: Call to function 'sscanf' 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 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] if (sscanf(dm_shift_arg(&as), "%llu%c", &tmpll, &dummy) != 1 || tmpll != (sector_t)tmpll) { ^~~~~~ drivers/md/dm-flakey.c:216:6: note: Call to function 'sscanf' 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 'sscanf_s' in case of C11 if (sscanf(dm_shift_arg(&as), "%llu%c", &tmpll, &dummy) != 1 || tmpll != (sector_t)tmpll) { ^~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 52 warnings generated. drivers/target/target_core_file.c:145:3: warning: Value stored to 'dev_size' is never read [clang-analyzer-deadcode.DeadStores] dev_size = (i_size_read(file->f_mapping->host) - ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_file.c:145:3: note: Value stored to 'dev_size' is never read dev_size = (i_size_read(file->f_mapping->host) - ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/target/target_core_file.c:502: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(buf, 0xff, bufsize); ^~~~~~ drivers/target/target_core_file.c:502: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(buf, 0xff, bufsize); ^~~~~~ drivers/target/target_core_file.c:799:7: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl = sprintf(b + bl, "TCM FILEIO ID: %u", fd_dev->fd_dev_id); ^~~~~~~ drivers/target/target_core_file.c:799:7: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 bl = sprintf(b + bl, "TCM FILEIO ID: %u", fd_dev->fd_dev_id); ^~~~~~~ drivers/target/target_core_file.c:800:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] bl += sprintf(b + bl, " File: %s Size: %llu Mode: %s Async: %d\n", ^~~~~~~ drivers/target/target_core_file.c:800:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 bl += sprintf(b + bl, " File: %s Size: %llu Mode: %s Async: %d\n", ^~~~~~~ drivers/target/target_core_file.c:851:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(buf, FD_MAX_DEV_PROT_NAME, "%s.protection", ^~~~~~~~ drivers/target/target_core_file.c:851:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(buf, FD_MAX_DEV_PROT_NAME, "%s.protection", ^~~~~~~~ Suppressed 47 warnings (47 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. 40 warnings generated. drivers/mtd/chips/cfi_cmdset_0001.c:184: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(&atmel_pri, extp, sizeof(atmel_pri)); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0001.c:184: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(&atmel_pri, extp, sizeof(atmel_pri)); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0001.c:185: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((char *)extp + 5, 0, sizeof(*extp) - 5); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0001.c:185: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((char *)extp + 5, 0, sizeof(*extp) - 5); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0001.c:774:3: 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(newcfi, cfi, sizeof(struct cfi_private)); ^~~~~~ drivers/mtd/chips/cfi_cmdset_0001.c:774:3: 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(newcfi, cfi, sizeof(struct cfi_private)); ^~~~~~ Suppressed 37 warnings (37 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. 37 warnings generated. drivers/hwmon/wm831x-hwmon.c:41:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret, 1000)); ^~~~~~~ drivers/hwmon/wm831x-hwmon.c:41:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret, 1000)); ^~~~~~~ drivers/hwmon/wm831x-hwmon.c:59:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ret); ^~~~~~~ drivers/hwmon/wm831x-hwmon.c:59:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ret); ^~~~~~~ drivers/hwmon/wm831x-hwmon.c:67:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", input_names[channel]); -- ^~~~~~ fs/xfs/libxfs/xfs_attr_remote.c:581: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(map, 0, sizeof(struct xfs_bmbt_irec)); ^~~~~~ fs/xfs/libxfs/xfs_attr_remote.c:581: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(map, 0, sizeof(struct xfs_bmbt_irec)); ^~~~~~ Suppressed 48 warnings (48 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. 47 warnings generated. Suppressed 47 warnings (47 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. 22 warnings generated. drivers/leds/led-class.c:35:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", led_cdev->brightness); ^~~~~~~ drivers/leds/led-class.c:35:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", led_cdev->brightness); ^~~~~~~ drivers/leds/led-class.c:73:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", led_cdev->max_brightness); ^~~~~~~ drivers/leds/led-class.c:73:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", led_cdev->max_brightness); ^~~~~~~ drivers/leds/led-class.c:318:9: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ret = snprintf(name, len, "%s_%u", init_name, ++i); ^~~~~~~~ drivers/leds/led-class.c:318:9: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 ret = snprintf(name, len, "%s_%u", init_name, ++i); ^~~~~~~~ Suppressed 19 warnings (19 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. 20 warnings generated. drivers/leds/led-class-flash.c:75:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", fled_cdev->brightness.val); ^~~~~~~ drivers/leds/led-class-flash.c:75:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", fled_cdev->brightness.val); ^~~~~~~ drivers/leds/led-class-flash.c:85:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", fled_cdev->brightness.max); ^~~~~~~ drivers/leds/led-class-flash.c:85:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", fled_cdev->brightness.max); ^~~~~~~ drivers/leds/led-class-flash.c:133:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", state); ^~~~~~~ drivers/leds/led-class-flash.c:133:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", state); ^~~~~~~ drivers/leds/led-class-flash.c:172:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", fled_cdev->timeout.val); ^~~~~~~ drivers/leds/led-class-flash.c:172:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", fled_cdev->timeout.val); ^~~~~~~ drivers/leds/led-class-flash.c:182:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", fled_cdev->timeout.max); ^~~~~~~ drivers/leds/led-class-flash.c:182:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", fled_cdev->timeout.max); ^~~~~~~ drivers/leds/led-class-flash.c:203:14: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] buf_len = sprintf(pbuf, "%s ", ^~~~~~~ drivers/leds/led-class-flash.c:203:14: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 buf_len = sprintf(pbuf, "%s ", ^~~~~~~ drivers/leds/led-class-flash.c:210:16: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] return strlen(strcat(buf, "\n")); ^~~~~~ drivers/leds/led-class-flash.c:210:16: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 return strlen(strcat(buf, "\n")); ^~~~~~ Suppressed 13 warnings (13 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. 50 warnings generated. drivers/scsi/sr_vendor.c:141: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_vendor.c:141: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_vendor.c:146: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(modesel, 0, sizeof(*modesel)); ^~~~~~ drivers/scsi/sr_vendor.c:146: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(modesel, 0, sizeof(*modesel)); ^~~~~~ drivers/scsi/sr_vendor.c:190: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ drivers/scsi/sr_vendor.c:190: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(&cgc, 0, sizeof(struct packet_command)); ^~~~~~ Suppressed 47 warnings (47 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. 75 warnings generated. >> drivers/scsi/sg.c:504:3: 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(old_hdr->sense_buffer, srp->sense_b, ^~~~~~ drivers/scsi/sg.c:504:3: 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(old_hdr->sense_buffer, srp->sense_b, ^~~~~~ drivers/scsi/sg.c:702:3: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] printk_ratelimited(KERN_WARNING ^ include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^ ~~~~~~~~~~~ include/linux/printk.h:446:44: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ ~~~~~~~~~~~ include/linux/printk.h:418:3: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ^ ~~~~~~~~~~~ drivers/scsi/sg.c:616:11: note: Calling 'sg_check_file_access' retval = sg_check_file_access(filp, __func__); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:222:22: note: Left side of '&&' is false if (filp->f_cred != current_real_cred()) { ^ include/linux/cred.h:308:2: note: expanded from macro 'current_real_cred' rcu_dereference_protected(current->real_cred, 1) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:319:11: note: expanded from macro 'RCU_LOCKDEP_WARN' if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ ^ drivers/scsi/sg.c:222:22: note: Loop condition is false. Exiting loop if (filp->f_cred != current_real_cred()) { ^ include/linux/cred.h:308:2: note: expanded from macro 'current_real_cred' rcu_dereference_protected(current->real_cred, 1) ^ include/linux/rcupdate.h:594:2: note: expanded from macro 'rcu_dereference_protected' __rcu_dereference_protected((p), __UNIQUE_ID(rcu), (c), __rcu) ^ include/linux/rcupdate.h:398:2: note: expanded from macro '__rcu_dereference_protected' RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ ^ include/linux/rcupdate.h:317:2: note: expanded from macro 'RCU_LOCKDEP_WARN' do { \ ^ drivers/scsi/sg.c:222:6: note: Assuming the condition is false if (filp->f_cred != current_real_cred()) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:222:2: note: Taking false branch if (filp->f_cred != current_real_cred()) { ^ drivers/scsi/sg.c:227:2: note: Taking false branch if (uaccess_kernel()) { ^ drivers/scsi/sg.c:232:2: note: Returning zero, which participates in a condition later return 0; ^~~~~~~~ drivers/scsi/sg.c:616:11: note: Returning from 'sg_check_file_access' retval = sg_check_file_access(filp, __func__); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:617:6: note: 'retval' is 0 if (retval) ^~~~~~ drivers/scsi/sg.c:617:2: note: Taking false branch if (retval) ^ drivers/scsi/sg.c:620:9: note: Assuming 'sfp' is non-null if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) ^~~ drivers/scsi/sg.c:620:6: note: Left side of '||' is false if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) ^ drivers/scsi/sg.c:620:52: note: Assuming 'sdp' is non-null if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) ^~~ drivers/scsi/sg.c:620:2: note: Taking false branch if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) ^ drivers/scsi/sg.c:622:2: note: Assuming the condition is false SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.h:49:22: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/scsi/sg.c:622:2: note: Taking false branch SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); -- ^ drivers/scsi/sg.c:656:8: note: Assuming 'opcode' is < 192 if ((opcode >= 0xc0) && old_hdr.twelve_byte) ^~~~~~~~~~~~~~ drivers/scsi/sg.c:656:24: note: Left side of '&&' is false if ((opcode >= 0xc0) && old_hdr.twelve_byte) ^ drivers/scsi/sg.c:660:2: note: Assuming the condition is false SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.h:49:22: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/scsi/sg.c:660:2: note: Taking false branch SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^ drivers/scsi/scsi_logging.h:49:9: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ^ drivers/scsi/sg.c:660:2: note: Loop condition is false. Exiting loop SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^ drivers/scsi/scsi_logging.h:47:54: note: expanded from macro 'SCSI_CHECK_LOGGING' #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) \ ^ drivers/scsi/sg.c:664:12: note: Assuming 'input_size' is <= field 'reply_len' mxsize = (input_size > old_hdr.reply_len) ? input_size : old_hdr.reply_len; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:664:11: note: '?' condition is false mxsize = (input_size > old_hdr.reply_len) ? input_size : old_hdr.reply_len; ^ drivers/scsi/sg.c:667:6: note: 'input_size' is >= 0 if (input_size < 0) { ^~~~~~~~~~ drivers/scsi/sg.c:667:2: note: Taking false branch if (input_size < 0) { ^ drivers/scsi/sg.c:676:6: note: Assuming 'input_size' is <= 0 if (input_size > 0) ^~~~~~~~~~~~~~ drivers/scsi/sg.c:676:2: note: Taking false branch if (input_size > 0) ^ drivers/scsi/sg.c:680:26: note: Assuming 'mxsize' is <= 0 hp->dxfer_direction = (mxsize > 0) ? SG_DXFER_FROM_DEV : SG_DXFER_NONE; ^~~~~~~~~~ drivers/scsi/sg.c:680:25: note: '?' condition is false hp->dxfer_direction = (mxsize > 0) ? SG_DXFER_FROM_DEV : SG_DXFER_NONE; ^ drivers/scsi/sg.c:682:6: note: Left side of '||' is false if ((hp->dxfer_direction == SG_DXFER_TO_DEV) || ^ drivers/scsi/sg.c:682:2: note: Taking false branch if ((hp->dxfer_direction == SG_DXFER_TO_DEV) || ^ drivers/scsi/sg.c:692:6: note: Calling 'copy_from_user' if (copy_from_user(cmnd, buf, cmd_size)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/uaccess.h:191:6: note: Assuming the condition is true if (likely(check_copy_size(to, n, false))) ^ include/linux/compiler.h:77:38: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^~~~ include/linux/uaccess.h:191:2: note: Taking false branch if (likely(check_copy_size(to, n, false))) ^ include/linux/uaccess.h:193:2: note: Returning without writing to '*to' return n; ^ drivers/scsi/sg.c:692:6: note: Returning from 'copy_from_user' if (copy_from_user(cmnd, buf, cmd_size)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:692:6: note: Assuming the condition is false if (copy_from_user(cmnd, buf, cmd_size)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:692:2: note: Taking false branch if (copy_from_user(cmnd, buf, cmd_size)) { ^ drivers/scsi/sg.c:701:2: note: Taking false branch if (hp->dxfer_direction == SG_DXFER_TO_FROM_DEV) { ^ drivers/scsi/sg.c:711:6: note: Calling 'sg_common_write' k = sg_common_write(sfp, srp, cmnd, sfp->timeout, blocking); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:790:23: note: Assigned value is garbage or undefined srp->data.cmd_opcode = cmnd[0]; /* hold opcode of command */ ^ ~~~~~~~ >> drivers/scsi/sg.c:988:4: 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(&v, 0, sizeof(v)); ^~~~~~ drivers/scsi/sg.c:988:4: 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(&v, 0, sizeof(v)); ^~~~~~ drivers/scsi/sg.c:1381:3: 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(srp->sense_b, req->sense, SCSI_SENSE_BUFFERSIZE); ^~~~~~ drivers/scsi/sg.c:1381:3: 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(srp->sense_b, req->sense, SCSI_SENSE_BUFFERSIZE); ^~~~~~ >> drivers/scsi/sg.c:1473:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(sdp->name, "sg%d", k); ^~~~~~~ drivers/scsi/sg.c:1473:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(sdp->name, "sg%d", k); ^~~~~~~ drivers/scsi/sg.c:1770: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(req->cmd, cmd, hp->cmd_len); ^~~~~~ drivers/scsi/sg.c:1770: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(req->cmd, cmd, hp->cmd_len); ^~~~~~ drivers/scsi/sg.c:1858:22: warning: Access to field 'parentdp' results in a dereference of a null pointer (loaded from variable 'sfp') [clang-analyzer-core.NullDereference] SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, ^ drivers/scsi/sg.c:206:29: note: expanded from macro 'sg_printk' sdev_prefix_printk(prefix, (sdp)->device, (sdp)->name, fmt, ##a) ^ drivers/scsi/sg.c:2218:2: note: Loop condition is false. Exiting loop write_lock_irqsave(&sfp->rq_list_lock, iflags); ^ include/linux/rwlock.h:72:2: note: expanded from macro 'write_lock_irqsave' do { \ ^ drivers/scsi/sg.c:2219:2: note: Loop condition is true. Entering loop body while (!list_empty(&sfp->rq_list)) { ^ drivers/scsi/sg.c:2223:3: note: Null pointer value stored to field 'parentfp' srp->parentfp = NULL; ^~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:2219:2: note: Loop condition is true. Entering loop body while (!list_empty(&sfp->rq_list)) { ^ drivers/scsi/sg.c:2221:3: note: Calling 'sg_finish_rem_req' sg_finish_rem_req(srp); ^~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sg.c:1855:2: note: 'sfp' initialized to a null pointer value Sg_fd *sfp = srp->parentfp; ^~~~~~~~~~ drivers/scsi/sg.c:1858:2: note: Assuming the condition is true SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.h:49:22: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/scsi/sg.c:1858:2: note: Taking true branch SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^ drivers/scsi/scsi_logging.h:49:9: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ^ drivers/scsi/sg.c:1858:22: note: Access to field 'parentdp' results in a dereference of a null pointer (loaded from variable 'sfp') SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, ^ drivers/scsi/sg.c:206:29: note: expanded from macro 'sg_printk' sdev_prefix_printk(prefix, (sdp)->device, (sdp)->name, fmt, ##a) ^~~~ drivers/scsi/scsi_logging.h:67:81: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^~~ drivers/scsi/scsi_logging.h:51:4: note: expanded from macro 'SCSI_CHECK_LOGGING' CMD; \ ^~~ drivers/scsi/sg.c:1924:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int' [clang-analyzer-core.UndefinedBinaryOperatorResult] ret_sz = 1 << (PAGE_SHIFT + order); ^ drivers/scsi/sg.c:929:2: note: Assuming the condition is false SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.h:49:22: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/scsi/sg.c:929:2: note: Taking false branch SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); ^ drivers/scsi/scsi_logging.h:49:9: note: expanded from macro 'SCSI_CHECK_LOGGING' if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ ^ drivers/scsi/sg.c:929:2: note: Loop condition is false. Exiting loop SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, ^ drivers/scsi/scsi_logging.h:67:9: note: expanded from macro 'SCSI_LOG_TIMEOUT' SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD); -- ^~~~~~ fs/xfs/libxfs/xfs_bmap.c:801: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(&args, 0, sizeof(args)); ^~~~~~ fs/xfs/libxfs/xfs_bmap.c:960: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(&dargs, 0, sizeof(dargs)); ^~~~~~ fs/xfs/libxfs/xfs_bmap.c:960: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(&dargs, 0, sizeof(dargs)); ^~~~~~ fs/xfs/libxfs/xfs_bmap.c:5032:2: warning: Value stored to 'qfield' is never read [clang-analyzer-deadcode.DeadStores] qfield = 0; ^ ~ fs/xfs/libxfs/xfs_bmap.c:5032:2: note: Value stored to 'qfield' is never read qfield = 0; ^ ~ fs/xfs/libxfs/xfs_bmap.c:5734: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(&new, got, sizeof(new)); ^~~~~~ fs/xfs/libxfs/xfs_bmap.c:5734: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(&new, got, sizeof(new)); ^~~~~~ Suppressed 49 warnings (48 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 53 warnings generated. fs/xfs/libxfs/xfs_bmap_btree.c:57: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(tkp, fkp, sizeof(*fkp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:57: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(tkp, fkp, sizeof(*fkp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:58: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(tpp, fpp, sizeof(*fpp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:58: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(tpp, fpp, sizeof(*fpp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:160: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(tkp, fkp, sizeof(*fkp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:160: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(tkp, fkp, sizeof(*fkp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:161: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(tpp, fpp, sizeof(*fpp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:161: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(tpp, fpp, sizeof(*fpp) * dmxr); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:206: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(&args, 0, sizeof(args)); ^~~~~~ fs/xfs/libxfs/xfs_bmap_btree.c:206: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(&args, 0, sizeof(args)); ^~~~~~ Suppressed 48 warnings (48 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. 35 warnings generated. Suppressed 35 warnings (35 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. 35 warnings generated. Suppressed 35 warnings (35 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. 16 warnings generated. include/asm-generic/bitops/non-atomic.h:118:16: warning: Array access (from variable 'addr') results in a null pointer dereference [clang-analyzer-core.NullDereference] return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); ^ kernel/padata.c:807:10: note: Assuming '____ptr' is null pinst = hlist_entry_safe(node, struct padata_instance, cpu_dead_node); ^ include/linux/list.h:993:5: note: expanded from macro 'hlist_entry_safe' ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^~~~~~~ kernel/padata.c:807:10: note: '?' condition is false pinst = hlist_entry_safe(node, struct padata_instance, cpu_dead_node); ^ include/linux/list.h:993:5: note: expanded from macro 'hlist_entry_safe' ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^ kernel/padata.c:808:7: note: Calling 'pinst_has_cpu' if (!pinst_has_cpu(pinst, cpu)) ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/padata.c:783:9: note: Calling 'cpumask_test_cpu' return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) || ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/cpumask.h:379:38: note: Passing null pointer value via 2nd parameter 'addr' return test_bit(cpumask_check(cpu), cpumask_bits((cpumask))); ^ include/linux/cpumask.h:26:29: note: expanded from macro 'cpumask_bits' #define cpumask_bits(maskp) ((maskp)->bits) ^~~~~~~~~~~~~~~ include/linux/cpumask.h:379:9: note: Calling 'arch_test_bit' return test_bit(cpumask_check(cpu), cpumask_bits((cpumask))); ^ include/asm-generic/bitops/non-atomic.h:120:18: note: expanded from macro 'test_bit' #define test_bit arch_test_bit ^ include/asm-generic/bitops/non-atomic.h:118:16: note: Array access (from variable 'addr') results in a null pointer dereference return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); ^~~~ >> kernel/padata.c:867:8: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] len = snprintf(buf, PAGE_SIZE, "%*pb\n", ^~~~~~~~ kernel/padata.c:867:8: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 len = snprintf(buf, PAGE_SIZE, "%*pb\n", ^~~~~~~~ Suppressed 14 warnings (14 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. 34 warnings generated. Suppressed 34 warnings (34 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. 38 warnings generated. drivers/comedi/comedi_buf.c:215:4: 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(b, buf, l); ^~~~~~ drivers/comedi/comedi_buf.c:215:4: 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(b, buf, l); ^~~~~~ drivers/comedi/comedi_buf.c:217:4: 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(buf, b, l); ^~~~~~ drivers/comedi/comedi_buf.c:217:4: 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(buf, b, l); ^~~~~~ drivers/comedi/comedi_buf.c:571:3: 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(async->prealloc_buf + write_ptr, data, block_size); ^~~~~~ drivers/comedi/comedi_buf.c:571:3: 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(async->prealloc_buf + write_ptr, data, block_size); ^~~~~~ drivers/comedi/comedi_buf.c:597:3: 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(dest, src, block_size); ^~~~~~ drivers/comedi/comedi_buf.c:597:3: 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(dest, src, block_size); ^~~~~~ Suppressed 34 warnings (34 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. 40 warnings generated. drivers/mtd/chips/gen_probe.c:67: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(&cfi, 0, sizeof(cfi)); ^~~~~~ drivers/mtd/chips/gen_probe.c:67: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(&cfi, 0, sizeof(cfi)); ^~~~~~ drivers/mtd/chips/gen_probe.c:145: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(retcfi, &cfi, sizeof(cfi)); ^~~~~~ drivers/mtd/chips/gen_probe.c:145: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(retcfi, &cfi, sizeof(cfi)); ^~~~~~ drivers/mtd/chips/gen_probe.c:146: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(&retcfi->chips[0], 0, sizeof(struct flchip) * cfi.numchips); ^~~~~~ drivers/mtd/chips/gen_probe.c:146: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(&retcfi->chips[0], 0, sizeof(struct flchip) * cfi.numchips); ^~~~~~ Suppressed 37 warnings (37 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. 38 warnings generated. drivers/mtd/chips/jedec_probe.c:1993: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(cfi->cfiq, 0, sizeof(struct cfi_ident)); ^~~~~~ drivers/mtd/chips/jedec_probe.c:1993: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(cfi->cfiq, 0, sizeof(struct cfi_ident)); ^~~~~~ Suppressed 37 warnings (37 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. 25 warnings generated. Suppressed 25 warnings (25 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. 25 warnings generated. Suppressed 25 warnings (25 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. 50 warnings generated. Suppressed 50 warnings (50 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. 50 warnings generated. Suppressed 50 warnings (50 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. 174 warnings generated. drivers/target/target_core_configfs.c:87:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "Target Engine Core ConfigFS Infrastructure %s" ^~~~~~~ drivers/target/target_core_configfs.c:87:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "Target Engine Core ConfigFS Infrastructure %s" ^~~~~~~ drivers/target/target_core_configfs.c:100:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(page, "%s\n", db_root); ^~~~~~~ drivers/target/target_core_configfs.c:100:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(page, "%s\n", db_root); ^~~~~~~ drivers/target/target_core_configfs.c:123:15: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] read_bytes = snprintf(db_root_stage, DB_ROOT_LEN, "%s", page); ^~~~~~~~ drivers/target/target_core_configfs.c:123:15: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 read_bytes = snprintf(db_root_stage, DB_ROOT_LEN, "%s", page); ^~~~~~~~ drivers/target/target_core_configfs.c:146:2: warning: Call to function 'strncpy' 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 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] strncpy(db_root, db_root_stage, read_bytes); -- ^ drivers/md/bcache/journal.c:398:2: note: Left side of '&&' is true pr_info("journal replay done, %i keys in %i entries, seq %llu\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/md/bcache/journal.c:398:2: note: Taking true branch pr_info("journal replay done, %i keys in %i entries, seq %llu\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ drivers/md/bcache/journal.c:398:2: note: '?' condition is true pr_info("journal replay done, %i keys in %i entries, seq %llu\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ drivers/md/bcache/journal.c:398:2: note: '?' condition is true pr_info("journal replay done, %i keys in %i entries, seq %llu\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ drivers/md/bcache/journal.c:398:2: note: Loop condition is false. Exiting loop pr_info("journal replay done, %i keys in %i entries, seq %llu\n", ^ include/linux/printk.h:519:2: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ drivers/md/bcache/journal.c:401:2: note: Loop condition is true. Entering loop body while (!list_empty(list)) { ^ drivers/md/bcache/journal.c:404:3: note: Memory is released kfree(i); ^~~~~~~~ drivers/md/bcache/journal.c:401:2: note: Loop condition is true. Entering loop body while (!list_empty(list)) { ^ drivers/md/bcache/journal.c:403:3: note: Calling 'list_del' list_del(&i->list); ^~~~~~~~~~~~~~~~~~ include/linux/list.h:148:2: note: Calling '__list_del_entry' __list_del_entry(entry); ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:134:2: note: Taking false branch if (!__list_del_entry_valid(entry)) ^ include/linux/list.h:137:13: note: Use of memory after it is freed __list_del(entry->prev, entry->next); ^~~~~~~~~~~ Suppressed 51 warnings (51 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. 37 warnings generated. >> drivers/comedi/kcomedilib/kcomedilib_main.c:136: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(&insn, 0, sizeof(insn)); ^~~~~~ drivers/comedi/kcomedilib/kcomedilib_main.c:136: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(&insn, 0, sizeof(insn)); ^~~~~~ drivers/comedi/kcomedilib/kcomedilib_main.c:155: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(&insn, 0, sizeof(insn)); ^~~~~~ drivers/comedi/kcomedilib/kcomedilib_main.c:155: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(&insn, 0, sizeof(insn)); ^~~~~~ drivers/comedi/kcomedilib/kcomedilib_main.c:180: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(&insn, 0, sizeof(insn)); ^~~~~~ drivers/comedi/kcomedilib/kcomedilib_main.c:180: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(&insn, 0, sizeof(insn)); ^~~~~~ Suppressed 34 warnings (34 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. 41 warnings generated. drivers/ipack/ipack.c:128:3: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(&buf[c], "%02x", idev->id[i]); ^~~~~~~ drivers/ipack/ipack.c:128:3: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(&buf[c], "%02x", idev->id[i]); ^~~~~~~ drivers/ipack/ipack.c:141:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%02x\n", idev->id_vendor); ^~~~~~~ drivers/ipack/ipack.c:141:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%02x\n", idev->id_vendor); ^~~~~~~ drivers/ipack/ipack.c:143:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%06x\n", idev->id_vendor); ^~~~~~~ drivers/ipack/ipack.c:143:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%06x\n", idev->id_vendor); ^~~~~~~ drivers/ipack/ipack.c:155:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%02x\n", idev->id_device); ^~~~~~~ drivers/ipack/ipack.c:155:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%02x\n", idev->id_device); ^~~~~~~ drivers/ipack/ipack.c:157:10: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "0x%04x\n", idev->id_device); ^~~~~~~ drivers/ipack/ipack.c:157:10: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "0x%04x\n", idev->id_device); ^~~~~~~ drivers/ipack/ipack.c:168:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "ipac:f%02Xv%08Xd%08X", idev->id_format, ^~~~~~~ drivers/ipack/ipack.c:168:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "ipac:f%02Xv%08Xd%08X", idev->id_format, ^~~~~~~ drivers/ipack/ipack.c:172:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] ipack_device_attr(id_format, "0x%hhx\n"); ^ drivers/ipack/ipack.c:102:9: note: expanded from macro 'ipack_device_attr' return sprintf(buf, format_string, idev->field); \ ^~~~~~~ drivers/ipack/ipack.c:172:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 ipack_device_attr(id_format, "0x%hhx\n"); ^ drivers/ipack/ipack.c:102:9: note: expanded from macro 'ipack_device_attr' return sprintf(buf, format_string, idev->field); \ ^~~~~~~ Suppressed 34 warnings (34 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. 30 warnings generated. 60 warnings generated. 90 warnings generated. 120 warnings generated. 150 warnings generated. 180 warnings generated. 210 warnings generated. 240 warnings generated. >> drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/tests/mtd_test.c:16: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ Suppressed 232 warnings (232 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. 34 warnings generated. >> drivers/mtd/tests/torturetest.c:234: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(patt_FF, 0xFF, mtd->erasesize); ^~~~~~ drivers/mtd/tests/torturetest.c:234: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(patt_FF, 0xFF, mtd->erasesize); ^~~~~~ drivers/mtd/tests/torturetest.c:237:4: 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(patt_5A5 + i * pgsize, 0x55, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:237:4: 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(patt_5A5 + i * pgsize, 0x55, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:238:4: 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(patt_A5A + i * pgsize, 0xAA, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:238:4: 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(patt_A5A + i * pgsize, 0xAA, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:240:4: 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(patt_5A5 + i * pgsize, 0xAA, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:240:4: 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(patt_5A5 + i * pgsize, 0xAA, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:241:4: 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(patt_A5A + i * pgsize, 0x55, pgsize); ^~~~~~ drivers/mtd/tests/torturetest.c:241:4: 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(patt_A5A + i * pgsize, 0x55, pgsize); ^~~~~~ Suppressed 29 warnings (29 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. 68 warnings generated. Suppressed 68 warnings (68 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. 68 warnings generated. Suppressed 68 warnings (68 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. 70 warnings generated. kernel/sched/cputime.c:570:3: warning: Value stored to 'utime' is never read [clang-analyzer-deadcode.DeadStores] utime = rtime; ^ ~~~~~ kernel/sched/cputime.c:570:3: note: Value stored to 'utime' is never read utime = rtime; ^ ~~~~~ Suppressed 69 warnings (68 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 68 warnings generated. Suppressed 68 warnings (68 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. kernel/sched/fair.c:686:15: warning: Value stored to 'nr_running' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned int nr_running = cfs_rq->nr_running; ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:686:15: note: Value stored to 'nr_running' during its initialization is never read unsigned int nr_running = cfs_rq->nr_running; ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ >> kernel/sched/fair.c:747: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(sa, 0, sizeof(*sa)); ^~~~~~ kernel/sched/fair.c:747: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(sa, 0, sizeof(*sa)); ^~~~~~ kernel/sched/fair.c:6413:6: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] asym_fits_capacity(task_util, target)) ^ ~~~~~~~~~ kernel/sched/fair.c:6395:2: note: 'task_util' declared without an initial value unsigned long task_util; ^~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:6402:6: note: Left side of '&&' is false if (static_branch_unlikely(&sched_asym_cpucapacity)) { ^ include/linux/jump_label.h:508:52: note: expanded from macro 'static_branch_unlikely' #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key)) ^ include/linux/jump_label.h:416:67: note: expanded from macro 'static_key_enabled' if (!__builtin_types_compatible_p(typeof(*x), struct static_key) && \ ^ kernel/sched/fair.c:6402:6: note: Assuming the condition is false if (static_branch_unlikely(&sched_asym_cpucapacity)) { ^ include/linux/jump_label.h:508:52: note: expanded from macro 'static_branch_unlikely' #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key)) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/jump_label.h:420:2: note: expanded from macro 'static_key_enabled' static_key_count((struct static_key *)x) > 0; \ ^ include/linux/compiler.h:80:39: note: expanded from macro 'unlikely_notrace' # define unlikely_notrace(x) unlikely(x) ~~~~~~~~~^~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ kernel/sched/fair.c:6402:2: note: Taking false branch if (static_branch_unlikely(&sched_asym_cpucapacity)) { ^ kernel/sched/fair.c:6410:2: note: Assuming 'debug_locks' is 0 lockdep_assert_irqs_disabled(); ^ include/linux/lockdep.h:589:15: note: expanded from macro 'lockdep_assert_irqs_disabled' WARN_ON_ONCE(__lockdep_enabled && this_cpu_read(hardirqs_enabled)); \ ^~~~~~~~~~~~~~~~~ include/linux/lockdep.h:580:28: note: expanded from macro '__lockdep_enabled' #define __lockdep_enabled (debug_locks && !this_cpu_read(lockdep_recursion)) ^~~~~~~~~~~ include/asm-generic/bug.h:179:41: note: expanded from macro 'WARN_ON_ONCE' #define WARN_ON_ONCE(condition) WARN_ON(condition) ^~~~~~~~~ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ kernel/sched/fair.c:6410:2: note: Left side of '&&' is false lockdep_assert_irqs_disabled(); ^ include/linux/lockdep.h:589:15: note: expanded from macro 'lockdep_assert_irqs_disabled' WARN_ON_ONCE(__lockdep_enabled && this_cpu_read(hardirqs_enabled)); \ ^ include/linux/lockdep.h:580:40: note: expanded from macro '__lockdep_enabled' #define __lockdep_enabled (debug_locks && !this_cpu_read(lockdep_recursion)) ^ kernel/sched/fair.c:6410:2: note: Loop condition is false. Exiting loop lockdep_assert_irqs_disabled(); ^ include/linux/lockdep.h:587:44: note: expanded from macro 'lockdep_assert_irqs_disabled' #define lockdep_assert_irqs_disabled() \ ^ kernel/sched/fair.c:6412:7: note: Assuming the condition is true if ((available_idle_cpu(target) || sched_idle_cpu(target)) && ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:6412:34: note: Left side of '||' is true if ((available_idle_cpu(target) || sched_idle_cpu(target)) && ^ kernel/sched/fair.c:6413:6: note: 1st function call argument is an uninitialized value asym_fits_capacity(task_util, target)) ^ ~~~~~~~~~ kernel/sched/fair.c:6421:6: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] asym_fits_capacity(task_util, prev)) ^ ~~~~~~~~~ kernel/sched/fair.c:6395:2: note: 'task_util' declared without an initial value unsigned long task_util; ^~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:6402:6: note: Left side of '&&' is false if (static_branch_unlikely(&sched_asym_cpucapacity)) { ^ include/linux/jump_label.h:508:52: note: expanded from macro 'static_branch_unlikely' #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key)) ^ include/linux/jump_label.h:416:67: note: expanded from macro 'static_key_enabled' if (!__builtin_types_compatible_p(typeof(*x), struct static_key) && \ ^ kernel/sched/fair.c:6402:6: note: Assuming the condition is false if (static_branch_unlikely(&sched_asym_cpucapacity)) { ^ include/linux/jump_label.h:508:52: note: expanded from macro 'static_branch_unlikely' #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key)) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/jump_label.h:420:2: note: expanded from macro 'static_key_enabled' static_key_count((struct static_key *)x) > 0; \ -- if ((ops->ooboffs + ops->ooblen) > len) { ^ drivers/mtd/nand/raw/nand_base.c:442:6: note: Assuming the condition is false if (nand_region_is_secured(chip, to, ops->ooblen)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:442:2: note: Taking false branch if (nand_region_is_secured(chip, to, ops->ooblen)) ^ drivers/mtd/nand/raw/nand_base.c:454:6: note: 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/raw/nand_base.c:454:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/raw/nand_base.c:463:6: note: Calling 'nand_check_wp' if (nand_check_wp(chip)) { ^~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:362:2: note: 'status' declared without an initial value u8 status; ^~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:366:6: note: Assuming the condition is false if (chip->options & NAND_BROKEN_XD) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:366:2: note: Taking false branch if (chip->options & NAND_BROKEN_XD) ^ drivers/mtd/nand/raw/nand_base.c:370:8: note: Calling 'nand_status_op' ret = nand_status_op(chip, &status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:1754:6: note: Assuming the condition is true if (nand_has_exec_op(chip)) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:1754:2: note: Taking true branch if (nand_has_exec_op(chip)) { ^ drivers/mtd/nand/raw/nand_base.c:1760:9: note: '?' condition is true NAND_COMMON_TIMING_NS(conf, tADL_min)), ^ include/linux/mtd/rawnand.h:587:2: note: expanded from macro 'NAND_COMMON_TIMING_NS' PSEC_TO_NSEC(NAND_COMMON_TIMING_PS((conf), timing_name)) ^ include/linux/mtd/rawnand.h:769:25: note: expanded from macro 'PSEC_TO_NSEC' #define PSEC_TO_NSEC(x) __DIVIDE(x, 1000) ^ include/linux/mtd/rawnand.h:765:25: note: expanded from macro '__DIVIDE' (__typeof__(dividend))(sizeof(dividend) <= sizeof(unsigned long) ? \ ^ drivers/mtd/nand/raw/nand_base.c:1760:9: note: '?' condition is true NAND_COMMON_TIMING_NS(conf, tADL_min)), ^ include/linux/mtd/rawnand.h:587:15: note: expanded from macro 'NAND_COMMON_TIMING_NS' PSEC_TO_NSEC(NAND_COMMON_TIMING_PS((conf), timing_name)) ^ include/linux/mtd/rawnand.h:579:2: note: expanded from macro 'NAND_COMMON_TIMING_PS' nand_interface_is_sdr(conf) ? \ ^ drivers/mtd/nand/raw/nand_base.c:1767:7: note: 'status' is non-null if (status && nand_interface_is_nvddr(conf)) { ^~~~~~ drivers/mtd/nand/raw/nand_base.c:1767:7: note: Left side of '&&' is true drivers/mtd/nand/raw/nand_base.c:1767:3: note: Taking false branch if (status && nand_interface_is_nvddr(conf)) { ^ drivers/mtd/nand/raw/nand_base.c:1772:8: note: 'status' is non-null if (!status) ^~~~~~ drivers/mtd/nand/raw/nand_base.c:1772:3: note: Taking false branch if (!status) ^ drivers/mtd/nand/raw/nand_base.c:1776:7: note: Assuming 'ret' is 0, which participates in a condition later if (!ret && status && nand_interface_is_nvddr(conf)) ^~~~ drivers/mtd/nand/raw/nand_base.c:1776:7: note: Left side of '&&' is true drivers/mtd/nand/raw/nand_base.c:1776:15: note: 'status' is non-null if (!ret && status && nand_interface_is_nvddr(conf)) ^~~~~~ drivers/mtd/nand/raw/nand_base.c:1776:7: note: Left side of '&&' is true if (!ret && status && nand_interface_is_nvddr(conf)) ^ drivers/mtd/nand/raw/nand_base.c:1776:3: note: Taking false branch if (!ret && status && nand_interface_is_nvddr(conf)) ^ drivers/mtd/nand/raw/nand_base.c:1779:3: note: Returning without writing to '*status' return ret; ^ drivers/mtd/nand/raw/nand_base.c:1779:3: note: Returning zero (loaded from 'ret'), which participates in a condition later return ret; ^~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:370:8: note: Returning from 'nand_status_op' ret = nand_status_op(chip, &status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:371:6: note: 'ret' is 0 if (ret) ^~~ drivers/mtd/nand/raw/nand_base.c:371:2: note: Taking false branch if (ret) ^ drivers/mtd/nand/raw/nand_base.c:374:16: note: The left operand of '&' is a garbage value return status & NAND_STATUS_WP ? 0 : 1; ~~~~~~ ^ >> drivers/mtd/nand/raw/nand_base.c:394: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(chip->oob_poi, 0xff, mtd->oobsize); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:394: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(chip->oob_poi, 0xff, mtd->oobsize); ^~~~~~ >> drivers/mtd/nand/raw/nand_base.c:400:3: 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(chip->oob_poi + ops->ooboffs, oob, len); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:400:3: 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(chip->oob_poi + ops->ooboffs, oob, len); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:505: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(&ops, 0, sizeof(ops)); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:505: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(&ops, 0, sizeof(ops)); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:573: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(&einfo, 0, sizeof(einfo)); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:573: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(&einfo, 0, sizeof(einfo)); ^~~~~~ drivers/mtd/nand/raw/nand_base.c:767:15: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (status & NAND_STATUS_READY) ^ drivers/mtd/nand/raw/nand_base.c:4392:2: note: Calling 'nand_select_target' nand_select_target(chip, chipnr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:178:14: note: Assuming the condition is true if (WARN_ON(cs > nanddev_ntargets(&chip->base))) ^ include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:178:2: note: Taking true branch if (WARN_ON(cs > nanddev_ntargets(&chip->base))) ^ drivers/mtd/nand/raw/nand_base.c:179:3: note: Returning without writing to '->legacy.dev_ready', which participates in a condition later return; ^ drivers/mtd/nand/raw/nand_base.c:179:3: note: Returning without writing to '->controller', which participates in a condition later drivers/mtd/nand/raw/nand_base.c:4392:2: note: Returning from 'nand_select_target' nand_select_target(chip, chipnr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:4395:2: note: Calling 'panic_nand_wait' panic_nand_wait(chip, 400); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:754:2: note: Loop condition is true. Entering loop body for (i = 0; i < timeo; i++) { ^ drivers/mtd/nand/raw/nand_base.c:755:7: note: Assuming field 'dev_ready' is null if (chip->legacy.dev_ready) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:755:3: note: Taking false branch if (chip->legacy.dev_ready) { ^ drivers/mtd/nand/raw/nand_base.c:760:4: note: 'status' declared without an initial value u8 status; ^~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:762:10: note: Calling 'nand_read_data_op' ret = nand_read_data_op(chip, &status, sizeof(status), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:2054:7: note: 'len' is 1 if (!len || !buf) ^~~ drivers/mtd/nand/raw/nand_base.c:2054:6: note: Left side of '||' is false if (!len || !buf) ^ drivers/mtd/nand/raw/nand_base.c:2054:15: note: 'buf' is non-null if (!len || !buf) ^~~ drivers/mtd/nand/raw/nand_base.c:2054:2: note: Taking false branch if (!len || !buf) ^ drivers/mtd/nand/raw/nand_base.c:2057:6: note: Calling 'nand_has_exec_op' if (nand_has_exec_op(chip)) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/internals.h:117:6: note: Assuming field 'controller' is non-null, which participates in a condition later if (!chip->controller || !chip->controller->ops || ^~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/internals.h:117:6: note: Left side of '||' is false drivers/mtd/nand/raw/internals.h:117:27: note: Assuming field 'ops' is non-null, which participates in a condition later if (!chip->controller || !chip->controller->ops || ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/internals.h:117:6: note: Left side of '||' is false if (!chip->controller || !chip->controller->ops || ^ drivers/mtd/nand/raw/internals.h:118:6: note: Assuming field 'exec_op' is non-null, which participates in a condition later !chip->controller->ops->exec_op) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/internals.h:117:2: note: Taking false branch if (!chip->controller || !chip->controller->ops || ^ drivers/mtd/nand/raw/internals.h:121:2: note: Returning without writing to 'chip->controller', which participates in a condition later return true; ^ drivers/mtd/nand/raw/internals.h:121:2: note: Returning the value 1, which participates in a condition later return true; ^~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:2057:6: note: Returning from 'nand_has_exec_op' if (nand_has_exec_op(chip)) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_base.c:2057:2: note: Taking true branch if (nand_has_exec_op(chip)) { ^ -- ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ drivers/target/target_core_transport.c:1495:4: note: '?' condition is true pr_err("Unable to allocate cmd->t_task_cdb" ^ include/linux/printk.h:489:2: note: expanded from macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ drivers/target/target_core_transport.c:1495:4: note: Loop condition is false. Exiting loop pr_err("Unable to allocate cmd->t_task_cdb" ^ include/linux/printk.h:489:2: note: expanded from macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:446:26: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^ include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap' __printk_index_emit(_fmt, NULL, NULL); \ ^ include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit' do { \ ^ drivers/target/target_core_transport.c:1500:4: note: Control jumps to line 1516 goto err; ^ drivers/target/target_core_transport.c:1516:31: note: Assuming '__UNIQUE_ID___x602' is >= '__UNIQUE_ID___y603' memcpy(cmd->t_task_cdb, cdb, min(scsi_command_size(cdb), ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~~~~~~~~ drivers/target/target_core_transport.c:1516:31: note: '?' condition is false memcpy(cmd->t_task_cdb, cdb, min(scsi_command_size(cdb), ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ drivers/target/target_core_transport.c:1516:2: note: Null pointer passed as 1st argument to memory copy function memcpy(cmd->t_task_cdb, cdb, min(scsi_command_size(cdb), ^ ~~~~~~~~~~~~~~~ drivers/target/target_core_transport.c:1781:5: 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(buf, 0, sgl->length); ^~~~~~ drivers/target/target_core_transport.c:1781:5: 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(buf, 0, sgl->length); ^~~~~~ drivers/target/target_core_transport.c:3105:12: warning: Value stored to 'cdb' during its initialization is never read [clang-analyzer-deadcode.DeadStores] const u8 *cdb = cmd->t_task_cdb; ^~~ ~~~~~~~~~~~~~~~ drivers/target/target_core_transport.c:3105:12: note: Value stored to 'cdb' during its initialization is never read const u8 *cdb = cmd->t_task_cdb; ^~~ ~~~~~~~~~~~~~~~ drivers/target/target_core_transport.c:3106:21: warning: Value stored to 'tmf' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct se_tmr_req *tmf = cmd->se_tmr_req; ^~~ ~~~~~~~~~~~~~~~ drivers/target/target_core_transport.c:3106:21: note: Value stored to 'tmf' during its initialization is never read struct se_tmr_req *tmf = cmd->se_tmr_req; ^~~ ~~~~~~~~~~~~~~~ Suppressed 111 warnings (111 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. 34 warnings generated. Suppressed 34 warnings (34 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. 26 warnings generated. drivers/mtd/nand/raw/nand_bbt.c:579:3: warning: Value stored to 'bbtblocks' is never read [clang-analyzer-deadcode.DeadStores] bbtblocks = mtd->size >> this->bbt_erase_shift; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_bbt.c:579:3: note: Value stored to 'bbtblocks' is never read bbtblocks = mtd->size >> this->bbt_erase_shift; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mtd/nand/raw/nand_bbt.c:845:4: 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(&buf[offs], 0xff, (size_t)(numblocks >> sft)); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:845:4: 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(&buf[offs], 0xff, (size_t)(numblocks >> sft)); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:860:4: 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(buf, 0xff, len); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:860:4: 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(buf, 0xff, len); ^~~~~~ >> drivers/mtd/nand/raw/nand_bbt.c:862:4: 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(buf, td->pattern, td->len); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:862:4: 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(buf, td->pattern, td->len); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:869:4: 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(buf, 0xff, len + ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:869:4: 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(buf, 0xff, len + ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:874:4: 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(&buf[ooboffs + td->offs], td->pattern, td->len); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:874:4: 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(&buf[ooboffs + td->offs], td->pattern, td->len); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:889: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(&einfo, 0, sizeof(einfo)); ^~~~~~ drivers/mtd/nand/raw/nand_bbt.c:889: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(&einfo, 0, sizeof(einfo)); ^~~~~~ Suppressed 19 warnings (19 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. 66 warnings generated. fs/xfs/libxfs/xfs_btree.c:1019:17: warning: The left operand of '==' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] return ptr->l == cpu_to_be64(NULLFSBLOCK); ^ fs/xfs/libxfs/xfs_btree.c:3660:6: note: Assuming 'ptr' is not equal to 0 if (ptr == 0) { ^~~~~~~~ fs/xfs/libxfs/xfs_btree.c:3660:2: note: Taking false branch if (ptr == 0) { ^ fs/xfs/libxfs/xfs_btree.c:3676:6: note: Assuming 'ptr' is <= 'numrecs' if (ptr > numrecs) { ^~~~~~~~~~~~~ fs/xfs/libxfs/xfs_btree.c:3676:2: note: Taking false branch if (ptr > numrecs) { ^ fs/xfs/libxfs/xfs_btree.c:3681:2: note: Loop condition is false. Exiting loop XFS_BTREE_STATS_INC(cur, delrec); ^ fs/xfs/libxfs/xfs_btree.h:89:2: note: expanded from macro 'XFS_BTREE_STATS_INC' XFS_STATS_INC_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat) ^ fs/xfs/xfs_stats.h:183:2: note: expanded from macro 'XFS_STATS_INC_OFF' per_cpu_ptr(xfsstats.xs_stats, current_cpu())->a[off]++; \ ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ fs/xfs/libxfs/xfs_btree.c:3681:2: note: Loop condition is false. Exiting loop XFS_BTREE_STATS_INC(cur, delrec); ^ fs/xfs/libxfs/xfs_btree.h:89:2: note: expanded from macro 'XFS_BTREE_STATS_INC' XFS_STATS_INC_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat) ^ fs/xfs/xfs_stats.h:184:2: note: expanded from macro 'XFS_STATS_INC_OFF' per_cpu_ptr(mp->m_stats.xs_stats, current_cpu())->a[off]++; \ ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ fs/xfs/libxfs/xfs_btree.c:3681:2: note: Loop condition is false. Exiting loop XFS_BTREE_STATS_INC(cur, delrec); ^ fs/xfs/libxfs/xfs_btree.h:89:2: note: expanded from macro 'XFS_BTREE_STATS_INC' XFS_STATS_INC_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat) ^ fs/xfs/xfs_stats.h:181:39: note: expanded from macro 'XFS_STATS_INC_OFF' #define XFS_STATS_INC_OFF(mp, off) \ ^ fs/xfs/libxfs/xfs_btree.c:3682:2: note: Loop condition is false. Exiting loop XFS_BTREE_STATS_ADD(cur, moves, numrecs - ptr); ^ fs/xfs/libxfs/xfs_btree.h:91:2: note: expanded from macro 'XFS_BTREE_STATS_ADD' XFS_STATS_ADD_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat, val) ^ fs/xfs/xfs_stats.h:195:2: note: expanded from macro 'XFS_STATS_ADD_OFF' per_cpu_ptr(xfsstats.xs_stats, current_cpu())->a[off] += (inc); \ ^ include/linux/percpu-defs.h:235:2: note: expanded from macro 'per_cpu_ptr' __verify_pcpu_ptr(ptr); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ fs/xfs/libxfs/xfs_btree.c:3682:2: note: Loop condition is false. Exiting loop XFS_BTREE_STATS_ADD(cur, moves, numrecs - ptr); ^ fs/xfs/libxfs/xfs_btree.h:91:2: note: expanded from macro 'XFS_BTREE_STATS_ADD' XFS_STATS_ADD_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat, val) -- ^ drivers/mtd/nand/raw/nand_onfi.c:169:7: note: Calling 'nand_has_exec_op' if (!nand_has_exec_op(chip) || ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/internals.h:117:6: note: Assuming field 'controller' is null if (!chip->controller || !chip->controller->ops || ^~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/internals.h:117:24: note: Left side of '||' is true if (!chip->controller || !chip->controller->ops || ^ drivers/mtd/nand/raw/internals.h:119:3: note: Returning without writing to 'chip->parameters.model', which participates in a condition later return false; ^ drivers/mtd/nand/raw/nand_onfi.c:169:7: note: Returning from 'nand_has_exec_op' if (!nand_has_exec_op(chip) || ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:169:30: note: Left side of '||' is true if (!nand_has_exec_op(chip) || ^ drivers/mtd/nand/raw/nand_onfi.c:173:2: note: Loop condition is true. Entering loop body for (i = 0; i < ONFI_PARAM_PAGES; i++) { ^ drivers/mtd/nand/raw/nand_onfi.c:174:8: note: 'i' is 0 if (!i) ^ drivers/mtd/nand/raw/nand_onfi.c:174:3: note: Taking true branch if (!i) ^ drivers/mtd/nand/raw/nand_onfi.c:184:7: note: Assuming 'ret' is 0 if (ret) { ^~~ drivers/mtd/nand/raw/nand_onfi.c:184:3: note: Taking false branch if (ret) { ^ drivers/mtd/nand/raw/nand_onfi.c:190:7: note: Assuming 'crc' is equal to field 'crc' if (crc == le16_to_cpu(pbuf[i].crc)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:190:3: note: Taking true branch if (crc == le16_to_cpu(pbuf[i].crc)) { ^ drivers/mtd/nand/raw/nand_onfi.c:192:4: note: Execution continues on line 196 break; ^ drivers/mtd/nand/raw/nand_onfi.c:196:6: note: 'i' is not equal to ONFI_PARAM_PAGES if (i == ONFI_PARAM_PAGES) { ^ drivers/mtd/nand/raw/nand_onfi.c:196:2: note: Taking false branch if (i == ONFI_PARAM_PAGES) { ^ drivers/mtd/nand/raw/nand_onfi.c:215:6: note: Assuming field 'desc' is null if (chip->manufacturer.desc && chip->manufacturer.desc->ops && ^~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:215:30: note: Left side of '&&' is false if (chip->manufacturer.desc && chip->manufacturer.desc->ops && ^ drivers/mtd/nand/raw/nand_onfi.c:221:6: note: Assuming the condition is false if (val & ONFI_VERSION_2_3) ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:221:2: note: Taking false branch if (val & ONFI_VERSION_2_3) ^ drivers/mtd/nand/raw/nand_onfi.c:223:11: note: Assuming the condition is false else if (val & ONFI_VERSION_2_2) ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:223:7: note: Taking false branch else if (val & ONFI_VERSION_2_2) ^ drivers/mtd/nand/raw/nand_onfi.c:225:11: note: Assuming the condition is false else if (val & ONFI_VERSION_2_1) ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:225:7: note: Taking false branch else if (val & ONFI_VERSION_2_1) ^ drivers/mtd/nand/raw/nand_onfi.c:227:11: note: Assuming the condition is false else if (val & ONFI_VERSION_2_0) ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:227:7: note: Taking false branch else if (val & ONFI_VERSION_2_0) ^ drivers/mtd/nand/raw/nand_onfi.c:229:11: note: Assuming the condition is true else if (val & ONFI_VERSION_1_0) ^~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:229:7: note: Taking true branch else if (val & ONFI_VERSION_1_0) ^ drivers/mtd/nand/raw/nand_onfi.c:232:7: note: 'onfi_version' is 10 if (!onfi_version) { ^~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:232:2: note: Taking false branch if (!onfi_version) { ^ drivers/mtd/nand/raw/nand_onfi.c:240:6: note: Assuming field 'model' is non-null if (!chip->parameters.model) { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/nand_onfi.c:240:2: note: Taking false branch if (!chip->parameters.model) { ^ drivers/mtd/nand/raw/nand_onfi.c:265:5: note: The result of the left shift is undefined because the right operand is negative 1 << (fls(le32_to_cpu(p->blocks_per_lun)) - 1); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mtd/nand/raw/nand_onfi.c:323: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(onfi->vendor, p->vendor, sizeof(p->vendor)); ^~~~~~ drivers/mtd/nand/raw/nand_onfi.c:323: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(onfi->vendor, p->vendor, sizeof(p->vendor)); ^~~~~~ Suppressed 19 warnings (19 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. 38 warnings generated. drivers/mtd/ubi/io.c:321: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/ubi/io.c:321: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(&ei, 0, sizeof(struct erase_info)); ^~~~~~ drivers/mtd/ubi/io.c:391: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(ubi->peb_buf, patterns[i], ubi->peb_size); ^~~~~~ drivers/mtd/ubi/io.c:391: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(ubi->peb_buf, patterns[i], ubi->peb_size); ^~~~~~ drivers/mtd/ubi/io.c:396: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(ubi->peb_buf, ~patterns[i], ubi->peb_size); ^~~~~~ drivers/mtd/ubi/io.c:396: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(ubi->peb_buf, ~patterns[i], ubi->peb_size); ^~~~~~ Suppressed 35 warnings (35 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. 36 warnings generated. drivers/mtd/ubi/wl.c:1765:2: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] sprintf(ubi->bgt_name, UBI_BGT_NAME_PATTERN, ubi->ubi_num); ^~~~~~~ drivers/mtd/ubi/wl.c:1765:2: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 sprintf(ubi->bgt_name, UBI_BGT_NAME_PATTERN, ubi->ubi_num); ^~~~~~~ Suppressed 35 warnings (35 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. 68 warnings generated. drivers/md/bcache/features.c:59:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] compose_feature_string(COMPAT); ^ drivers/md/bcache/features.c:35:12: note: expanded from macro 'compose_feature_string' out += snprintf(out, buf + size - out, \ ^~~~~~~~ drivers/md/bcache/features.c:59:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 compose_feature_string(COMPAT); ^ drivers/md/bcache/features.c:35:12: note: expanded from macro 'compose_feature_string' out += snprintf(out, buf + size - out, \ ^~~~~~~~ drivers/md/bcache/features.c:66:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] compose_feature_string(RO_COMPAT); ^ drivers/md/bcache/features.c:35:12: note: expanded from macro 'compose_feature_string' out += snprintf(out, buf + size - out, \ ^~~~~~~~ drivers/md/bcache/features.c:66:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 compose_feature_string(RO_COMPAT); ^ drivers/md/bcache/features.c:35:12: note: expanded from macro 'compose_feature_string' out += snprintf(out, buf + size - out, \ ^~~~~~~~ drivers/md/bcache/features.c:73:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] compose_feature_string(INCOMPAT); ^ drivers/md/bcache/features.c:35:12: note: expanded from macro 'compose_feature_string' out += snprintf(out, buf + size - out, \ ^~~~~~~~ drivers/md/bcache/features.c:73:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 compose_feature_string(INCOMPAT); ^ drivers/md/bcache/features.c:35:12: note: expanded from macro 'compose_feature_string' out += snprintf(out, buf + size - out, \ ^~~~~~~~ Suppressed 50 warnings (50 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. 148 warnings generated. drivers/md/md.c:1352:3: 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(mddev->uuid+0, &sb->set_uuid0, 4); ^~~~~~ drivers/md/md.c:1352:3: 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(mddev->uuid+0, &sb->set_uuid0, 4); ^~~~~~ drivers/md/md.c:1353:3: 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(mddev->uuid+4, &sb->set_uuid1, 4); ^~~~~~ drivers/md/md.c:1353:3: 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(mddev->uuid+4, &sb->set_uuid1, 4); ^~~~~~ drivers/md/md.c:1354:3: 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(mddev->uuid+8, &sb->set_uuid2, 4); ^~~~~~ drivers/md/md.c:1354:3: 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(mddev->uuid+8, &sb->set_uuid2, 4); ^~~~~~ drivers/md/md.c:1355:3: 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(mddev->uuid+12,&sb->set_uuid3, 4); ^~~~~~ drivers/md/md.c:1355:3: 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(mddev->uuid+12,&sb->set_uuid3, 4); -- while (bkey_next(k) != bset_bkey_last(t->data)) ^ drivers/md/bcache/bset.c:730:2: note: Loop condition is true. Entering loop body for (j = inorder_next(0, t->size); ^ drivers/md/bcache/bset.c:730:2: note: Loop condition is true. Entering loop body drivers/md/bcache/bset.c:733:3: note: Calling 'make_bfloat' make_bfloat(t, j); ^~~~~~~~~~~~~~~~~ drivers/md/bcache/bset.c:598:19: note: '?' condition is false struct bkey *l = is_power_of_2(j) ^ drivers/md/bcache/bset.c:602:19: note: Calling 'is_power_of_2' struct bkey *r = is_power_of_2(j + 1) ^~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:47:10: note: Assuming 'n' is equal to 0 return (n != 0 && ((n & (n - 1)) == 0)); ^~~~~~ include/linux/log2.h:47:17: note: Left side of '&&' is false return (n != 0 && ((n & (n - 1)) == 0)); ^ include/linux/log2.h:47:2: note: Returning zero, which participates in a condition later return (n != 0 && ((n & (n - 1)) == 0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/bcache/bset.c:602:19: note: Returning from 'is_power_of_2' struct bkey *r = is_power_of_2(j + 1) ^~~~~~~~~~~~~~~~~~~~ drivers/md/bcache/bset.c:602:19: note: '?' condition is false drivers/md/bcache/bset.c:604:23: note: The result of the right shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned int' : tree_to_bkey(t, j >> (ffz(j) + 1)); ^ ~~~~~~~~~~~~ drivers/md/bcache/bset.c:867:2: warning: Call to function 'memmove' 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 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memmove((uint64_t *) where + bkey_u64s(insert), ^~~~~~~ drivers/md/bcache/bset.c:867:2: note: Call to function 'memmove' 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 'memmove_s' in case of C11 memmove((uint64_t *) where + bkey_u64s(insert), ^~~~~~~ drivers/md/bcache/bset.c:872: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] bkey_copy(where, insert); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:872: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 bkey_copy(where, insert); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:903:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = BTREE_INSERT_STATUS_INSERT; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/bcache/bset.c:903:2: note: Value stored to 'status' is never read status = BTREE_INSERT_STATUS_INSERT; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/bcache/bset.c:928:7: 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] copy: bkey_copy(m, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:928:7: 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 copy: bkey_copy(m, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:1223:4: 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] bkey_copy(last, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:1223:4: 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 bkey_copy(last, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:1226:4: 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] bkey_copy(last, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:1226:4: 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 bkey_copy(last, k); ^ drivers/md/bcache/bcache_ondisk.h:109:32: note: expanded from macro 'bkey_copy' #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) ^~~~~~ drivers/md/bcache/bset.c:1277:3: 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(b->set[start].data->start, out->start, ^~~~~~ drivers/md/bcache/bset.c:1277:3: 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(b->set[start].data->start, out->start, ^~~~~~ Suppressed 50 warnings (50 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. 47 warnings generated. >> drivers/input/misc/kxtj9.c:299:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", tj9->last_poll_interval); ^~~~~~~ drivers/input/misc/kxtj9.c:299:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", tj9->last_poll_interval); ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. Suppressed 48 warnings (48 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. 49 warnings generated. fs/xfs/libxfs/xfs_attr.c:1243:2: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores] error = xfs_attr_node_removename(args, state); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/libxfs/xfs_attr.c:1243:2: note: Value stored to 'error' is never read error = xfs_attr_node_removename(args, state); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 48 warnings (48 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. 53 warnings generated. drivers/scsi/scsi_logging.c:75:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores] off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:75:3: note: Value stored to 'off' is never read off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:100:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores] off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:100:3: note: Value stored to 'off' is never read off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:209:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores] off += scnprintf(logbuf + off, logbuf_len - off, "\n"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:209:3: note: Value stored to 'off' is never read off += scnprintf(logbuf + off, logbuf_len - off, "\n"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:331:2: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores] off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:331:2: note: Value stored to 'off' is never read off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:339:2: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores] off += scsi_format_extd_sense(logbuf + off, logbuf_len - off, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:339:2: note: Value stored to 'off' is never read off += scsi_format_extd_sense(logbuf + off, logbuf_len - off, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:435:2: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores] off += scnprintf(logbuf + off, logbuf_len - off, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_logging.c:435:2: note: Value stored to 'off' is never read off += scnprintf(logbuf + off, logbuf_len - off, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 47 warnings (47 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. 47 warnings generated. Suppressed 47 warnings (47 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. 38 warnings generated. drivers/hwtracing/intel_th/msu.c:667:4: 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(&bdesc->hw_tag, 0, hw_sz); ^~~~~~ drivers/hwtracing/intel_th/msu.c:667:4: 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(&bdesc->hw_tag, 0, hw_sz); ^~~~~~ drivers/hwtracing/intel_th/msu.c:860:2: warning: Value stored to 'reg' is never read [clang-analyzer-deadcode.DeadStores] reg = ioread32(msc->reg_base + REG_MSU_MSC0STS); ^ drivers/hwtracing/intel_th/msu.c:860:2: note: Value stored to 'reg' is never read drivers/hwtracing/intel_th/msu.c:1209:4: 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(bdesc, 0, sizeof(*bdesc)); ^~~~~~ drivers/hwtracing/intel_th/msu.c:1209:4: 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(bdesc, 0, sizeof(*bdesc)); ^~~~~~ drivers/hwtracing/intel_th/msu.c:2086:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", msc->stop_on_full); ^~~~~~~ drivers/hwtracing/intel_th/msu.c:2086:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", msc->stop_on_full); ^~~~~~~ Suppressed 34 warnings (34 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. 48 warnings generated. drivers/staging/most/i2c/i2c.c:221: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(mbo->virt_address, msg, mbo->processed_length); ^~~~~~ drivers/staging/most/i2c/i2c.c:221: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(mbo->virt_address, msg, mbo->processed_length); ^~~~~~ drivers/staging/most/i2c/i2c.c:297:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(dev->name, sizeof(dev->name), "i2c-%d-%04x", ^~~~~~~~ drivers/staging/most/i2c/i2c.c:297:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(dev->name, sizeof(dev->name), "i2c-%d-%04x", ^~~~~~~~ Suppressed 46 warnings (46 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. 36 warnings generated. drivers/platform/goldfish/goldfish_pipe.c:667:3: 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(pipes, dev->pipes, sizeof(*pipes) * dev->pipes_capacity); ^~~~~~ drivers/platform/goldfish/goldfish_pipe.c:667:3: 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(pipes, dev->pipes, sizeof(*pipes) * dev->pipes_capacity); ^~~~~~ drivers/platform/goldfish/goldfish_pipe.c:791: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(miscdev, 0, sizeof(*miscdev)); ^~~~~~ drivers/platform/goldfish/goldfish_pipe.c:791: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(miscdev, 0, sizeof(*miscdev)); ^~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 36 warnings generated. >> drivers/input/keyboard/newtonkbd.c:81:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(nkbd->phys, sizeof(nkbd->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/keyboard/newtonkbd.c:81:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(nkbd->phys, sizeof(nkbd->phys), "%s/input0", serio->phys); ^~~~~~~~ >> drivers/input/keyboard/newtonkbd.c:82: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(nkbd->keycode, nkbd_keycode, sizeof(nkbd->keycode)); ^~~~~~ drivers/input/keyboard/newtonkbd.c:82: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(nkbd->keycode, nkbd_keycode, sizeof(nkbd->keycode)); ^~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 37 warnings generated. >> drivers/hwmon/max1111.c:101:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", to_spi_device(dev)->modalias); ^~~~~~~ drivers/hwmon/max1111.c:101:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", to_spi_device(dev)->modalias); ^~~~~~~ >> drivers/hwmon/max1111.c:119:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", ret * data->lsb); ^~~~~~~ drivers/hwmon/max1111.c:119:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", ret * data->lsb); ^~~~~~~ Suppressed 35 warnings (35 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. 49 warnings generated. >> drivers/hwmon/sht3x.c:268:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temperature); ^~~~~~~ drivers/hwmon/sht3x.c:268:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temperature); ^~~~~~~ drivers/hwmon/sht3x.c:279:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", data->humidity); ^~~~~~~ drivers/hwmon/sht3x.c:279:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", data->humidity); ^~~~~~~ >> drivers/hwmon/sht3x.c:356: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(position, commands->write_command, SHT3X_CMD_LENGTH); ^~~~~~ drivers/hwmon/sht3x.c:356: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(position, commands->write_command, SHT3X_CMD_LENGTH); ^~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 48 warnings generated. >> drivers/input/misc/da7280.c:565: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(haptics->snp_mem, 0, DA7280_SNP_MEM_SIZE); ^~~~~~ drivers/input/misc/da7280.c:565: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(haptics->snp_mem, 0, DA7280_SNP_MEM_SIZE); ^~~~~~ drivers/input/misc/da7280.c:887: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(haptics->snp_mem, 0, DA7280_SNP_MEM_SIZE); ^~~~~~ drivers/input/misc/da7280.c:887: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(haptics->snp_mem, 0, DA7280_SNP_MEM_SIZE); ^~~~~~ Suppressed 46 warnings (46 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. 48 warnings generated. fs/inode.c:407: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(mapping, 0, sizeof(*mapping)); ^~~~~~ fs/inode.c:407: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(mapping, 0, sizeof(*mapping)); ^~~~~~ fs/inode.c:419: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(inode, 0, sizeof(*inode)); ^~~~~~ fs/inode.c:419: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(inode, 0, sizeof(*inode)); ^~~~~~ Suppressed 46 warnings (46 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. 19 warnings generated. Suppressed 19 warnings (19 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. 22 warnings generated. Suppressed 22 warnings (22 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. 22 warnings generated. Suppressed 22 warnings (22 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. 21 warnings generated. Suppressed 21 warnings (21 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. 22 warnings generated. Suppressed 22 warnings (22 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. 19 warnings generated. Suppressed 19 warnings (19 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. 36 warnings generated. drivers/mtd/devices/mchp23k256.c:112: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(&transfer, 0, sizeof(transfer)); ^~~~~~ drivers/mtd/devices/mchp23k256.c:112: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(&transfer, 0, sizeof(transfer)); ^~~~~~ Suppressed 35 warnings (35 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. 36 warnings generated. drivers/input/misc/ad714x.c:206:20: warning: Division by zero [clang-analyzer-core.DivideZero] return (max_coord / (end_stage - start_stage)) * a_param / b_param; ^ drivers/input/misc/ad714x.c:948:14: note: Assuming 'i' is >= field 'button_num' for (i = 0; i < ad714x->hw->button_num; i++) ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:948:2: note: Loop condition is false. Execution continues on line 950 for (i = 0; i < ad714x->hw->button_num; i++) ^ drivers/input/misc/ad714x.c:950:14: note: Assuming 'i' is < field 'slider_num' for (i = 0; i < ad714x->hw->slider_num; i++) ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:950:2: note: Loop condition is true. Entering loop body for (i = 0; i < ad714x->hw->slider_num; i++) ^ drivers/input/misc/ad714x.c:951:3: note: Calling 'ad714x_slider_state_machine' ad714x_slider_state_machine(ad714x, i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:350:2: note: Control jumps to 'case JITTER:' at line 362 switch (sw->state) { ^ drivers/input/misc/ad714x.c:363:7: note: Assuming 'c_state' is equal to 'mask' if (c_state == mask) { ^~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:363:3: note: Taking true branch if (c_state == mask) { ^ drivers/input/misc/ad714x.c:366:4: note: Calling 'ad714x_slider_cal_abs_pos' ad714x_slider_cal_abs_pos(ad714x, idx); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:296:16: note: Calling 'ad714x_cal_abs_pos' sw->abs_pos = ad714x_cal_abs_pos(ad714x, hw->start_stage, hw->end_stage, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:183:6: note: Assuming 'highest_stage' is equal to 'start_stage' if (highest_stage == start_stage) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:183:2: note: Taking true branch if (highest_stage == start_stage) { ^ drivers/input/misc/ad714x.c:206:20: note: Division by zero return (max_coord / (end_stage - start_stage)) * a_param / b_param; ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:1014:2: warning: Value stored to 'drv_mem' is never read [clang-analyzer-deadcode.DeadStores] drv_mem += sizeof(*bt_drv) * ad714x->hw->button_num; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/misc/ad714x.c:1014:2: note: Value stored to 'drv_mem' is never read drv_mem += sizeof(*bt_drv) * ad714x->hw->button_num; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 34 warnings (34 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. Suppressed 46 warnings (46 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. 47 warnings generated. Suppressed 47 warnings (47 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. 47 warnings generated. >> drivers/hwmon/tc74.c:95:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->temp_input * 1000); ^~~~~~~ drivers/hwmon/tc74.c:95:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->temp_input * 1000); ^~~~~~~ Suppressed 46 warnings (46 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. 49 warnings generated. drivers/hwmon/emc6w201.c:186:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", ^~~~~~~ drivers/hwmon/emc6w201.c:186:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", ^~~~~~~ drivers/hwmon/emc6w201.c:225:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", (int)data->temp[sf][nr] * 1000); ^~~~~~~ drivers/hwmon/emc6w201.c:225:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", (int)data->temp[sf][nr] * 1000); ^~~~~~~ drivers/hwmon/emc6w201.c:270:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%u\n", rpm); ^~~~~~~ drivers/hwmon/emc6w201.c:270:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%u\n", rpm); ^~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 51 warnings generated. Suppressed 51 warnings (51 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. 49 warnings generated. fs/xfs/xfs_trans_buf.c:575: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(bip->bli_formats[i].blf_data_map, 0, ^~~~~~ fs/xfs/xfs_trans_buf.c:575: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(bip->bli_formats[i].blf_data_map, 0, ^~~~~~ Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 49 warnings generated. >> fs/xfs/scrub/agheader.c:726: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(&sai, 0, sizeof(sai)); ^~~~~~ fs/xfs/scrub/agheader.c:726: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(&sai, 0, sizeof(sai)); ^~~~~~ Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 49 warnings generated. >> fs/xfs/scrub/attr.c:484: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(&sx, 0, sizeof(sx)); ^~~~~~ fs/xfs/scrub/attr.c:484: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(&sx, 0, sizeof(sx)); ^~~~~~ Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. Suppressed 46 warnings (46 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. 47 warnings generated. mm/migrate.c:1557:3: warning: Value stored to 'gfp_mask' is never read [clang-analyzer-deadcode.DeadStores] gfp_mask |= GFP_TRANSHUGE; ^ mm/migrate.c:1557:3: note: Value stored to 'gfp_mask' is never read Suppressed 46 warnings (46 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. 36 warnings generated. drivers/input/keyboard/lkkbd.c:627: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(lk->keycode, lkkbd_keycode, sizeof(lk->keycode)); ^~~~~~ drivers/input/keyboard/lkkbd.c:627: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(lk->keycode, lkkbd_keycode, sizeof(lk->keycode)); ^~~~~~ drivers/input/keyboard/lkkbd.c:630:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(lk->phys, sizeof(lk->phys), "%s/input0", serio->phys); ^~~~~~~~ drivers/input/keyboard/lkkbd.c:630:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(lk->phys, sizeof(lk->phys), "%s/input0", serio->phys); ^~~~~~~~ Suppressed 34 warnings (34 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. 35 warnings generated. drivers/gnss/core.c:358:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", gnss_type_name(gdev)); ^~~~~~~ drivers/gnss/core.c:358:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", gnss_type_name(gdev)); ^~~~~~~ Suppressed 34 warnings (34 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. 36 warnings generated. drivers/gnss/serial.c:173:24: warning: Value stored to 'serdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct serdev_device *serdev = gserial->serdev; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/gnss/serial.c:173:24: note: Value stored to 'serdev' during its initialization is never read struct serdev_device *serdev = gserial->serdev; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/gnss/serial.c:202:24: warning: Value stored to 'serdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct serdev_device *serdev = gserial->serdev; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/gnss/serial.c:202:24: note: Value stored to 'serdev' during its initialization is never read struct serdev_device *serdev = gserial->serdev; ^~~~~~ ~~~~~~~~~~~~~~~ Suppressed 34 warnings (34 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. 47 warnings generated. drivers/gnss/sirf.c:191:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &data->serdev->dev; ^~~ ~~~~~~~~~~~~~~~~~~ drivers/gnss/sirf.c:191:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &data->serdev->dev; ^~~ ~~~~~~~~~~~~~~~~~~ Suppressed 46 warnings (46 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. Suppressed 46 warnings (46 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 30 warnings generated. Suppressed 30 warnings (30 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. 47 warnings generated. >> drivers/hwmon/lineage-pem.c:143: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, block_buffer, data_len); ^~~~~~ drivers/hwmon/lineage-pem.c:143: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, block_buffer, data_len); ^~~~~~ Suppressed 46 warnings (46 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. 30 warnings generated. Suppressed 30 warnings (30 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. 36 warnings generated. drivers/input/keyboard/bcm-keypad.c:179:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores] val &= ~KPCR_ENABLE; ^ ~~~~~~~~~~~~ drivers/input/keyboard/bcm-keypad.c:179:2: note: Value stored to 'val' is never read val &= ~KPCR_ENABLE; ^ ~~~~~~~~~~~~ Suppressed 35 warnings (34 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 49 warnings generated. drivers/md/dm-bio-prison-v2.c:82: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(cell, 0, sizeof(*cell)); ^~~~~~ drivers/md/dm-bio-prison-v2.c:82: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(cell, 0, sizeof(*cell)); ^~~~~~ drivers/md/dm-bio-prison-v2.c:83: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(&cell->key, key, sizeof(cell->key)); ^~~~~~ drivers/md/dm-bio-prison-v2.c:83: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(&cell->key, key, sizeof(cell->key)); ^~~~~~ Suppressed 47 warnings (47 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. 32 warnings generated. >> drivers/input/mousedev.c:280:5: 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(p, 0, sizeof(struct mousedev_motion)); ^~~~~~ drivers/input/mousedev.c:280:5: 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(p, 0, sizeof(struct mousedev_motion)); ^~~~~~ >> drivers/input/mousedev.c:746: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, client->ps2 + client->bufsiz - client->buffer, count); ^~~~~~ drivers/input/mousedev.c:746: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, client->ps2 + client->bufsiz - client->buffer, count); ^~~~~~ Suppressed 30 warnings (30 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. drivers/bcma/scan.c:450:2: warning: Call to function 'snprintf' 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 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] snprintf(chip_id, ARRAY_SIZE(chip_id), ^~~~~~~~ drivers/bcma/scan.c:450:2: note: Call to function 'snprintf' 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 'snprintf_s' in case of C11 snprintf(chip_id, ARRAY_SIZE(chip_id), ^~~~~~~~ Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 34 warnings generated. Suppressed 34 warnings (34 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. 35 warnings generated. drivers/hsi/hsi_core.c:23:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "hsi:%s\n", dev_name(dev)); ^~~~~~~ drivers/hsi/hsi_core.c:23:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "hsi:%s\n", dev_name(dev)); ^~~~~~~ Suppressed 34 warnings (34 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. 69 warnings generated. Suppressed 69 warnings (69 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 48 warnings generated. Suppressed 48 warnings (48 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. 47 warnings generated. Suppressed 47 warnings (47 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. 50 warnings generated. fs/xfs/xfs_buf.c:1684: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(page_address(page) + page_offset, 0, csize); ^~~~~~ fs/xfs/xfs_buf.c:1684: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(page_address(page) + page_offset, 0, csize); ^~~~~~ Suppressed 49 warnings (49 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. 48 warnings generated. Suppressed 48 warnings (48 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. 49 warnings generated. Suppressed 49 warnings (49 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. 49 warnings generated. drivers/hwmon/powr1220.c:181:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", adc_val); ^~~~~~~ drivers/hwmon/powr1220.c:181:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", adc_val); ^~~~~~~ drivers/hwmon/powr1220.c:191:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%d\n", data->adc_maxes[attr->index]); ^~~~~~~ drivers/hwmon/powr1220.c:191:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11 return sprintf(buf, "%d\n", data->adc_maxes[attr->index]); ^~~~~~~ drivers/hwmon/powr1220.c:201:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] return sprintf(buf, "%s\n", input_names[attr->index]); ^~~~~~~ drivers/hwmon/powr1220.c:201:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 return sprintf(buf, "%s\n", input_names[attr->index]); ^~~~~~~ Suppressed 46 warnings (46 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. vim +360 fs/pstore/platform.c ee1d267423a1f8 Geliang Tang 2015-10-20 343 b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 344 /* b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 345 * Called when compression fails, since the printk buffer b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 346 * would be fetched for compression calling it again when b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 347 * compression fails would have moved the iterator of b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 348 * printk buffer which results in fetching old contents. b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 349 * Copy the recent messages from big_oops_buf to psinfo->buf b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 350 */ b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 351 static size_t copy_kmsg_to_buffer(int hsize, size_t len) b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 352 { b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 353 size_t total_len; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 354 size_t diff; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 355 b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 356 total_len = hsize + len; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 357 b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 358 if (total_len > psinfo->bufsize) { b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 359 diff = total_len - psinfo->bufsize + hsize; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 @360 memcpy(psinfo->buf, big_oops_buf, hsize); b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 @361 memcpy(psinfo->buf + hsize, big_oops_buf + diff, b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 362 psinfo->bufsize - hsize); b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 363 total_len = psinfo->bufsize; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 364 } else b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 @365 memcpy(psinfo->buf, big_oops_buf, total_len); b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 366 b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 367 return total_len; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 368 } b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 369 e581ca813a40a4 Kees Cook 2017-05-19 370 void pstore_record_init(struct pstore_record *record, e581ca813a40a4 Kees Cook 2017-05-19 371 struct pstore_info *psinfo) e581ca813a40a4 Kees Cook 2017-05-19 372 { e581ca813a40a4 Kees Cook 2017-05-19 @373 memset(record, 0, sizeof(*record)); e581ca813a40a4 Kees Cook 2017-05-19 374 e581ca813a40a4 Kees Cook 2017-05-19 375 record->psi = psinfo; c7f3c595f6ff7a Kees Cook 2017-05-19 376 c7f3c595f6ff7a Kees Cook 2017-05-19 377 /* Report zeroed timestamp if called before timekeeping has resumed. */ 7aaa822ed06071 Kees Cook 2018-05-14 378 record->time = ns_to_timespec64(ktime_get_real_fast_ns()); e581ca813a40a4 Kees Cook 2017-05-19 379 } e581ca813a40a4 Kees Cook 2017-05-19 380 ca01d6dd2d7a26 Tony Luck 2010-12-28 381 /* 0eed84ffb094bb Kees Cook 2018-11-01 382 * callback from kmsg_dump. Save as much as we can (up to kmsg_bytes) from the 0eed84ffb094bb Kees Cook 2018-11-01 383 * end of the buffer. ca01d6dd2d7a26 Tony Luck 2010-12-28 384 */ ca01d6dd2d7a26 Tony Luck 2010-12-28 385 static void pstore_dump(struct kmsg_dumper *dumper, e2ae715d66bf4b Kay Sievers 2012-06-15 386 enum kmsg_dump_reason reason) ca01d6dd2d7a26 Tony Luck 2010-12-28 387 { f9f3f02db98bbe John Ogness 2021-03-03 388 struct kmsg_dump_iter iter; e2ae715d66bf4b Kay Sievers 2012-06-15 389 unsigned long total = 0; 381b872cf7942a Seiji Aguchi 2012-03-16 390 const char *why; b94fdd077eef5e Matthew Garrett 2011-07-21 391 unsigned int part = 1; e2ae715d66bf4b Kay Sievers 2012-06-15 392 int ret; ca01d6dd2d7a26 Tony Luck 2010-12-28 393 fb13cb8a048210 Kees Cook 2020-05-07 394 why = kmsg_dump_reason_str(reason); 9f6af27fb693c6 Tony Luck 2011-03-22 395 ea84b580b95521 Kees Cook 2018-11-30 396 if (down_trylock(&psinfo->buf_lock)) { ea84b580b95521 Kees Cook 2018-11-30 397 /* Failed to acquire lock: give up if we cannot wait. */ ea84b580b95521 Kees Cook 2018-11-30 398 if (pstore_cannot_wait(reason)) { ea84b580b95521 Kees Cook 2018-11-30 399 pr_err("dump skipped in %s path: may corrupt error record\n", ea84b580b95521 Kees Cook 2018-11-30 400 in_nmi() ? "NMI" : why); 959217c84c2765 Li Pengcheng 2016-11-05 401 return; 9f244e9cfd70c7 Seiji Aguchi 2013-01-11 402 } ea84b580b95521 Kees Cook 2018-11-30 403 if (down_interruptible(&psinfo->buf_lock)) { ea84b580b95521 Kees Cook 2018-11-30 404 pr_err("could not grab semaphore?!\n"); ea84b580b95521 Kees Cook 2018-11-30 405 return; 98e44fda2ea19c Namhyung Kim 2016-05-18 406 } ea84b580b95521 Kees Cook 2018-11-30 407 } ea84b580b95521 Kees Cook 2018-11-30 408 f9f3f02db98bbe John Ogness 2021-03-03 409 kmsg_dump_rewind(&iter); f9f3f02db98bbe John Ogness 2021-03-03 410 ca01d6dd2d7a26 Tony Luck 2010-12-28 411 oopscount++; ca01d6dd2d7a26 Tony Luck 2010-12-28 412 while (total < kmsg_bytes) { e2ae715d66bf4b Kay Sievers 2012-06-15 413 char *dst; 76cc9580e3fbd3 Kees Cook 2017-03-03 414 size_t dst_size; 76cc9580e3fbd3 Kees Cook 2017-03-03 415 int header_size; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 416 int zipped_len = -1; 76cc9580e3fbd3 Kees Cook 2017-03-03 417 size_t dump_size; e581ca813a40a4 Kees Cook 2017-05-19 418 struct pstore_record record; e581ca813a40a4 Kees Cook 2017-05-19 419 e581ca813a40a4 Kees Cook 2017-05-19 420 pstore_record_init(&record, psinfo); e581ca813a40a4 Kees Cook 2017-05-19 421 record.type = PSTORE_TYPE_DMESG; e581ca813a40a4 Kees Cook 2017-05-19 422 record.count = oopscount; e581ca813a40a4 Kees Cook 2017-05-19 423 record.reason = reason; e581ca813a40a4 Kees Cook 2017-05-19 424 record.part = part; e581ca813a40a4 Kees Cook 2017-05-19 425 record.buf = psinfo->buf; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 426 ea84b580b95521 Kees Cook 2018-11-30 427 if (big_oops_buf) { b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 428 dst = big_oops_buf; 76cc9580e3fbd3 Kees Cook 2017-03-03 429 dst_size = big_oops_buf_sz; 235f6d157d43a7 Namhyung Kim 2016-05-18 430 } else { 235f6d157d43a7 Namhyung Kim 2016-05-18 431 dst = psinfo->buf; 76cc9580e3fbd3 Kees Cook 2017-03-03 432 dst_size = psinfo->bufsize; 235f6d157d43a7 Namhyung Kim 2016-05-18 433 } 235f6d157d43a7 Namhyung Kim 2016-05-18 434 76cc9580e3fbd3 Kees Cook 2017-03-03 435 /* Write dump header. */ 76cc9580e3fbd3 Kees Cook 2017-03-03 @436 header_size = snprintf(dst, dst_size, "%s#%d Part%u\n", why, 76cc9580e3fbd3 Kees Cook 2017-03-03 437 oopscount, part); 76cc9580e3fbd3 Kees Cook 2017-03-03 438 dst_size -= header_size; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 439 76cc9580e3fbd3 Kees Cook 2017-03-03 440 /* Write dump contents. */ f9f3f02db98bbe John Ogness 2021-03-03 441 if (!kmsg_dump_get_buffer(&iter, true, dst + header_size, 76cc9580e3fbd3 Kees Cook 2017-03-03 442 dst_size, &dump_size)) b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 443 break; e2ae715d66bf4b Kay Sievers 2012-06-15 444 ea84b580b95521 Kees Cook 2018-11-30 445 if (big_oops_buf) { b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 446 zipped_len = pstore_compress(dst, psinfo->buf, 76cc9580e3fbd3 Kees Cook 2017-03-03 447 header_size + dump_size, 76cc9580e3fbd3 Kees Cook 2017-03-03 448 psinfo->bufsize); b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 449 b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 450 if (zipped_len > 0) { 76cc9580e3fbd3 Kees Cook 2017-03-03 451 record.compressed = true; 76cc9580e3fbd3 Kees Cook 2017-03-03 452 record.size = zipped_len; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 453 } else { 76cc9580e3fbd3 Kees Cook 2017-03-03 454 record.size = copy_kmsg_to_buffer(header_size, 76cc9580e3fbd3 Kees Cook 2017-03-03 455 dump_size); b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 456 } b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 457 } else { 76cc9580e3fbd3 Kees Cook 2017-03-03 458 record.size = header_size + dump_size; b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 459 } b0aad7a99c1df9 Aruna Balakrishnaiah 2013-08-16 460 76cc9580e3fbd3 Kees Cook 2017-03-03 461 ret = psinfo->write(&record); 78c83c828c043f Kees Cook 2020-05-05 462 if (ret == 0 && reason == KMSG_DUMP_OOPS) { 6dda9266913ad5 Tony Luck 2011-08-11 463 pstore_new_entry = 1; 78c83c828c043f Kees Cook 2020-05-05 464 pstore_timer_kick(); 78c83c828c043f Kees Cook 2020-05-05 465 } e2ae715d66bf4b Kay Sievers 2012-06-15 466 76cc9580e3fbd3 Kees Cook 2017-03-03 467 total += record.size; 56280682ceeef7 Matthew Garrett 2011-07-21 468 part++; ca01d6dd2d7a26 Tony Luck 2010-12-28 469 } ea84b580b95521 Kees Cook 2018-11-30 470 ea84b580b95521 Kees Cook 2018-11-30 471 up(&psinfo->buf_lock); ca01d6dd2d7a26 Tony Luck 2010-12-28 472 } ca01d6dd2d7a26 Tony Luck 2010-12-28 473 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org