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, 20 Oct 2023 18:22:47 +1100
From:   "NeilBrown" <neilb@...e.de>
To:     "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
        torvalds@...ux-foundation.org, stable@...r.kernel.org, lwn@....net,
        jslaby@...e.cz, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
Subject: Re: Linux 6.1.58

On Mon, 16 Oct 2023, Greg Kroah-Hartman wrote:
> I'm announcing the release of the 6.1.58 kernel.
> 
> All users of the 6.1 kernel series must upgrade.
> 
> The updated 6.1.y git tree can be found at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
> and can be browsed at the normal kernel.org git web browser:
> 	https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
> 
> thanks,
> 
> greg k-h
> 
> ------------
> 
>  Makefile                 |    2 
>  fs/nfs/direct.c          |  134 ++++++++++++++---------------------------------
>  fs/nfs/write.c           |   23 +++-----
>  include/linux/nfs_page.h |    4 -
>  lib/test_meminit.c       |    2 
>  5 files changed, 55 insertions(+), 110 deletions(-)
> 
> Greg Kroah-Hartman (7):
>       Revert "NFS: More fixes for nfs_direct_write_reschedule_io()"
>       Revert "NFS: Use the correct commit info in nfs_join_page_group()"
>       Revert "NFS: More O_DIRECT accounting fixes for error paths"
>       Revert "NFS: Fix O_DIRECT locking issues"
>       Revert "NFS: Fix error handling for O_DIRECT write scheduling"

FYI the problem with these NFS patch is now described in comment #4 of
https://bugzilla.kernel.org/show_bug.cgi?id=217999
which I include below.  They can be reapplied if the "Fix error
handling..." patch is fixed up as described.

NeilBrown

FYI the cause of this corruption is that the  backport of
   NFS: Fix error handling for O_DIRECT write scheduling

had an error.
The backported patch f16fd0b11f0f4d41846b5102b1656ea1fc9ac7a0
moves "pos += req_len" in nfs_direct_write_schedule_iovec() from after
    req->wb_index = pos >> PAGE_SHIFT;
to before that statement.  This ->wb_index is wrong.
Possibly a better way to look at this is the use of "pos" is moved to *after* it is updated.

The upstream patch 954998b60caa8f2a3bf3abe490de6f08d283687a
doesn't move the use of pos because
Commit 70e9db69f927 ("NFS: Clean up O_DIRECT request allocation")

removes the use.

v6.1.56 can be fixed with

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 5a976fa343df..69134e11e7d0 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -864,6 +864,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
                                result = PTR_ERR(req);
                                break;
                        }
+                       req->wb_index = pos >> PAGE_SHIFT;
+                       req->wb_offset = pos & ~PAGE_MASK;
 
                        if (desc.pg_error < 0) {
                                nfs_free_request(req);
@@ -883,8 +885,6 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
                        }
 
                        nfs_lock_request(req);
-                       req->wb_index = pos >> PAGE_SHIFT;
-                       req->wb_offset = pos & ~PAGE_MASK;
                        if (nfs_pageio_add_request(&desc, req))
                                continue;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ