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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Jan 2017 09:33:59 +0000
From:   Al Viro <viro@...IV.linux.org.uk>
To:     "Alan J. Wylie" <alan@...ie.me.uk>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Thorsten Leemhuis <regressions@...mhuis.info>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: 4.9.0 regression in pipe-backed iov_iter with systemd-nspawn

On Fri, Jan 13, 2017 at 07:23:51AM +0000, Alan J. Wylie wrote:
> at 15:28 on Thu 12-Jan-2017 Linus Torvalds (torvalds@...ux-foundation.org) wrote:
> 
> > So assuming Al hasn't figured it out by the time you get back, can
> > you try to send us the same strace for the working case?
> 
> Full output at https://wylie.me.uk/tmp/strace1.txt
> 
> 1735  splice(5, NULL, 1, NULL, 9223372036854775807, 0) = -1 EAGAIN (Resource temporarily unavailable)

Lovely...  So it was getting -EAGAIN all along.  Just in case - could you
try the delta below and see if it triggers?  Simply to exclude the possibility
that it *is* this call of splice() and the change has somehow buggered cleanup
after the kernel_readv() failure...

diff --git a/fs/splice.c b/fs/splice.c
index 873d83104e79..1a2d1bc7f19e 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -393,6 +393,9 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
 	size_t offset, dummy, copied = 0;
 	ssize_t res;
 	int i;
+	unsigned nrbufs = pipe->nrbufs,
+		 curbuf = pipe->curbuf,
+		 buffers = pipe->buffers;
 
 	if (pipe->nrbufs == pipe->buffers)
 		return -EAGAIN;
@@ -445,6 +448,16 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
 		put_page(pages[i]);
 	kvfree(pages);
 	iov_iter_advance(&to, copied);	/* truncates and discards */
+	if (res == -EAGAIN && (
+		pipe->nrbufs != nrbufs ||
+		pipe->curbuf != curbuf ||
+		pipe->buffers != buffers)
+	    ) {
+		printk(KERN_ERR "nr: %d->%d, cur: %d->%d, buffers: %d->%d\n",
+			nrbufs, pipe->nrbufs,
+			curbuf, pipe->curbuf,
+			buffers, pipe->buffers);
+	}
 	return res;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ