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: <DF77B1C5-AC9D-462E-A4AE-E2D3A0F01781@dilger.ca>
Date:   Thu, 31 Aug 2017 16:38:26 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     Dave Kleikamp <dave.kleikamp@...cle.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Doug Nazar <nazard@...ar.ca>,
        Al Viro <viro@...iv.linux.org.uk>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Wei Fang <fangwei1@...wei.com>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Mark Fasheh <mfasheh@...sity.com>,
        Joel Becker <jlbec@...lplan.org>,
        jfs-discussion@...ts.sourceforge.net
Subject: Re: [PATCH] jfs should use MAX_LFS_FILESIZE when calculating
 s_maxbytes

On Aug 31, 2017, at 3:46 PM, Dave Kleikamp <dave.kleikamp@...cle.com> wrote:
> 
> jfs had previously avoided the use of MAX_LFS_FILESIZE because it hadn't
> accounted for the whole 32-bit index range on 32-bit systems. That has
> been fixed, so we can simplify the code now.
> 
> Suggested by Andreas Dilger.
> 
> Signed-off-by: Dave Kleikamp <dave.kleikamp@...cle.com>
> Cc: Andreas Dilger <adilger@...ger.ca>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> Cc: jfs-discussion@...ts.sourceforge.net
> ---
> Linus,
> If you don't want to pick this up now, I'll push it in the next merge
> window.
> 
> fs/jfs/super.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/jfs/super.c b/fs/jfs/super.c
> index 78b41e1d5c67..60726ae7cf26 100644
> --- a/fs/jfs/super.c
> +++ b/fs/jfs/super.c
> @@ -619,16 +619,10 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
> 	if (!sb->s_root)
> 		goto out_no_root;
> 
> -	/* logical blocks are represented by 40 bits in pxd_t, etc. */
> -	sb->s_maxbytes = ((u64) sb->s_blocksize) << 40;
> -#if BITS_PER_LONG == 32
> -	/*
> -	 * Page cache is indexed by long.
> -	 * I would use MAX_LFS_FILESIZE, but it's only half as big
> +	/* logical blocks are represented by 40 bits in pxd_t, etc.
> +	 * and page cache is indexed by long
> 	 */
> -	sb->s_maxbytes = min(((u64) PAGE_SIZE << 32) - 1,
> -			     (u64)sb->s_maxbytes);
> -#endif
> +	sb->s_maxbytes = min(((loff_t)sb->s_blocksize) << 40, MAX_LFS_FILESIZE);
> 	sb->s_time_gran = 1;
> 	return 0;
> 
> --
> 2.14.1
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ