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: <CAHk-=whZWgwbyXMdC0JE+dM0zLyG1TU4gyAxv0FxbwZPwaEX7Q@mail.gmail.com>
Date:   Mon, 31 May 2021 19:47:28 -1000
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Andreas Gruenbacher <agruenba@...hat.com>
Cc:     cluster-devel <cluster-devel@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Jan Kara <jack@...e.cz>, Matthew Wilcox <willy@...radead.org>
Subject: Re: [RFC 9/9] gfs2: Fix mmap + page fault deadlocks (part 2)

On Mon, May 31, 2021 at 7:02 AM Andreas Gruenbacher <agruenba@...hat.com> wrote:
>
> @@ -807,13 +824,20 @@ static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to,
> [...]
>         ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL, 0);
>         gfs2_glock_dq(gh);
> +       if (unlikely(current_needs_retry())) {
> +               set_current_needs_retry(false);
> +               if (ret == -EFAULT &&
> +                   !iov_iter_fault_in_writeable(to, PAGE_SIZE))
> +                       goto retry;
> +       }

Hmm. I haven't walked through this all, but is that "ret == -EFAULT"
test the right thing to do?

Can iomap_dio_rw() not instead just return a partial success if it hit
a missing page half-way?

Shouldn't you retry for that case too?

                Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ