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: <20231202035229.GA41173@sol.localdomain>
Date:   Fri, 1 Dec 2023 19:52:29 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     Daniel Rosenberg <drosen@...gle.com>
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        Jaegeuk Kim <jaegeuk@...nel.org>, kernel-team@...roid.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] f2fs: Restrict max filesize for 16K f2fs

On Fri, Dec 01, 2023 at 07:03:47PM -0800, Daniel Rosenberg via Linux-f2fs-devel wrote:
> +	/* For compatibility with 4K crypto unit size, we must restrict
> +	 * the max filesize to what can fit within U32_MAX 4K units.
> +	 * Since the blocksize must currently be equal to the page size,
> +	 * we can grab that from there. inode is NULL when setting up
> +	 * the superblock.
> +	 */
> +
> +	result = min(result, ((loff_t) U32_MAX * 4096) >> PAGE_SHIFT);

This should be formatted like:

	/*
	 * For compatibility with ...
	 */
	result = ...

Also, the comment should mention that this is for the IV_INO_LBLK_64 and
IV_INO_LBLK_32 encryption settings.  There is no issue with the default
encryption setting.

Also, use F2FS_BLKSIZE_BITS instead of PAGE_SHIFT?

Also, the commit message could use:

	Fixes: d7e9a9037de2 ("f2fs: Support Block Size == Page Size")

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ