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: <20180103020805.GB21978@ZenIV.linux.org.uk>
Date:   Wed, 3 Jan 2018 02:08:05 +0000
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Sean Fu <fxinrong@...il.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

On Wed, Dec 27, 2017 at 04:19:58PM +0800, Sean Fu wrote:
> generic_file_read_iter has done the count test.
> So ext4_file_read_iter don't need to test the count repeatedly.

Huh?  You do realize that generic_file_read_iter() is not the
only variant possible there, right?

static ssize_t ext4_dax_read_iter(struct kiocb *iocb, struct iov_iter *to)
{
        struct inode *inode = file_inode(iocb->ki_filp);
        ssize_t ret;

        if (!inode_trylock_shared(inode)) {
                if (iocb->ki_flags & IOCB_NOWAIT)
                        return -EAGAIN;
                inode_lock_shared(inode);
        }

... and now IOCB_NOWAIT read with zero count can fail with -EAGAIN.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ