CC: llvm(a)lists.linux.dev CC: kbuild-all(a)lists.01.org BCC: lkp(a)intel.com CC: linux-kernel(a)vger.kernel.org TO: Arnd Bergmann CC: Masahiro Yamada CC: Alex Shi CC: Nick Desaulniers CC: Miguel Ojeda CC: Nathan Chancellor tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: feb9c5e19e913b53cb536a7aa7c9f20107bb51ec commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 Kbuild: move to -std=gnu11 date: 8 weeks ago :::::: branch date: 11 hours ago :::::: commit date: 8 weeks ago config: mips-randconfig-c004-20220508 (https://download.01.org/0day-ci/archive/20220511/202205111251.wBKtHLFV-lkp(a)intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af4cf1c6b8ed0d8102fc5e69acdc2fcbbcdaa9a7) 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 mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c07082a810fbb9db303a2b66b66b8d7e588b53 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 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 >>) ^~~~~~ crypto/skcipher.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(walk->oiv, walk->iv, walk->ivsize); ^~~~~~ crypto/skcipher.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(walk->oiv, walk->iv, walk->ivsize); ^~~~~~ crypto/skcipher.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(tmp, walk->src.virt.addr, walk->nbytes); ^~~~~~ crypto/skcipher.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(tmp, walk->src.virt.addr, walk->nbytes); ^~~~~~ crypto/skcipher.c:428: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] walk->iv = memcpy(iv, walk->iv, walk->ivsize); ^~~~~~ crypto/skcipher.c:428: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 walk->iv = memcpy(iv, walk->iv, walk->ivsize); ^~~~~~ crypto/skcipher.c:588:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memcpy(alignbuffer, key, keylen); ^~~~~~ crypto/skcipher.c:588:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 memcpy(alignbuffer, key, keylen); ^~~~~~ Suppressed 59 warnings (59 in non-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/proc/thread_self.c:25: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, "%u/task/%u", tgid, pid); ^~~~~~~ fs/proc/thread_self.c:25: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, "%u/task/%u", tgid, pid); ^~~~~~~ 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. fs/proc/vmcore.c:154: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, nr_bytes); ^~~~~~ fs/proc/vmcore.c:154: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, nr_bytes); ^~~~~~ fs/proc/vmcore.c:244: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(target, src, size); ^~~~~~ fs/proc/vmcore.c:244: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(target, src, size); ^~~~~~ fs/proc/vmcore.c:901:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, &phdr, sizeof(phdr)); ^~~~~~ fs/proc/vmcore.c:901:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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, &phdr, sizeof(phdr)); ^~~~~~ fs/proc/vmcore.c:907: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(tmp, tmp+i, ((*elfsz)-sizeof(Elf64_Ehdr)-sizeof(Elf64_Phdr))); ^~~~~~~ fs/proc/vmcore.c:907: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(tmp, tmp+i, ((*elfsz)-sizeof(Elf64_Ehdr)-sizeof(Elf64_Phdr))); ^~~~~~~ fs/proc/vmcore.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(elfptr + *elfsz, 0, i); ^~~~~~ fs/proc/vmcore.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(elfptr + *elfsz, 0, i); ^~~~~~ fs/proc/vmcore.c:1092:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, &phdr, sizeof(phdr)); ^~~~~~ fs/proc/vmcore.c:1092:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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, &phdr, sizeof(phdr)); ^~~~~~ fs/proc/vmcore.c:1098: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(tmp, tmp+i, ((*elfsz)-sizeof(Elf32_Ehdr)-sizeof(Elf32_Phdr))); ^~~~~~~ fs/proc/vmcore.c:1098: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(tmp, tmp+i, ((*elfsz)-sizeof(Elf32_Ehdr)-sizeof(Elf32_Phdr))); ^~~~~~~ fs/proc/vmcore.c:1099:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(elfptr + *elfsz, 0, i); ^~~~~~ fs/proc/vmcore.c:1099:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(elfptr + *elfsz, 0, i); ^~~~~~ fs/proc/vmcore.c:1390: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 *)vdd_hdr->name, VMCOREDD_NOTE_NAME, ^~~~~~~ fs/proc/vmcore.c:1390: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 *)vdd_hdr->name, VMCOREDD_NOTE_NAME, ^~~~~~~ fs/proc/vmcore.c:1392:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memcpy(vdd_hdr->dump_name, data->dump_name, sizeof(vdd_hdr->dump_name)); ^~~~~~ fs/proc/vmcore.c:1392:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 memcpy(vdd_hdr->dump_name, data->dump_name, sizeof(vdd_hdr->dump_name)); ^~~~~~ 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. 32 warnings generated. >> arch/mips/kernel/proc.c:61: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(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", ^~~~~~~ arch/mips/kernel/proc.c:61: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(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", ^~~~~~~ arch/mips/kernel/proc.c:296: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(fmt, "VCE%%c exceptions\t\t: %s\n", ^~~~~~~ arch/mips/kernel/proc.c:296: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(fmt, "VCE%%c exceptions\t\t: %s\n", ^~~~~~~ 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. 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. 40 warnings generated. arch/mips/kernel/crash_dump.c:29: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/mips/kernel/crash_dump.c:29: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 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. 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. 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. 81 warnings generated. kernel/bpf/core.c:237: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(fp, fp_old, fp_old->pages * PAGE_SIZE); ^~~~~~ kernel/bpf/core.c:237: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(fp, fp_old, fp_old->pages * PAGE_SIZE); ^~~~~~ kernel/bpf/core.c:284:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(ws, 0, sizeof(ws)); ^~~~~~ kernel/bpf/core.c:284:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(ws, 0, sizeof(ws)); ^~~~~~ kernel/bpf/core.c:311:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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[psize], 0, raw_size - psize); ^~~~~~ kernel/bpf/core.c:311:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in 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[psize], 0, raw_size - psize); ^~~~~~ kernel/bpf/core.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(fp->tag, result, sizeof(fp->tag)); ^~~~~~ kernel/bpf/core.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(fp->tag, result, sizeof(fp->tag)); ^~~~~~ kernel/bpf/core.c:452: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(prog->insnsi + off, patch, sizeof(*patch)); ^~~~~~ kernel/bpf/core.c:452: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(prog->insnsi + off, patch, sizeof(*patch)); ^~~~~~ kernel/bpf/core.c:488: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(prog_adj->insnsi + off + len, prog_adj->insnsi + off + 1, ^~~~~~~ kernel/bpf/core.c:488: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(prog_adj->insnsi + off + len, prog_adj->insnsi + off + 1, ^~~~~~~ kernel/bpf/core.c:490:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memcpy(prog_adj->insnsi + off, patch, sizeof(*patch) * len); ^~~~~~ kernel/bpf/core.c:490:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 memcpy(prog_adj->insnsi + off, patch, sizeof(*patch) * len); ^~~~~~ kernel/bpf/core.c:508: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(prog->insnsi + off, prog->insnsi + off + cnt, ^~~~~~~ kernel/bpf/core.c:508: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(prog->insnsi + off, prog->insnsi + off + cnt, ^~~~~~~ kernel/bpf/core.c:1370:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, size); ^~~~~~ kernel/bpf/core.c:1370:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in 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, size); ^~~~~~ Suppressed 72 warnings (71 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. crypto/chacha20poly1305.c:89:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, &leicb, sizeof(leicb)); ^~~~~~ crypto/chacha20poly1305.c:89:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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, &leicb, sizeof(leicb)); -- ^~~~~~~~ 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); ^ ~~~~~~~~~~~~~~~ include/linux/log2.h:67:13: warning: 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' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << (fls_long(n) - 1); ^ lib/kfifo.c:71:2: note: Taking true branch if (!is_power_of_2(size)) ^ lib/kfifo.c:72:10: note: '?' condition is false size = rounddown_pow_of_two(size); ^ include/linux/log2.h:193:2: note: expanded from macro 'rounddown_pow_of_two' __builtin_constant_p(n) ? ( \ ^ lib/kfifo.c:72:10: note: Calling '__rounddown_pow_of_two' size = rounddown_pow_of_two(size); ^ include/linux/log2.h:195:2: note: expanded from macro 'rounddown_pow_of_two' __rounddown_pow_of_two(n) \ ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/log2.h:67:13: 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' return 1UL << (fls_long(n) - 1); ^ ~~~~~~~~~~~~~~~~~ lib/kfifo.c:104:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memcpy(fifo->data + off, src, l); ^~~~~~ lib/kfifo.c:104:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 memcpy(fifo->data + off, src, l); ^~~~~~ lib/kfifo.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(fifo->data, src + l, len - l); ^~~~~~ lib/kfifo.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(fifo->data, src + l, len - l); ^~~~~~ lib/kfifo.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(dst, fifo->data + off, l); ^~~~~~ lib/kfifo.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(dst, fifo->data + off, l); ^~~~~~ lib/kfifo.c:144:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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 + l, fifo->data, len - l); ^~~~~~ lib/kfifo.c:144:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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 + l, fifo->data, len - l); ^~~~~~ 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. 38 warnings generated. crypto/wp512.c:993:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] memset(wctx->bitLength, 0, 32); ^~~~~~ crypto/wp512.c:993:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 memset(wctx->bitLength, 0, 32); ^~~~~~ crypto/wp512.c:1079: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[bufferPos], 0, WP512_BLOCK_SIZE - bufferPos); ^~~~~~ crypto/wp512.c:1079: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[bufferPos], 0, WP512_BLOCK_SIZE - bufferPos); ^~~~~~ crypto/wp512.c:1084: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[bufferPos], 0, ^~~~~~ crypto/wp512.c:1084: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[bufferPos], 0, ^~~~~~ crypto/wp512.c:1087:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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[WP512_BLOCK_SIZE - WP512_LENGTHBYTES], ^~~~~~ crypto/wp512.c:1087:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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[WP512_BLOCK_SIZE - WP512_LENGTHBYTES], ^~~~~~ crypto/wp512.c:1103:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, D, WP384_DIGEST_SIZE); ^~~~~~ crypto/wp512.c:1103:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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, D, WP384_DIGEST_SIZE); ^~~~~~ crypto/wp512.c:1114:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, D, WP256_DIGEST_SIZE); ^~~~~~ crypto/wp512.c:1114:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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, D, WP256_DIGEST_SIZE); ^~~~~~ 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. 32 warnings generated. >> arch/mips/kernel/proc.c:61: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(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", ^~~~~~~ arch/mips/kernel/proc.c:61: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(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", ^~~~~~~ arch/mips/kernel/proc.c:296: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(fmt, "VCE%%c exceptions\t\t: %s\n", ^~~~~~~ arch/mips/kernel/proc.c:296: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(fmt, "VCE%%c exceptions\t\t: %s\n", ^~~~~~~ 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. 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. 40 warnings generated. arch/mips/kernel/crash_dump.c:29: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/mips/kernel/crash_dump.c:29: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 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. 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. 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. 49 warnings generated. crypto/chacha20poly1305.c:89:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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, &leicb, sizeof(leicb)); ^~~~~~ crypto/chacha20poly1305.c:89:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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, &leicb, sizeof(leicb)); ^~~~~~ crypto/chacha20poly1305.c:90:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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 + sizeof(leicb), ctx->salt, ctx->saltlen); ^~~~~~ crypto/chacha20poly1305.c:90:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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 + sizeof(leicb), ctx->salt, ctx->saltlen); ^~~~~~ crypto/chacha20poly1305.c:91:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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 + sizeof(leicb) + ctx->saltlen, req->iv, ^~~~~~ crypto/chacha20poly1305.c:91:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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 + sizeof(leicb) + ctx->saltlen, req->iv, ^~~~~~ crypto/chacha20poly1305.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(preq->pad, 0, sizeof(preq->pad)); ^~~~~~ crypto/chacha20poly1305.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(preq->pad, 0, sizeof(preq->pad)); ^~~~~~ crypto/chacha20poly1305.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(preq->pad, 0, sizeof(preq->pad)); ^~~~~~ crypto/chacha20poly1305.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(preq->pad, 0, sizeof(preq->pad)); ^~~~~~ crypto/chacha20poly1305.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(rctx->key, 0, sizeof(rctx->key)); ^~~~~~ crypto/chacha20poly1305.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(rctx->key, 0, sizeof(rctx->key)); ^~~~~~ crypto/chacha20poly1305.c:483:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with 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->salt, key + keylen, ctx->saltlen); ^~~~~~ crypto/chacha20poly1305.c:483:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in 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->salt, key + keylen, ctx->saltlen); ^~~~~~ crypto/chacha20poly1305.c:601: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/chacha20poly1305.c:601: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/chacha20poly1305.c:605: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/chacha20poly1305.c:605: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 40 warnings (40 in non-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. vim +61 arch/mips/kernel/proc.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 49 ^1da177e4c3f41 Linus Torvalds 2005-04-16 50 /* ^1da177e4c3f41 Linus Torvalds 2005-04-16 51 * For the first processor also print the system type ^1da177e4c3f41 Linus Torvalds 2005-04-16 52 */ 487d70d0b8bd1c Gabor Juhos 2010-11-23 53 if (n == 0) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 54 seq_printf(m, "system type\t\t: %s\n", get_system_type()); 487d70d0b8bd1c Gabor Juhos 2010-11-23 55 if (mips_get_machine_name()) 487d70d0b8bd1c Gabor Juhos 2010-11-23 56 seq_printf(m, "machine\t\t\t: %s\n", 487d70d0b8bd1c Gabor Juhos 2010-11-23 57 mips_get_machine_name()); 487d70d0b8bd1c Gabor Juhos 2010-11-23 58 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 59 ^1da177e4c3f41 Linus Torvalds 2005-04-16 60 seq_printf(m, "processor\t\t: %ld\n", n); ^1da177e4c3f41 Linus Torvalds 2005-04-16 @61 sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", e04582b7bc70b4 Atsushi Nemoto 2006-10-09 62 cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : ""); e47c659b55aff7 Johannes Dickgreber 2008-10-13 63 seq_printf(m, fmt, __cpu_name[n], ^1da177e4c3f41 Linus Torvalds 2005-04-16 64 (version >> 4) & 0x0f, version & 0x0f, ^1da177e4c3f41 Linus Torvalds 2005-04-16 65 (fp_vers >> 4) & 0x0f, fp_vers & 0x0f); 5636919b5c909f Ralf Baechle 2009-02-28 66 seq_printf(m, "BogoMIPS\t\t: %u.%02u\n", 0ac354801a8791 Ralf Baechle 2005-02-21 67 cpu_data[n].udelay_val / (500000/HZ), 0ac354801a8791 Ralf Baechle 2005-02-21 68 (cpu_data[n].udelay_val / (5000/HZ)) % 100); ^1da177e4c3f41 Linus Torvalds 2005-04-16 69 seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no"); ^1da177e4c3f41 Linus Torvalds 2005-04-16 70 seq_printf(m, "microsecond timers\t: %s\n", ^1da177e4c3f41 Linus Torvalds 2005-04-16 71 cpu_has_counter ? "yes" : "no"); 31aa36658a1232 Karl-Johan Karlsson 2006-10-08 72 seq_printf(m, "tlb_entries\t\t: %d\n", cpu_data[n].tlbsize); ^1da177e4c3f41 Linus Torvalds 2005-04-16 73 seq_printf(m, "extra interrupt vector\t: %s\n", ^1da177e4c3f41 Linus Torvalds 2005-04-16 74 cpu_has_divec ? "yes" : "no"); 654f57bfb46799 David Daney 2008-09-23 75 seq_printf(m, "hardware watchpoint\t: %s", 654f57bfb46799 David Daney 2008-09-23 76 cpu_has_watch ? "yes, " : "no\n"); 654f57bfb46799 David Daney 2008-09-23 77 if (cpu_has_watch) { 654f57bfb46799 David Daney 2008-09-23 78 seq_printf(m, "count: %d, address/irw mask: [", 654f57bfb46799 David Daney 2008-09-23 79 cpu_data[n].watch_reg_count); 654f57bfb46799 David Daney 2008-09-23 80 for (i = 0; i < cpu_data[n].watch_reg_count; i++) 654f57bfb46799 David Daney 2008-09-23 81 seq_printf(m, "%s0x%04x", i ? ", " : "", 654f57bfb46799 David Daney 2008-09-23 82 cpu_data[n].watch_reg_masks[i]); 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 83 seq_puts(m, "]\n"); 654f57bfb46799 David Daney 2008-09-23 84 } 41315b6ec108e9 Aaro Koskinen 2013-12-31 85 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 86 seq_puts(m, "isa\t\t\t:"); e5f5a5b06e51a3 Maciej W. Rozycki 2017-07-08 87 if (cpu_has_mips_1) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 88 seq_puts(m, " mips1"); a96102be700f87 Steven J. Hill 2012-12-07 89 if (cpu_has_mips_2) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 90 seq_puts(m, " mips2"); a96102be700f87 Steven J. Hill 2012-12-07 91 if (cpu_has_mips_3) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 92 seq_puts(m, " mips3"); a96102be700f87 Steven J. Hill 2012-12-07 93 if (cpu_has_mips_4) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 94 seq_puts(m, " mips4"); a96102be700f87 Steven J. Hill 2012-12-07 95 if (cpu_has_mips_5) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 96 seq_puts(m, " mips5"); a96102be700f87 Steven J. Hill 2012-12-07 97 if (cpu_has_mips32r1) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 98 seq_puts(m, " mips32r1"); a96102be700f87 Steven J. Hill 2012-12-07 99 if (cpu_has_mips32r2) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 100 seq_puts(m, " mips32r2"); ab7c01fdc3cfe0 Serge Semin 2020-05-21 101 if (cpu_has_mips32r5) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 102 seq_puts(m, " mips32r5"); 515a6393dbac4f Markos Chandras 2014-11-14 103 if (cpu_has_mips32r6) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 104 seq_puts(m, " mips32r6"); a96102be700f87 Steven J. Hill 2012-12-07 105 if (cpu_has_mips64r1) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 106 seq_puts(m, " mips64r1"); a96102be700f87 Steven J. Hill 2012-12-07 107 if (cpu_has_mips64r2) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 108 seq_puts(m, " mips64r2"); ab7c01fdc3cfe0 Serge Semin 2020-05-21 109 if (cpu_has_mips64r5) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 110 seq_puts(m, " mips64r5"); 515a6393dbac4f Markos Chandras 2014-11-14 111 if (cpu_has_mips64r6) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 112 seq_puts(m, " mips64r6"); 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 113 seq_puts(m, "\n"); 981ef0de49869c Ralf Baechle 2012-08-20 114 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 115 seq_puts(m, "ASEs implemented\t:"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 116 if (cpu_has_mips16) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 117 seq_puts(m, " mips16"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 118 if (cpu_has_mips16e2) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 119 seq_puts(m, " mips16e2"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 120 if (cpu_has_mdmx) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 121 seq_puts(m, " mdmx"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 122 if (cpu_has_mips3d) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 123 seq_puts(m, " mips3d"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 124 if (cpu_has_smartmips) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 125 seq_puts(m, " smartmips"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 126 if (cpu_has_dsp) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 127 seq_puts(m, " dsp"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 128 if (cpu_has_dsp2) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 129 seq_puts(m, " dsp2"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 130 if (cpu_has_dsp3) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 131 seq_puts(m, " dsp3"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 132 if (cpu_has_mipsmt) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 133 seq_puts(m, " mt"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 134 if (cpu_has_mmips) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 135 seq_puts(m, " micromips"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 136 if (cpu_has_vz) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 137 seq_puts(m, " vz"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 138 if (cpu_has_msa) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 139 seq_puts(m, " msa"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 140 if (cpu_has_eva) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 141 seq_puts(m, " eva"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 142 if (cpu_has_htw) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 143 seq_puts(m, " htw"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 144 if (cpu_has_xpa) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 145 seq_puts(m, " xpa"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 146 if (cpu_has_loongson_mmi) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 147 seq_puts(m, " loongson-mmi"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 148 if (cpu_has_loongson_cam) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 149 seq_puts(m, " loongson-cam"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 150 if (cpu_has_loongson_ext) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 151 seq_puts(m, " loongson-ext"); 01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 152 if (cpu_has_loongson_ext2) 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 153 seq_puts(m, " loongson-ext2"); 1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 154 seq_puts(m, "\n"); 981ef0de49869c Ralf Baechle 2012-08-20 155 bce860833ab1e4 Steven J. Hill 2013-03-25 156 if (cpu_has_mmips) { bce860833ab1e4 Steven J. Hill 2013-03-25 157 seq_printf(m, "micromips kernel\t: %s\n", bce860833ab1e4 Steven J. Hill 2013-03-25 158 (read_c0_config3() & MIPS_CONF3_ISA_OE) ? "yes" : "no"); bce860833ab1e4 Steven J. Hill 2013-03-25 159 } 626bfa03729959 Hauke Mehrtens 2021-10-13 160 626bfa03729959 Hauke Mehrtens 2021-10-13 161 seq_puts(m, "Options implemented\t:"); 626bfa03729959 Hauke Mehrtens 2021-10-13 162 if (cpu_has_tlb) 626bfa03729959 Hauke Mehrtens 2021-10-13 163 seq_puts(m, " tlb"); 626bfa03729959 Hauke Mehrtens 2021-10-13 164 if (cpu_has_ftlb) 626bfa03729959 Hauke Mehrtens 2021-10-13 165 seq_puts(m, " ftlb"); 626bfa03729959 Hauke Mehrtens 2021-10-13 166 if (cpu_has_tlbinv) 626bfa03729959 Hauke Mehrtens 2021-10-13 167 seq_puts(m, " tlbinv"); 626bfa03729959 Hauke Mehrtens 2021-10-13 168 if (cpu_has_segments) 626bfa03729959 Hauke Mehrtens 2021-10-13 169 seq_puts(m, " segments"); 626bfa03729959 Hauke Mehrtens 2021-10-13 170 if (cpu_has_rixiex) 626bfa03729959 Hauke Mehrtens 2021-10-13 171 seq_puts(m, " rixiex"); 626bfa03729959 Hauke Mehrtens 2021-10-13 172 if (cpu_has_ldpte) 626bfa03729959 Hauke Mehrtens 2021-10-13 173 seq_puts(m, " ldpte"); 626bfa03729959 Hauke Mehrtens 2021-10-13 174 if (cpu_has_maar) 626bfa03729959 Hauke Mehrtens 2021-10-13 175 seq_puts(m, " maar"); 626bfa03729959 Hauke Mehrtens 2021-10-13 176 if (cpu_has_rw_llb) 626bfa03729959 Hauke Mehrtens 2021-10-13 177 seq_puts(m, " rw_llb"); 626bfa03729959 Hauke Mehrtens 2021-10-13 178 if (cpu_has_4kex) 626bfa03729959 Hauke Mehrtens 2021-10-13 179 seq_puts(m, " 4kex"); 626bfa03729959 Hauke Mehrtens 2021-10-13 180 if (cpu_has_3k_cache) 626bfa03729959 Hauke Mehrtens 2021-10-13 181 seq_puts(m, " 3k_cache"); 626bfa03729959 Hauke Mehrtens 2021-10-13 182 if (cpu_has_4k_cache) 626bfa03729959 Hauke Mehrtens 2021-10-13 183 seq_puts(m, " 4k_cache"); 626bfa03729959 Hauke Mehrtens 2021-10-13 184 if (cpu_has_tx39_cache) 626bfa03729959 Hauke Mehrtens 2021-10-13 185 seq_puts(m, " tx39_cache"); 626bfa03729959 Hauke Mehrtens 2021-10-13 186 if (cpu_has_octeon_cache) 626bfa03729959 Hauke Mehrtens 2021-10-13 187 seq_puts(m, " octeon_cache"); 1cab5bd69eb1f9 Tiezhu Yang 2021-11-25 188 if (raw_cpu_has_fpu) 626bfa03729959 Hauke Mehrtens 2021-10-13 189 seq_puts(m, " fpu"); 626bfa03729959 Hauke Mehrtens 2021-10-13 190 if (cpu_has_32fpr) 626bfa03729959 Hauke Mehrtens 2021-10-13 191 seq_puts(m, " 32fpr"); 626bfa03729959 Hauke Mehrtens 2021-10-13 192 if (cpu_has_cache_cdex_p) 626bfa03729959 Hauke Mehrtens 2021-10-13 193 seq_puts(m, " cache_cdex_p"); 626bfa03729959 Hauke Mehrtens 2021-10-13 194 if (cpu_has_cache_cdex_s) 626bfa03729959 Hauke Mehrtens 2021-10-13 195 seq_puts(m, " cache_cdex_s"); 626bfa03729959 Hauke Mehrtens 2021-10-13 196 if (cpu_has_prefetch) 626bfa03729959 Hauke Mehrtens 2021-10-13 197 seq_puts(m, " prefetch"); 626bfa03729959 Hauke Mehrtens 2021-10-13 198 if (cpu_has_mcheck) 626bfa03729959 Hauke Mehrtens 2021-10-13 199 seq_puts(m, " mcheck"); 626bfa03729959 Hauke Mehrtens 2021-10-13 200 if (cpu_has_ejtag) 626bfa03729959 Hauke Mehrtens 2021-10-13 201 seq_puts(m, " ejtag"); 626bfa03729959 Hauke Mehrtens 2021-10-13 202 if (cpu_has_llsc) 626bfa03729959 Hauke Mehrtens 2021-10-13 203 seq_puts(m, " llsc"); 626bfa03729959 Hauke Mehrtens 2021-10-13 204 if (cpu_has_guestctl0ext) 626bfa03729959 Hauke Mehrtens 2021-10-13 205 seq_puts(m, " guestctl0ext"); 626bfa03729959 Hauke Mehrtens 2021-10-13 206 if (cpu_has_guestctl1) 626bfa03729959 Hauke Mehrtens 2021-10-13 207 seq_puts(m, " guestctl1"); 626bfa03729959 Hauke Mehrtens 2021-10-13 208 if (cpu_has_guestctl2) 626bfa03729959 Hauke Mehrtens 2021-10-13 209 seq_puts(m, " guestctl2"); 626bfa03729959 Hauke Mehrtens 2021-10-13 210 if (cpu_has_guestid) 626bfa03729959 Hauke Mehrtens 2021-10-13 211 seq_puts(m, " guestid"); 626bfa03729959 Hauke Mehrtens 2021-10-13 212 if (cpu_has_drg) 626bfa03729959 Hauke Mehrtens 2021-10-13 213 seq_puts(m, " drg"); 626bfa03729959 Hauke Mehrtens 2021-10-13 214 if (cpu_has_rixi) 626bfa03729959 Hauke Mehrtens 2021-10-13 215 seq_puts(m, " rixi"); 626bfa03729959 Hauke Mehrtens 2021-10-13 216 if (cpu_has_lpa) 626bfa03729959 Hauke Mehrtens 2021-10-13 217 seq_puts(m, " lpa"); 626bfa03729959 Hauke Mehrtens 2021-10-13 218 if (cpu_has_mvh) 626bfa03729959 Hauke Mehrtens 2021-10-13 219 seq_puts(m, " mvh"); 626bfa03729959 Hauke Mehrtens 2021-10-13 220 if (cpu_has_vtag_icache) 626bfa03729959 Hauke Mehrtens 2021-10-13 221 seq_puts(m, " vtag_icache"); 626bfa03729959 Hauke Mehrtens 2021-10-13 222 if (cpu_has_dc_aliases) 626bfa03729959 Hauke Mehrtens 2021-10-13 223 seq_puts(m, " dc_aliases"); 626bfa03729959 Hauke Mehrtens 2021-10-13 224 if (cpu_has_ic_fills_f_dc) 626bfa03729959 Hauke Mehrtens 2021-10-13 225 seq_puts(m, " ic_fills_f_dc"); 626bfa03729959 Hauke Mehrtens 2021-10-13 226 if (cpu_has_pindexed_dcache) 626bfa03729959 Hauke Mehrtens 2021-10-13 227 seq_puts(m, " pindexed_dcache"); 626bfa03729959 Hauke Mehrtens 2021-10-13 228 if (cpu_has_userlocal) 626bfa03729959 Hauke Mehrtens 2021-10-13 229 seq_puts(m, " userlocal"); 626bfa03729959 Hauke Mehrtens 2021-10-13 230 if (cpu_has_nofpuex) 626bfa03729959 Hauke Mehrtens 2021-10-13 231 seq_puts(m, " nofpuex"); 626bfa03729959 Hauke Mehrtens 2021-10-13 232 if (cpu_has_vint) 626bfa03729959 Hauke Mehrtens 2021-10-13 233 seq_puts(m, " vint"); 626bfa03729959 Hauke Mehrtens 2021-10-13 234 if (cpu_has_veic) 626bfa03729959 Hauke Mehrtens 2021-10-13 235 seq_puts(m, " veic"); 626bfa03729959 Hauke Mehrtens 2021-10-13 236 if (cpu_has_inclusive_pcaches) 626bfa03729959 Hauke Mehrtens 2021-10-13 237 seq_puts(m, " inclusive_pcaches"); 626bfa03729959 Hauke Mehrtens 2021-10-13 238 if (cpu_has_perf_cntr_intr_bit) 626bfa03729959 Hauke Mehrtens 2021-10-13 239 seq_puts(m, " perf_cntr_intr_bit"); 626bfa03729959 Hauke Mehrtens 2021-10-13 240 if (cpu_has_ufr) 626bfa03729959 Hauke Mehrtens 2021-10-13 241 seq_puts(m, " ufr"); 626bfa03729959 Hauke Mehrtens 2021-10-13 242 if (cpu_has_fre) 626bfa03729959 Hauke Mehrtens 2021-10-13 243 seq_puts(m, " fre"); 626bfa03729959 Hauke Mehrtens 2021-10-13 244 if (cpu_has_cdmm) 626bfa03729959 Hauke Mehrtens 2021-10-13 245 seq_puts(m, " cdmm"); 626bfa03729959 Hauke Mehrtens 2021-10-13 246 if (cpu_has_small_pages) 626bfa03729959 Hauke Mehrtens 2021-10-13 247 seq_puts(m, " small_pages"); 626bfa03729959 Hauke Mehrtens 2021-10-13 248 if (cpu_has_nan_legacy) 626bfa03729959 Hauke Mehrtens 2021-10-13 249 seq_puts(m, " nan_legacy"); 626bfa03729959 Hauke Mehrtens 2021-10-13 250 if (cpu_has_nan_2008) 626bfa03729959 Hauke Mehrtens 2021-10-13 251 seq_puts(m, " nan_2008"); 626bfa03729959 Hauke Mehrtens 2021-10-13 252 if (cpu_has_ebase_wg) 626bfa03729959 Hauke Mehrtens 2021-10-13 253 seq_puts(m, " ebase_wg"); 626bfa03729959 Hauke Mehrtens 2021-10-13 254 if (cpu_has_badinstr) 626bfa03729959 Hauke Mehrtens 2021-10-13 255 seq_puts(m, " badinstr"); 626bfa03729959 Hauke Mehrtens 2021-10-13 256 if (cpu_has_badinstrp) 626bfa03729959 Hauke Mehrtens 2021-10-13 257 seq_puts(m, " badinstrp"); 626bfa03729959 Hauke Mehrtens 2021-10-13 258 if (cpu_has_contextconfig) 626bfa03729959 Hauke Mehrtens 2021-10-13 259 seq_puts(m, " contextconfig"); 626bfa03729959 Hauke Mehrtens 2021-10-13 260 if (cpu_has_perf) 626bfa03729959 Hauke Mehrtens 2021-10-13 261 seq_puts(m, " perf"); 626bfa03729959 Hauke Mehrtens 2021-10-13 262 if (cpu_has_mac2008_only) 626bfa03729959 Hauke Mehrtens 2021-10-13 263 seq_puts(m, " mac2008_only"); 626bfa03729959 Hauke Mehrtens 2021-10-13 264 if (cpu_has_ftlbparex) 626bfa03729959 Hauke Mehrtens 2021-10-13 265 seq_puts(m, " ftlbparex"); 626bfa03729959 Hauke Mehrtens 2021-10-13 266 if (cpu_has_gsexcex) 626bfa03729959 Hauke Mehrtens 2021-10-13 267 seq_puts(m, " gsexcex"); 626bfa03729959 Hauke Mehrtens 2021-10-13 268 if (cpu_has_shared_ftlb_ram) 626bfa03729959 Hauke Mehrtens 2021-10-13 269 seq_puts(m, " shared_ftlb_ram"); 626bfa03729959 Hauke Mehrtens 2021-10-13 270 if (cpu_has_shared_ftlb_entries) 626bfa03729959 Hauke Mehrtens 2021-10-13 271 seq_puts(m, " shared_ftlb_entries"); 626bfa03729959 Hauke Mehrtens 2021-10-13 272 if (cpu_has_mipsmt_pertccounters) 626bfa03729959 Hauke Mehrtens 2021-10-13 273 seq_puts(m, " mipsmt_pertccounters"); 626bfa03729959 Hauke Mehrtens 2021-10-13 274 if (cpu_has_mmid) 626bfa03729959 Hauke Mehrtens 2021-10-13 275 seq_puts(m, " mmid"); 626bfa03729959 Hauke Mehrtens 2021-10-13 276 if (cpu_has_mm_sysad) 626bfa03729959 Hauke Mehrtens 2021-10-13 277 seq_puts(m, " mm_sysad"); 626bfa03729959 Hauke Mehrtens 2021-10-13 278 if (cpu_has_mm_full) 626bfa03729959 Hauke Mehrtens 2021-10-13 279 seq_puts(m, " mm_full"); 626bfa03729959 Hauke Mehrtens 2021-10-13 280 seq_puts(m, "\n"); 626bfa03729959 Hauke Mehrtens 2021-10-13 281 f6771dbb27c704 Ralf Baechle 2007-11-08 282 seq_printf(m, "shadow register sets\t: %d\n", f6771dbb27c704 Ralf Baechle 2007-11-08 283 cpu_data[n].srsets); e77c32fe284a4d David Daney 2010-12-21 284 seq_printf(m, "kscratch registers\t: %d\n", e77c32fe284a4d David Daney 2010-12-21 285 hweight8(cpu_data[n].kscratch_mask)); bda4584cd943d7 Huacai Chen 2014-06-26 286 seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package); f875a832d20285 Paul Burton 2017-08-12 287 seq_printf(m, "core\t\t\t: %d\n", cpu_core(&cpu_data[n])); 5508d456e9992b Ralf Baechle 2014-04-03 288 :::::: The code@line 61 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://01.org/lkp