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]
Date:   Fri, 24 Feb 2023 12:12:18 +0000
From:   David Howells <dhowells@...hat.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     dhowells@...hat.com, Vishal Moola <vishal.moola@...il.com>,
        Steve French <stfrench@...rosoft.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jan Kara <jack@...e.cz>, Paulo Alcantara <pc@....nz>,
        Matthew Wilcox <willy@...radead.org>,
        Huang Ying <ying.huang@...el.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Xin Hao <xhao@...ux.alibaba.com>, linux-mm@...ck.org,
        mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.3-rc1

The problem appears to be here:

			if (folio_mapping(folio) != mapping ||
			    !folio_test_dirty(folio)) {
				folio_unlock(folio);
				goto skip_write;
			}

in my version it's:

			if (folio->mapping != mapping ||
			    !folio_test_dirty(folio)) {
				start += folio_size(folio);
				folio_unlock(folio);
				continue;
			}

In your version, skip_write doesn't advance start if it too many skips occur.
Changing your version to match fixes the problem - or, at least, the
symptoms.  I'm not sure exactly why it's occurring, but the -EBADF (-9) is
coming from cifs_get_writable_file() not finding an open file.  I think this
is a Steve question.

With Vishal's change to use filemap_get_folios_tag() instead of
find_get_pages_range_tag(), the most common file write case (open, write,
write, ..., write, close) in which all the data is added to the pagecache in
one contiguous lump without seeking, hits this a lot.

Unfortunately, unlike find_get_pages_range_tag(), filemap_get_folios_tag()
doesn't allow you to set a limit on the number of pages it will return.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ