<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/splice.c, branch linux-2.6.25.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.25.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.25.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-10-22T21:05:15Z</updated>
<entry>
<title>Don't allow splice() to files opened with O_APPEND</title>
<updated>2008-10-22T21:05:15Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2008-10-09T21:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18f0a7902f3557fce184053e00219f59b292f7df'/>
<id>urn:sha1:18f0a7902f3557fce184053e00219f59b292f7df</id>
<content type='text'>
commit efc968d450e013049a662d22727cf132618dcb2f upstream

This is debatable, but while we're debating it, let's disallow the
combination of splice and an O_APPEND destination.

It's not entirely clear what the semantics of O_APPEND should be, and
POSIX apparently expects pwrite() to ignore O_APPEND, for example.  So
we could make up any semantics we want, including the old ones.

But Miklos convinced me that we should at least give it some thought,
and that accepting writes at arbitrary offsets is wrong at least for
IS_APPEND() files (which always have O_APPEND set, even if the reverse
isn't true: you can obviously have O_APPEND set on a regular file).

So disallow O_APPEND entirely for now.  I doubt anybody cares, and this
way we have one less gray area to worry about.

Reported-and-argued-for-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Acked-by: Jens Axboe &lt;ens.axboe@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>splice: fix infinite loop in generic_file_splice_read()</title>
<updated>2008-04-10T06:24:25Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2008-04-10T06:24:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8191ecd1d14c6914c660dfa007154860a7908857'/>
<id>urn:sha1:8191ecd1d14c6914c660dfa007154860a7908857</id>
<content type='text'>
There's a quirky loop in generic_file_splice_read() that could go
on indefinitely, if the file splice returns 0 permanently (and not
just as a temporary condition). Get rid of the loop and pass
back -EAGAIN correctly from __generic_file_splice_read(), so we
handle that condition properly as well.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>splice: use mapping_gfp_mask</title>
<updated>2008-04-03T22:39:49Z</updated>
<author>
<name>Hugh Dickins</name>
</author>
<published>2008-04-03T22:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cd13504652d28e16bf186c6bb2bbb3725369383'/>
<id>urn:sha1:4cd13504652d28e16bf186c6bb2bbb3725369383</id>
<content type='text'>
The loop block driver is careful to mask __GFP_IO|__GFP_FS out of its
mapping_gfp_mask, to avoid hangs under memory pressure.  But nowadays
it uses splice, usually going through __generic_file_splice_read.  That
must use mapping_gfp_mask instead of GFP_KERNEL to avoid those hangs.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>splice: only return -EAGAIN if there's hope of more data</title>
<updated>2008-03-04T10:14:39Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2008-02-20T09:34:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=02cf01aea5af7a4d1a38045712fe11bffcc206b0'/>
<id>urn:sha1:02cf01aea5af7a4d1a38045712fe11bffcc206b0</id>
<content type='text'>
sys_tee() currently is a bit eager in returning -EAGAIN, it may do so
even if we don't have a chance of anymore data becoming available. So
improve the logic and only return -EAGAIN if we have an attached writer
to the input pipe.

Reported by Johann Felix Soden &lt;johfel@gmx.de&gt; and
Patrick McManus &lt;mcmanus@ducksong.com&gt;.

Tested-by: Johann Felix Soden &lt;johfel@users.sourceforge.net&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>splice: fix user pointer access in get_iovec_page_array()</title>
<updated>2008-02-10T18:27:21Z</updated>
<author>
<name>Bastian Blank</name>
</author>
<published>2008-02-10T14:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=712a30e63c8066ed84385b12edbfb804f49cbc44'/>
<id>urn:sha1:712a30e63c8066ed84385b12edbfb804f49cbc44</id>
<content type='text'>
Commit 8811930dc74a503415b35c4a79d14fb0b408a361 ("splice: missing user
pointer access verification") added the proper access_ok() calls to
copy_from_user_mmap_sem() which ensures we can copy the struct iovecs
from userspace to the kernel.

But we also must check whether we can access the actual memory region
pointed to by the struct iovec to fix the access checks properly.

Signed-off-by: Bastian Blank &lt;waldi@debian.org&gt;
Acked-by: Oliver Pinter &lt;oliver.pntr@gmail.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>splice: missing user pointer access verification</title>
<updated>2008-02-08T17:25:01Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2008-02-08T16:49:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8811930dc74a503415b35c4a79d14fb0b408a361'/>
<id>urn:sha1:8811930dc74a503415b35c4a79d14fb0b408a361</id>
<content type='text'>
vmsplice_to_user() must always check the user pointer and length
with access_ok() before copying. Likewise, for the slow path of
copy_from_user_mmap_sem() we need to check that we may read from
the user region.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Wojciech Purczynski &lt;cliph@research.coseinc.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>splice: always updated atime in direct splice</title>
<updated>2008-02-01T08:26:32Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2008-01-30T11:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8084870854fe181996c4aa4f44cb2fabcebf164c'/>
<id>urn:sha1:8084870854fe181996c4aa4f44cb2fabcebf164c</id>
<content type='text'>
Andre Majorel &lt;aym-xunil@teaser.fr&gt; points out that if we only updated
the atime when we transfer some data, we deviate from the standard
of always updating the atime. So change splice to always call
file_accessed() even if splice_direct_to_actor() didn't transfer
any data.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>splice: fix problem with atime not being updated</title>
<updated>2008-01-29T20:55:20Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2008-01-29T20:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e97198dbf318be7958b57900d05b37c7e09ad7c'/>
<id>urn:sha1:9e97198dbf318be7958b57900d05b37c7e09ad7c</id>
<content type='text'>
A bug report on nfsd that states that since it was switched to use
splice instead of sendfile, the atime was no longer being updated
on the input file. do_generic_mapping_read() does this when accessing
the file, make splice do it for the direct splice handler.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>[SPLICE]: Don't assume regular pages in splice_to_pipe()</title>
<updated>2008-01-28T22:53:30Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2007-11-07T07:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbdfc2f70610bebb841d0874dc901c648308e43a'/>
<id>urn:sha1:bbdfc2f70610bebb841d0874dc901c648308e43a</id>
<content type='text'>
Allow caller to pass in a release function, there might be
other resources that need releasing as well. Needed for
network receive.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>security: call security_file_permission from rw_verify_area</title>
<updated>2008-01-25T00:29:52Z</updated>
<author>
<name>James Morris</name>
</author>
<published>2008-01-12T11:05:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c43e259cc756ece387faae849af0058b56d78466'/>
<id>urn:sha1:c43e259cc756ece387faae849af0058b56d78466</id>
<content type='text'>
All instances of rw_verify_area() are followed by a call to
security_file_permission(), so just call the latter from the former.

Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
