linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto,fs: fix noderef.cocci warnings
  2022-03-13 20:00 [hare-scsi-devel:tls-upcall.v4 118/156] crypto/hkdf.c:94:25-31: ERROR: application of sizeof to pointer kernel test robot
@ 2022-03-13 19:52 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-03-13 19:52 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: kbuild-all, linux-kernel

From: kernel test robot <lkp@intel.com>

crypto/hkdf.c:94:25-31: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

Fixes: ea4c6fc32e5e ("crypto,fs: Separate out hkdf_extract() and hkdf_expand()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git tls-upcall.v4
head:   d2416ecdb6b03fc2e4aa40b20cdf919322713224
commit: ea4c6fc32e5e02a1e4c841f462c3a931b8838f33 [118/156] crypto,fs: Separate out hkdf_extract() and hkdf_expand()
:::::: branch date: 3 days ago
:::::: commit date: 5 days ago

 crypto/hkdf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/hkdf.c
+++ b/crypto/hkdf.c
@@ -91,7 +91,7 @@ int hkdf_expand(struct crypto_shash *hma
 			if (err)
 				goto out;
 			memcpy(&okm[i], tmp, okmlen - i);
-			memzero_explicit(tmp, sizeof(tmp));
+			memzero_explicit(tmp, sizeof(*tmp));
 		} else {
 			err = crypto_shash_finup(desc, &counter, 1, &okm[i]);
 			if (err)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [hare-scsi-devel:tls-upcall.v4 118/156] crypto/hkdf.c:94:25-31: ERROR: application of sizeof to pointer
@ 2022-03-13 20:00 kernel test robot
  2022-03-13 19:52 ` [PATCH] crypto,fs: fix noderef.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-03-13 20:00 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git tls-upcall.v4
head:   d2416ecdb6b03fc2e4aa40b20cdf919322713224
commit: ea4c6fc32e5e02a1e4c841f462c3a931b8838f33 [118/156] crypto,fs: Separate out hkdf_extract() and hkdf_expand()
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220314/202203140317.0on9b3HF-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> crypto/hkdf.c:94:25-31: ERROR: application of sizeof to pointer

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-13 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-13 20:00 [hare-scsi-devel:tls-upcall.v4 118/156] crypto/hkdf.c:94:25-31: ERROR: application of sizeof to pointer kernel test robot
2022-03-13 19:52 ` [PATCH] crypto,fs: fix noderef.cocci warnings kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).