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]
Message-ID: <20160915172240.GA144398@google.com>
Date:   Thu, 15 Sep 2016 10:22:40 -0700
From:   Eric Biggers <ebiggers@...gle.com>
To:     Jaegeuk Kim <jaegeuk@...nel.org>
Cc:     linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net, tytso@....edu
Subject: Re: [PATCH] fscrypto: make filename crypto functions return 0 on
 success

On Thu, Sep 15, 2016 at 09:54:12AM -0700, Jaegeuk Kim wrote:
> 
> Hmm, your patch tries to change the return value and make its usage more
> consistent. So, I think it should have been considered to change if (err < 0)
> to if (err) entirely in order to avoid any potential mistake; this patch already
> addresses it in some cases, but not all.
> 
> e.g., in f2fs_symlink,
> 
> 	err = fscrypt_fname_usr_to_disk(inode, &istr, &ostr);
> 	if (err < 0)
> 		goto err_out;
> 
> BTW, in dx_show_leaf(),
> 	res = fscrypt_fname_disk_to_usr(dir,
> 		0, 0, &de_name,
> 		&fname_crypto_str);
> 	if (res < 0)
> 		...
> 
> IMHO, it'd be better to use err instead of {res|ret} when considering naming
> convention.

Well, I had wanted to avoid bloating the patch.

I do like the idea of the greater consistency, though.

I'll post a version of the patch that does as you're suggesting.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ