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  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, 11 May 2022 21:55:22 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     Gabriel Krisman Bertazi <krisman@...labora.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca, jaegeuk@...nel.org,
        linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
        kernel@...labora.com
Subject: Re: [PATCH v4 10/10] f2fs: Move CONFIG_UNICODE defguards into the
 code flow

On Wed, May 11, 2022 at 03:31:46PM -0400, Gabriel Krisman Bertazi wrote:
> @@ -293,10 +294,6 @@ static void f2fs_destroy_casefold_cache(void)
>  {
>  	kmem_cache_destroy(f2fs_cf_name_slab);
>  }
> -#else
> -static int __init f2fs_create_casefold_cache(void) { return 0; }
> -static void f2fs_destroy_casefold_cache(void) { }
> -#endif
[...]
> @@ -4611,7 +4608,10 @@ static int __init init_f2fs_fs(void)
>  	err = f2fs_init_compress_cache();
>  	if (err)
>  		goto free_compress_mempool;
> -	err = f2fs_create_casefold_cache();
> +
> +	if (IS_ENABLED(CONFIG_UNICODE))
> +		err = f2fs_create_casefold_cache();
> +
>  	if (err)
>  		goto free_compress_cache;
>  	return 0;
> @@ -4654,7 +4654,9 @@ static int __init init_f2fs_fs(void)
>  
>  static void __exit exit_f2fs_fs(void)
>  {
> -	f2fs_destroy_casefold_cache();
> +	if (IS_ENABLED(CONFIG_UNICODE))
> +		f2fs_destroy_casefold_cache();
> +

I don't think the above two changes are actually an improvement.  It's cleaner
to use stub functions to keep the callers simpler, as the original code did.

- Eric

Powered by blists - more mailing lists