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]
Date:	Tue, 17 Feb 2009 01:51:24 -0600
From:	Tyler Hicks <tyhicks@...ux.vnet.ibm.com>
To:	Johannes Weiner <hannes@...xchg.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 7/8] ecryptfs: use kzfree()

Johannes Weiner wrote:
> Use kzfree() instead of memset() + kfree().
> 
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>
> Cc: Tyler Hicks <tyhicks@...ux.vnet.ibm.com>

Acked-by: Tyler Hicks <tyhicks@...ux.vnet.ibm.com>

Thanks for kzfree() and the updates to eCryptfs - I will put it to use
in the future.

> ---
>  fs/ecryptfs/keystore.c  |    3 +--
>  fs/ecryptfs/messaging.c |    3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> --- a/fs/ecryptfs/keystore.c
> +++ b/fs/ecryptfs/keystore.c
> @@ -740,8 +740,7 @@ ecryptfs_write_tag_70_packet(char *dest,
>  out_release_free_unlock:
>  	crypto_free_hash(s->hash_desc.tfm);
>  out_free_unlock:
> -	memset(s->block_aligned_filename, 0, s->block_aligned_filename_size);
> -	kfree(s->block_aligned_filename);
> +	kzfree(s->block_aligned_filename);
>  out_unlock:
>  	mutex_unlock(s->tfm_mutex);
>  out:
> --- a/fs/ecryptfs/messaging.c
> +++ b/fs/ecryptfs/messaging.c
> @@ -291,8 +291,7 @@ int ecryptfs_exorcise_daemon(struct ecry
>  	if (daemon->user_ns)
>  		put_user_ns(daemon->user_ns);
>  	mutex_unlock(&daemon->mux);
> -	memset(daemon, 0, sizeof(*daemon));
> -	kfree(daemon);
> +	kzfree(daemon);
>  out:
>  	return rc;
>  }
> 
> 



Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)

Powered by blists - more mailing lists