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: <20230713155631.GA29281@lst.de>
Date:   Thu, 13 Jul 2023 17:56:31 +0200
From:   Christoph Hellwig <hch@....de>
To:     Cyril Hrubis <chrubis@...e.cz>
Cc:     Christoph Hellwig <hch@....de>,
        kernel test robot <oliver.sang@...el.com>,
        "Darrick J. Wong" <djwong@...nel.org>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        Miklos Szeredi <miklos@...redi.hu>,
        Matthew Wilcox <willy@...radead.org>, cluster-devel@...hat.com,
        Ilya Dryomov <idryomov@...il.com>,
        Miklos Szeredi <mszeredi@...hat.com>,
        Chao Yu <chao@...nel.org>, linux-fsdevel@...r.kernel.org,
        Al Viro <viro@...iv.linux.org.uk>,
        Jaegeuk Kim <jaegeuk@...nel.org>, Xiubo Li <xiubli@...hat.com>,
        Trond Myklebust <trond.myklebust@...merspace.com>,
        ltp@...ts.linux.it, lkp@...el.com, Jens Axboe <axboe@...nel.dk>,
        Christian Brauner <brauner@...nel.org>,
        Theodore Ts'o <tytso@....edu>,
        Johannes Thumshirn <johannes.thumshirn@....com>,
        linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org,
        Anna Schumaker <anna@...nel.org>, oe-lkp@...ts.linux.dev,
        Andrew Morton <akpm@...ux-foundation.org>,
        Hannes Reinecke <hare@...e.de>
Subject: Re: [LTP] [linus:master] [iomap]  219580eea1: ltp.writev07.fail

On Thu, Jul 13, 2023 at 05:34:55PM +0200, Cyril Hrubis wrote:
>                 iter.processed = iomap_write_iter(&iter, i);
> 
> +       iocb->ki_pos += iter.pos - iocb->ki_pos;
> +
>         if (unlikely(ret < 0))
>                 return ret;
> -       ret = iter.pos - iocb->ki_pos;
> -       iocb->ki_pos += ret;
> -       return ret;
> +
> +       return iter.pos - iocb->ki_pos;

I don't think this works, as iocb->ki_pos has been updated above.
What you want is probably the version below.  But so far I can't
reproduce anything yet..

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index adb92cdb24b009..02aea0174ddbcf 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -872,7 +872,7 @@ iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i,
 	while ((ret = iomap_iter(&iter, ops)) > 0)
 		iter.processed = iomap_write_iter(&iter, i);
 
-	if (unlikely(ret < 0))
+	if (iter.pos == iocb->ki_pos)
 		return ret;
 	ret = iter.pos - iocb->ki_pos;
 	iocb->ki_pos += ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ