<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/lib/iov_iter.c, branch v4.9.125</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.9.125</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.9.125'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-04-21T07:31:21+00:00</updated>
<entry>
<title>new privimitive: iov_iter_revert()</title>
<updated>2017-04-21T07:31:21+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-02-17T23:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff76ab9e03a50a4df26329e547e75f865a2bfa9f'/>
<id>urn:sha1:ff76ab9e03a50a4df26329e547e75f865a2bfa9f</id>
<content type='text'>
commit 27c0e3748e41ca79171ffa3e97415a20af6facd0 upstream.

opposite to iov_iter_advance(); the caller is responsible for never
using it to move back past the initial position.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fix a fencepost error in pipe_advance()</title>
<updated>2017-01-19T19:18:02+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-01-15T00:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d06367ac1730ded79aa78307126236bf83af95a3'/>
<id>urn:sha1:d06367ac1730ded79aa78307126236bf83af95a3</id>
<content type='text'>
commit b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb upstream.

The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe-&gt;buffers.  If that happened, none of them had been released,
leaving pipe full.  Worse, it was trivial to trigger and we end up with
pipe full of uninitialized pages.  IOW, it's an infoleak.

Reported-by: "Alan J. Wylie" &lt;alan@wylie.me.uk&gt;
Tested-by: "Alan J. Wylie" &lt;alan@wylie.me.uk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fix iov_iter_advance() for ITER_PIPE</title>
<updated>2016-11-17T05:00:48+00:00</updated>
<author>
<name>Abhi Das</name>
<email>adas@redhat.com</email>
</author>
<published>2016-11-17T03:44:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=680bb946a1ae04fe0ff369a4965f76b48c07dc54'/>
<id>urn:sha1:680bb946a1ae04fe0ff369a4965f76b48c07dc54</id>
<content type='text'>
iov_iter_advance() needs to decrement iter-&gt;count by the number of
bytes we'd moved beyond.  Normal flavours do that, but ITER_PIPE
doesn't and ITER_PIPE generic_file_read_iter() for O_DIRECT files
ends up with a bogus fallback to page cache read, resulting in incorrect
values for file offset and bytes read.

Signed-off-by: Abhi Das &lt;adas@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>iov_iter: kernel-doc import_iovec() and rw_copy_check_uvector()</title>
<updated>2016-10-15T00:00:34+00:00</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2016-10-08T09:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ffecee4f2442bb8cb6b34c3335fef4eb50c22fdd'/>
<id>urn:sha1:ffecee4f2442bb8cb6b34c3335fef4eb50c22fdd</id>
<content type='text'>
Both import_iovec() and rw_copy_check_uvector() take an array
(typically small and on-stack) which is used to hold an iovec array copy
from userspace. This is to avoid an expensive memory allocation in the
fast path (i.e. few iovec elements).

The caller may have to check whether these functions actually used
the provided buffer or allocated a new one -- but this differs between
the too. Let's just add a kernel doc to clarify what the semantics are
for each function.

Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Fix off-by-one in __pipe_get_pages()</title>
<updated>2016-10-11T17:40:01+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2016-10-11T17:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1689c73a739d094b544c680b0dfdebe52ffee8fb'/>
<id>urn:sha1:1689c73a739d094b544c680b0dfdebe52ffee8fb</id>
<content type='text'>
it actually worked only when requested area ended on the page boundary...

Reported-by: Marco Grassi &lt;marco.gra@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2016-10-10T20:04:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-10T20:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abb5a14fa20fdd400995926134b7be9eb8ce6048'/>
<id>urn:sha1:abb5a14fa20fdd400995926134b7be9eb8ce6048</id>
<content type='text'>
Pull misc vfs updates from Al Viro:
 "Assorted misc bits and pieces.

  There are several single-topic branches left after this (rename2
  series from Miklos, current_time series from Deepa Dinamani, xattr
  series from Andreas, uaccess stuff from from me) and I'd prefer to
  send those separately"

* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits)
  proc: switch auxv to use of __mem_open()
  hpfs: support FIEMAP
  cifs: get rid of unused arguments of CIFSSMBWrite()
  posix_acl: uapi header split
  posix_acl: xattr representation cleanups
  fs/aio.c: eliminate redundant loads in put_aio_ring_file
  fs/internal.h: add const to ns_dentry_operations declaration
  compat: remove compat_printk()
  fs/buffer.c: make __getblk_slow() static
  proc: unsigned file descriptors
  fs/file: more unsigned file descriptors
  fs: compat: remove redundant check of nr_segs
  cachefiles: Fix attempt to read i_blocks after deleting file [ver #2]
  cifs: don't use memcpy() to copy struct iov_iter
  get rid of separate multipage fault-in primitives
  fs: Avoid premature clearing of capabilities
  fs: Give dentry to inode_change_ok() instead of inode
  fuse: Propagate dentry down to inode_change_ok()
  ceph: Propagate dentry down to inode_change_ok()
  xfs: Propagate dentry down to inode_change_ok()
  ...
</content>
</entry>
<entry>
<title>pipe: add pipe_buf_release() helper</title>
<updated>2016-10-05T22:23:58+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2016-09-27T08:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a779638cf622f069a484e8802134cca3c6c71415'/>
<id>urn:sha1:a779638cf622f069a484e8802134cca3c6c71415</id>
<content type='text'>
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new iov_iter flavour: pipe-backed</title>
<updated>2016-10-05T22:23:36+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-09-22T20:33:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=241699cd72a8489c9446ae3910ddd243e9b9061b'/>
<id>urn:sha1:241699cd72a8489c9446ae3910ddd243e9b9061b</id>
<content type='text'>
iov_iter variant for passing data into pipe.  copy_to_iter()
copies data into page(s) it has allocated and stuffs them into
the pipe; copy_page_to_iter() stuffs there a reference to the
page given to it.  Both will try to coalesce if possible.
iov_iter_zero() is similar to copy_to_iter(); iov_iter_get_pages()
and friends will do as copy_to_iter() would have and return the
pages where the data would've been copied.  iov_iter_advance()
will truncate everything past the spot it has advanced to.

New primitive: iov_iter_pipe(), used for initializing those.
pipe should be locked all along.

Running out of space acts as fault would for iovec-backed ones;
in other words, giving it to -&gt;read_iter() may result in short
read if the pipe overflows, or -EFAULT if it happens with nothing
copied there.

In other words, -&gt;read_iter() on those acts pretty much like
-&gt;splice_read().  Moreover, all generic_file_splice_read() users,
as well as many other -&gt;splice_read() instances can be switched
to that scheme - that'll happen in the next commit.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>get rid of separate multipage fault-in primitives</title>
<updated>2016-09-27T22:12:24+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-09-17T22:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bce9f6ee8f84fdf333d0fd7fcf7f0d8c7cce7fa'/>
<id>urn:sha1:4bce9f6ee8f84fdf333d0fd7fcf7f0d8c7cce7fa</id>
<content type='text'>
* the only remaining callers of "short" fault-ins are just as happy with generic
variants (both in lib/iov_iter.c); switch them to multipage variants, kill the
"short" ones
* rename the multipage variants to now available plain ones.
* get rid of compat macro defining iov_iter_fault_in_multipage_readable by
expanding it in its only user.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fix iov_iter_fault_in_readable()</title>
<updated>2016-09-17T21:05:30+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2016-09-15T23:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4690f1e1cdabb4d61207b6787b1605a0dc0aeab'/>
<id>urn:sha1:d4690f1e1cdabb4d61207b6787b1605a0dc0aeab</id>
<content type='text'>
... by turning it into what used to be multipages counterpart

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
