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-next>] [day] [month] [year] [list]
Message-ID: <1846994.1668547169@warthog.procyon.org.uk>
Date:   Tue, 15 Nov 2022 21:19:29 +0000
From:   David Howells <dhowells@...hat.com>
To:     torvalds@...ux-foundation.org
cc:     dhowells@...hat.com, willy@...radead.org,
        Jeff Layton <jlayton@...nel.org>,
        JeffleXu <jefflexu@...ux.alibaba.com>, linux-cachefs@...hat.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [GIT PULL] netfs: Fix folio unmarking/unlocking loops

Hi Linus,

Could you pull these changes please?  There are two, affecting the
functions that iterates over the pagecache unmarking or unlocking pages
after an op is complete:

 (1) xas_for_each() loops must call xas_retry() first thing and immediately
     do a "continue" in the case that the extracted value is a special
     value that indicates that the walk raced with a modification.  Fix the
     unlock and unmark loops to do this.

 (2) The maths in the unlock loop is dodgy as it could, theoretically, at
     some point in the future end up with a starting file pointer that is
     in the middle of a folio.  This will cause a subtraction to go
     negative - but the number is unsigned.  Fix the maths to use absolute
     file positions instead of relative page indices.

Thanks,
David

Link: https://lore.kernel.org/r/166749229733.107206.17482609105741691452.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/166757987929.950645.12595273010425381286.stgit@warthog.procyon.org.uk/ # v2
---
The following changes since commit f0c4d9fc9cc9462659728d168387191387e903cc:

  Linux 6.1-rc4 (2022-11-06 15:07:11 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/netfs-fixes-20221115

for you to fetch changes up to 5e51c627c5acbcf82bb552e17533a79d2a6a2600:

  netfs: Fix dodgy maths (2022-11-15 16:56:07 +0000)

----------------------------------------------------------------
netfslib fixes

----------------------------------------------------------------
David Howells (2):
      netfs: Fix missing xas_retry() calls in xarray iteration
      netfs: Fix dodgy maths

 fs/netfs/buffered_read.c | 20 +++++++++++++-------
 fs/netfs/io.c            |  3 +++
 2 files changed, 16 insertions(+), 7 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ