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] [day] [month] [year] [list]
Date: Fri, 22 Mar 2024 18:11:35 -0400
From: Gabriel Krisman Bertazi <krisman@...e.de>
To: Eugen Hristev via Linux-f2fs-devel <linux-f2fs-devel@...ts.sourceforge.net>
Cc: tytso@....edu,  adilger.kernel@...ger.ca,  linux-ext4@...r.kernel.org,
  jaegeuk@...nel.org,  chao@...nel.org,  linux-fsdevel@...r.kernel.org,
  Eugen Hristev <eugen.hristev@...labora.com>,  brauner@...nel.org,
  jack@...e.cz,  Eric Biggers <ebiggers@...gle.com>,
  linux-kernel@...r.kernel.org,  viro@...iv.linux.org.uk,
  kernel@...labora.com,  Gabriel Krisman Bertazi <krisman@...labora.com>
Subject: Re: [f2fs-dev] [PATCH v10 7/8] ext4: Move CONFIG_UNICODE defguards
 into the code flow

Eugen Hristev via Linux-f2fs-devel
<linux-f2fs-devel@...ts.sourceforge.net> writes:

> From: Gabriel Krisman Bertazi <krisman@...labora.com>
>
> Instead of a bunch of ifdefs, make the unicode built checks part of the
> code flow where possible, as requested by Torvalds.
>
> Reviewed-by: Eric Biggers <ebiggers@...gle.com>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
> [eugen.hristev@...labora.com: port to 6.8-rc3]
> Signed-off-by: Eugen Hristev <eugen.hristev@...labora.com>
> ---
>  fs/ext4/crypto.c | 19 +++----------------
>  fs/ext4/ext4.h   | 33 +++++++++++++++++++++------------
>  fs/ext4/namei.c  | 14 +++++---------
>  fs/ext4/super.c  |  4 +---
>  4 files changed, 30 insertions(+), 40 deletions(-)
>
> diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
> index 7ae0b61258a7..1d2f8b79529c 100644
> --- a/fs/ext4/crypto.c
> +++ b/fs/ext4/crypto.c
> @@ -31,12 +31,7 @@ int ext4_fname_setup_filename(struct inode *dir, const struct qstr *iname,
>  
>  	ext4_fname_from_fscrypt_name(fname, &name);
>  
> -#if IS_ENABLED(CONFIG_UNICODE)
> -	err = ext4_fname_setup_ci_filename(dir, iname, fname);
> -	if (err)
> -		ext4_fname_free_filename(fname);
> -#endif
> -	return err;
> +	return ext4_fname_setup_ci_filename(dir, iname, fname);

This shouldn't remove the error path.  It effectively reintroduces the
memory leak fixed by commit 7ca4b085f430 ("ext4: fix memory leaks in
ext4_fname_{setup_filename,prepare_lookup}").

This patch was only about inlining the codeguards, so it shouldn't be
changing the logic.

>  }
>  
>  int ext4_fname_prepare_lookup(struct inode *dir, struct dentry *dentry,
> @@ -51,12 +46,7 @@ int ext4_fname_prepare_lookup(struct inode *dir, struct dentry *dentry,
>  
>  	ext4_fname_from_fscrypt_name(fname, &name);
>  
> -#if IS_ENABLED(CONFIG_UNICODE)
> -	err = ext4_fname_setup_ci_filename(dir, &dentry->d_name, fname);
> -	if (err)
> -		ext4_fname_free_filename(fname);
> -#endif
> -	return err;
> +	return ext4_fname_setup_ci_filename(dir, &dentry->d_name, fname);
>  }

likewise


-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ