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: <20240403042026.GG2576@sol.localdomain>
Date: Tue, 2 Apr 2024 21:20:26 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Eugen Hristev <eugen.hristev@...labora.com>
Cc: tytso@....edu, adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
	jaegeuk@...nel.org, chao@...nel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...labora.com, viro@...iv.linux.org.uk, brauner@...nel.org,
	jack@...e.cz, krisman@...e.de,
	Gabriel Krisman Bertazi <krisman@...labora.com>
Subject: Re: [PATCH v15 4/9] ext4: Reuse generic_ci_match for ci comparisons

On Tue, Apr 02, 2024 at 08:43:28PM -0700, Eric Biggers wrote:
> On Tue, Apr 02, 2024 at 06:48:37PM +0300, Eugen Hristev wrote:
> > +		ret = generic_ci_match(parent, fname->usr_fname,
> > +				       &fname->cf_name, de->name,
> > +				       de->name_len);
> > +		if (ret < 0) {
> > +			/*
> > +			 * Treat comparison errors as not a match.  The
> > +			 * only case where it happens is on a disk
> > +			 * corruption or ENOMEM.
> > +			 */
> > +			return false;
> >  		}
> > -		return !ext4_ci_compare(parent, fname->usr_fname, de->name,
> > -						de->name_len, false);
> > +		return ret;
> 
> Maybe write this as simply 'return ret > 0;'?

Ah, I see that patch 6 adds a check for -EINVAL here, in which case the
'if (ret < 0)' makes sense.

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ