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: <528c0378-90c2-8bcd-032c-837fc82bb321@linux.alibaba.com>
Date:   Fri, 22 Jul 2022 14:10:35 +0800
From:   JeffleXu <jefflexu@...ux.alibaba.com>
To:     Gao Xiang <hsiangkao@...ux.alibaba.com>, Chao Yu <chao@...nel.org>,
        linux-erofs@...ts.ozlabs.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] erofs: get rid of the leftover PAGE_SIZE in dir.c



On 6/19/22 11:09 PM, Gao Xiang wrote:
> Convert the last hardcoded PAGE_SIZEs of uncompressed cases.
> 
> Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
> ---
>  fs/erofs/dir.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c
> index 18e59821c597..723f5223a4fa 100644
> --- a/fs/erofs/dir.c
> +++ b/fs/erofs/dir.c
> @@ -90,7 +90,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
>  
>  		nameoff = le16_to_cpu(de->nameoff);
>  		if (nameoff < sizeof(struct erofs_dirent) ||
> -		    nameoff >= PAGE_SIZE) {
> +		    nameoff >= EROFS_BLKSIZ) {
>  			erofs_err(dir->i_sb,
>  				  "invalid de[0].nameoff %u @ nid %llu",
>  				  nameoff, EROFS_I(dir)->nid);
> @@ -99,7 +99,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
>  		}
>  
>  		maxsize = min_t(unsigned int,
> -				dirsize - ctx->pos + ofs, PAGE_SIZE);
> +				dirsize - ctx->pos + ofs, EROFS_BLKSIZ);
>  
>  		/* search dirents at the arbitrary position */
>  		if (initial) {

LGTM.

Reviewed-by: Jeffle Xu <jefflexu@...ux.alibaba.com>

-- 
Thanks,
Jeffle

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ