kernel-hacking-2024-linux-s.../net/tls
Simon Horman 0d9e699d34 net: tls: Pass union tls_crypto_context pointer to memzero_explicit
Pass union tls_crypto_context pointer, rather than struct
tls_crypto_info pointer, to memzero_explicit().

The address of the pointer is the same before and after.
But the new construct means that the size of the dereferenced pointer type
matches the size being zeroed. Which aids static analysis.

As reported by Smatch:

  .../tls_main.c:842 do_tls_setsockopt_conf() error: memzero_explicit() 'crypto_info' too small (4 vs 56)

No functional change intended.
Compile tested only.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240708-tls-memzero-v2-1-9694eaf31b79@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-07-09 11:14:47 -07:00
..
Kconfig
Makefile
tls.h
tls_device.c tcp: add a helper for setting EOR on tail skb 2024-06-04 13:23:30 +02:00
tls_device_fallback.c Revert "net: mirror skb frag ref/unref helpers" 2024-05-03 16:05:53 -07:00
tls_main.c net: tls: Pass union tls_crypto_context pointer to memzero_explicit 2024-07-09 11:14:47 -07:00
tls_proc.c
tls_strp.c
tls_sw.c
tls_toe.c
trace.c
trace.h