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: <YWcCDE6rz1xgh9vD@moria.home.lan>
Date:   Wed, 13 Oct 2021 11:58:04 -0400
From:   Kent Overstreet <kent.overstreet@...il.com>
To:     David Howells <dhowells@...hat.com>
Cc:     willy@...radead.org, linux-mm@...ck.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: Stop filemap_read() from grabbing a superfluous
 page

On Thu, Oct 07, 2021 at 01:01:48PM +0100, David Howells wrote:
> Under some circumstances, filemap_read() will allocate sufficient pages to
> read to the end of the file, call readahead/readpages on them and copy the
> data over - and then it will allocate another page at the EOF and call
> readpage on that and then ignore it.  This is unnecessary and a waste of
> time and resources.
> 
> filemap_read() *does* check for this, but only after it has already done
> the allocation and I/O.  Fix this by checking before calling
> filemap_get_pages() also.
> 
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Kent Overstreet <kent.overstreet@...il.com>
> cc: Matthew Wilcox (Oracle) <willy@...radead.org>
> cc: linux-mm@...ck.org
> cc: linux-fsdevel@...r.kernel.org
> Link: https://lore.kernel.org/r/160588481358.3465195.16552616179674485179.stgit@warthog.procyon.org.uk/

Acked-by: Kent Overstreet <kent.overstreet@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ