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  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:   Wed, 21 Nov 2018 00:10:31 -0500
From:   "Theodore Y. Ts'o" <>
To:     Gabriel Krisman Bertazi <>
Subject: Re: [PATCH e2fsprogs 7/9] lib/ext2fs: Support encoding when
 calculating dx hashes

On Mon, Oct 15, 2018 at 05:12:18PM -0400, Gabriel Krisman Bertazi wrote:
> diff --git a/lib/ext2fs/dirhash.c b/lib/ext2fs/dirhash.c
> index 4ba3f35c091f..2198a6fd4d2a 100644
> --- a/lib/ext2fs/dirhash.c
> +++ b/lib/ext2fs/dirhash.c
>  /* dirhash.c */
> -extern errcode_t ext2fs_dirhash(int version, const char *name, int len,
> +extern errcode_t ext2fs_dirhash(const struct nls_table *charset, int version,
> +				int hash_flags, const char *name, int len,
>  				const __u32 *seed,
>  				ext2_dirhash_t *ret_hash,
>  				ext2_dirhash_t *ret_minor_hash);

We can't change function signatures in libext2fs, because this would
breaks the shared libraries ABI.

So when you want to add a new function parameter to a shared library
function, what you should do is create a new function that has the new
parameter, and call it something like ext2_dirhash2().  Then
ext2_dirhash() can be implemented in terms of ext2_dirhash2().

Also, my preference would be to insert new input paramters after len, e.g.:

extern errcode_t ext2fs_dirhash2(int version, const char *name, int len,
				 int hash_flags,
				 const struct nls_table *charset,
				 const __u32 *seed,
				 ext2_dirhash_t *ret_hash,
				 ext2_dirhash_t *ret_minor_hash);
					- Ted

Powered by blists - more mailing lists