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: <20191024175904.GJ2963@bombadil.infradead.org>
Date:   Thu, 24 Oct 2019 10:59:04 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Valdis Kletnieks <valdis.kletnieks@...edu>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-fsdevel@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/15] staging: exfat: Clean up return codes - FFS_FULL

On Thu, Oct 24, 2019 at 11:53:12AM -0400, Valdis Kletnieks wrote:
> Start cleaning up the odd scheme of return codes, starting with FFS_FULL

> +++ b/drivers/staging/exfat/exfat.h
> @@ -221,7 +221,6 @@ static inline u16 get_row_index(u16 i)
>  #define FFS_PERMISSIONERR       11
>  #define FFS_NOTOPENED           12
>  #define FFS_MAXOPENED           13
> -#define FFS_FULL                14
>  #define FFS_EOF                 15
>  #define FFS_DIRBUSY             16
>  #define FFS_MEMORYERR           17

Wouldn't it be better to do this as:

Patch 1: Change all these defines to -Exxx and remove the stupid errno-changing
blocks like this:

> @@ -2360,7 +2360,7 @@ static int exfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,
>  			err = -EINVAL;
>  		else if (err == FFS_FILEEXIST)
>  			err = -EEXIST;
> -		else if (err == FFS_FULL)
> +		else if (err == -ENOSPC)
>  			err = -ENOSPC;
>  		else if (err == FFS_NAMETOOLONG)
>  			err = -ENAMETOOLONG;

then patches 2-n remove individual FFS error codes.

That way nobody actually needs to review patches 2-n; all of the changes
are done in patch 1.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ