lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <98a942fb-0c47-ffa6-4c9c-f30b5d6f750e@cogentembedded.com>
Date:   Tue, 17 Sep 2019 12:59:13 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     zhong jiang <zhongjiang@...wei.com>, jakub.kicinski@...ronome.com,
        davem@...emloft.net
Cc:     anna.schumaker@...app.com, trond.myklebust@...merspace.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ixgbe: Use memset_explicit directly in crypto cases

Hello!

On 17.09.2019 6:45, zhong jiang wrote:

> It's better to use memset_explicit() to replace memset() in crypto cases.

    But you're using memzero_explicit() below?

> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> index 31629fc..7e4f32f 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> @@ -960,10 +960,10 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
>   	return 0;
>   
>   err_aead:
> -	memset(xs->aead, 0, sizeof(*xs->aead));
> +	memzero_explicit(xs->aead, sizeof(*xs->aead));
>   	kfree(xs->aead);
>   err_xs:
> -	memset(xs, 0, sizeof(*xs));
> +	memzero_explicit(xs, sizeof(*xs));
>   	kfree(xs);
>   err_out:
>   	msgbuf[1] = err;
> @@ -1049,7 +1049,7 @@ int ixgbe_ipsec_vf_del_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
>   	ixgbe_ipsec_del_sa(xs);
>   
>   	/* remove the xs that was made-up in the add request */
> -	memset(xs, 0, sizeof(*xs));
> +	memzero_explicit(xs, sizeof(*xs));
>   	kfree(xs);
>   
>   	return 0;

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ