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: <Ziq8ATyM_c5zEOkd@casper.infradead.org>
Date: Thu, 25 Apr 2024 21:24:33 +0100
From: Matthew Wilcox <willy@...radead.org>
To: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
Cc: djwong@...nel.org, brauner@...nel.org, david@...morbit.com,
	chandan.babu@...cle.com, akpm@...ux-foundation.org,
	linux-fsdevel@...r.kernel.org, hare@...e.de,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linux-xfs@...r.kernel.org, mcgrof@...nel.org, gost.dev@...sung.com,
	p.raghav@...sung.com
Subject: Re: [PATCH v4 06/11] filemap: cap PTE range to be created to i_size
 in folio_map_range()

On Thu, Apr 25, 2024 at 01:37:41PM +0200, Pankaj Raghav (Samsung) wrote:
>  	do {
>  		unsigned long end;
> +		unsigned long i_size;

Usually i_size is the name of a variable that contains an loff_t, not a
page count.  Not sure what to call this though.  Also, can't we move
this outside the loop?

	pgoff_t file_end = DIV_ROUND_UP(i_size_read(mapping->host),
					PAGE_SIZE) - 1;

	if (end_pgoff > file_end)
		end_pgoff = file_end;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ