CC: [email protected] CC: [email protected] BCC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Paul Lemmermann <[email protected]> TO: [email protected] CC: [email protected] CC: [email protected] CC: Paul Lemmermann <[email protected]>
Hi Paul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on herbert-cryptodev-2.6/master] [also build test WARNING on herbert-crypto-2.6/master linux/master linus/master v5.17 next-20220325] [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/intel-lab-lkp/linux/commits/Paul-Lemmermann/crypto-aes_generic-fixed-styling-warnings/20220327-014837 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master :::::: branch date: 21 hours ago :::::: commit date: 21 hours ago config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220327/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/8505b026c91a3e6d6c562a1fe46c2b8c20835de8 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Paul-Lemmermann/crypto-aes_generic-fixed-styling-warnings/20220327-014837 git checkout 8505b026c91a3e6d6c562a1fe46c2b8c20835de8 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) arch/x86/kernel/cpu/resctrl/rdtgroup.c:2871:3: note: Control jumps to line 2923 goto out_free_rgrp; ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2923:2: note: Memory is released kfree(rdtgrp); ^~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2947:8: note: Returning; memory was released via 5th parameter ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTMON_GROUP, &rdtgrp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2948:6: note: Assuming 'ret' is 0 if (ret) ^~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2948:2: note: Taking false branch if (ret) ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2951:10: note: Use of memory after it is freed prgrp = rdtgrp->mon.parent; ^~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2980:7: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] kn = rdtgrp->kn; ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:3041:6: note: Assuming the condition is false if (strchr(name, '\n')) ^~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:3041:2: note: Taking false branch if (strchr(name, '\n')) ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:3049:6: note: Assuming 'rdt_alloc_capable' is true if (rdt_alloc_capable && parent_kn == rdtgroup_default.kn) ^~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:3049:6: note: Left side of '&&' is true arch/x86/kernel/cpu/resctrl/rdtgroup.c:3049:27: note: Assuming 'parent_kn' is equal to field 'kn' if (rdt_alloc_capable && parent_kn == rdtgroup_default.kn) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:3049:2: note: Taking true branch if (rdt_alloc_capable && parent_kn == rdtgroup_default.kn) ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:3050:10: note: Calling 'rdtgroup_mkdir_ctrl_mon' return rdtgroup_mkdir_ctrl_mon(parent_kn, name, mode); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2976:8: note: Calling 'mkdir_rdt_prepare' ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTCTRL_GROUP, &rdtgrp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2841:7: note: 'prdtgrp' is non-null if (!prdtgrp) { ^~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2841:2: note: Taking false branch if (!prdtgrp) { ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2846:6: note: 'rtype' is not equal to RDTMON_GROUP if (rtype == RDTMON_GROUP && ^~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2846:28: note: Left side of '&&' is false if (rtype == RDTMON_GROUP && ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2856:6: note: Assuming 'rdtgrp' is non-null if (!rdtgrp) { ^~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2856:2: note: Taking false branch if (!rdtgrp) { ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2868:2: note: Taking true branch if (IS_ERR(kn)) { ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2871:3: note: Control jumps to line 2923 goto out_free_rgrp; ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2923:2: note: Memory is released kfree(rdtgrp); ^~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2976:8: note: Returning; memory was released via 5th parameter ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTCTRL_GROUP, &rdtgrp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2977:6: note: Assuming 'ret' is 0 if (ret) ^~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2977:2: note: Taking false branch if (ret) ^ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2980:7: note: Use of memory after it is freed kn = rdtgrp->kn; ^~~~~~~~~~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2987:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = 0; ^ ~ arch/x86/kernel/cpu/resctrl/rdtgroup.c:2987:2: note: Value stored to 'ret' is never read ret = 0; ^ ~ 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. 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. 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. 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. 5 warnings generated. >> crypto/aes_generic.c:1181:13: warning: Value stored to 'kp' during its >> initialization is never read [clang-analyzer-deadcode.DeadStores] const u32 *kp = ctx->key_enc + 4; ^~ ~~~~~~~~~~~~~~~~ crypto/aes_generic.c:1181:13: note: Value stored to 'kp' during its initialization is never read const u32 *kp = ctx->key_enc + 4; ^~ ~~~~~~~~~~~~~~~~ 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 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:121: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:121: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:121:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ crypto/asymmetric_keys/asymmetric_type.c:64:2: note: Taking true branch WARN_ON(!id_0 && !id_1 && !id_2); ^ include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON' if (unlikely(__ret_warn_on)) \ ^ crypto/asymmetric_keys/asymmetric_type.c:64:2: note: Loop condition is false. Exiting loop WARN_ON(!id_0 && !id_1 && !id_2); vim +/kp +1181 crypto/aes_generic.c ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1176 724ecd3c0eb704 crypto/aes_generic.c Ard Biesheuvel 2019-07-02 1177 static void crypto_aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1178 { 96e82e4551d38e crypto/aes_generic.c Sebastian Siewior 2007-11-08 1179 const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1180 u32 b0[4], b1[4]; 96e82e4551d38e crypto/aes_generic.c Sebastian Siewior 2007-11-08 @1181 const u32 *kp = ctx->key_enc + 4; 96e82e4551d38e crypto/aes_generic.c Sebastian Siewior 2007-11-08 1182 const int key_len = ctx->key_length; ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1183 ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1184 b0[0] = ctx->key_enc[0] ^ get_unaligned_le32(in); ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1185 b0[1] = ctx->key_enc[1] ^ get_unaligned_le32(in + 4); ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1186 b0[2] = ctx->key_enc[2] ^ get_unaligned_le32(in + 8); ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1187 b0[3] = ctx->key_enc[3] ^ get_unaligned_le32(in + 12); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1188 96e82e4551d38e crypto/aes_generic.c Sebastian Siewior 2007-11-08 1189 if (key_len > 24) { ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1190 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1191 f_nround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1192 } ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1193 96e82e4551d38e crypto/aes_generic.c Sebastian Siewior 2007-11-08 1194 if (key_len > 16) { ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1195 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1196 f_nround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1197 } ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1198 ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1199 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1200 f_nround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1201 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1202 f_nround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1203 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1204 f_nround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1205 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1206 f_nround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1207 f_nround(b1, b0, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1208 f_lround(b0, b1, kp); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1209 ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1210 put_unaligned_le32(b0[0], out); ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1211 put_unaligned_le32(b0[1], out + 4); ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1212 put_unaligned_le32(b0[2], out + 8); ec38a9376163f9 crypto/aes_generic.c Ard Biesheuvel 2017-02-02 1213 put_unaligned_le32(b0[3], out + 12); ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1214 } ^1da177e4c3f41 crypto/aes.c Linus Torvalds 2005-04-16 1215 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
