<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/fuse/file.c, branch linux-2.6.34.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-02-10T21:11:35Z</updated>
<entry>
<title>fuse: verify all ioctl retry iov elements</title>
<updated>2014-02-10T21:11:35Z</updated>
<author>
<name>Zach Brown</name>
</author>
<published>2012-07-24T19:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05cbfc11ad3e22b60b1b44b8dd2181c0be4e100d'/>
<id>urn:sha1:05cbfc11ad3e22b60b1b44b8dd2181c0be4e100d</id>
<content type='text'>
commit fb6ccff667712c46b4501b920ea73a326e49626a upstream.

Commit 7572777eef78ebdee1ecb7c258c0ef94d35bad16 attempted to verify that
the total iovec from the client doesn't overflow iov_length() but it
only checked the first element.  The iovec could still overflow by
starting with a small element.  The obvious fix is to check all the
elements.

The overflow case doesn't look dangerous to the kernel as the copy is
limited by the length after the overflow.  This fix restores the
intention of returning an error instead of successfully copying less
than the iovec represented.

I found this by code inspection.  I built it but don't have a test case.
I'm cc:ing stable because the initial commit did as well.

Signed-off-by: Zach Brown &lt;zab@redhat.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>fuse: fix hang of single threaded fuseblk filesystem</title>
<updated>2011-06-26T16:46:53Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2011-02-25T13:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83e6726210d6c815ce044437106c738eda5ff6f6'/>
<id>urn:sha1:83e6726210d6c815ce044437106c738eda5ff6f6</id>
<content type='text'>
commit 5a18ec176c934ca1bc9dc61580a5e0e90a9b5733 upstream.

Single threaded NTFS-3G could get stuck if a delayed RELEASE reply
triggered a DESTROY request via path_put().

Fix this by

 a) making RELEASE requests synchronous, whenever possible, on fuseblk
 filesystems

 b) if not possible (triggered by an asynchronous read/write) then do
 the path_put() in a separate thread with schedule_work().

Reported-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>fuse: fix ioctl when server is 32bit</title>
<updated>2011-04-17T20:16:06Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2010-11-30T15:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=957b2c8e401086e35c36b1265bb5beaa28cd7d26'/>
<id>urn:sha1:957b2c8e401086e35c36b1265bb5beaa28cd7d26</id>
<content type='text'>
commit d9d318d39dd5cb686660504a3565aac453709ccc upstream.

If a 32bit CUSE server is run on 64bit this results in EIO being
returned to the caller.

The reason is that FUSE_IOCTL_RETRY reply was defined to use 'struct
iovec', which is different on 32bit and 64bit archs.

Work around this by looking at the size of the reply to determine
which struct was used.  This is only needed if CONFIG_COMPAT is
defined.

A more permanent fix for the interface will be to use the same struct
on both 32bit and 64bit.

Reported-by: "ccmail111" &lt;ccmail111@yahoo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>fuse: verify ioctl retries</title>
<updated>2011-04-17T20:16:06Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2010-11-30T15:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=25d2a723132370d2320784bb53ca87453ec40cca'/>
<id>urn:sha1:25d2a723132370d2320784bb53ca87453ec40cca</id>
<content type='text'>
commit 7572777eef78ebdee1ecb7c258c0ef94d35bad16 upstream.

Verify that the total length of the iovec returned in FUSE_IOCTL_RETRY
doesn't overflow iov_length().

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>fuse: fix attributes after open(O_TRUNC)</title>
<updated>2011-04-17T20:15:51Z</updated>
<author>
<name>Ken Sumrall</name>
</author>
<published>2010-11-24T20:57:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53b7be4374faeec200429b429f35238858ae4d09'/>
<id>urn:sha1:53b7be4374faeec200429b429f35238858ae4d09</id>
<content type='text'>
commit a0822c55779d9319939eac69f00bb729ea9d23da upstream.

The attribute cache for a file was not being cleared when a file is opened
with O_TRUNC.

If the filesystem's open operation truncates the file ("atomic_o_trunc"
feature flag is set) then the kernel should invalidate the cached st_mtime
and st_ctime attributes.

Also i_size should be explicitly be set to zero as it is used sometimes
without refreshing the cache.

Signed-off-by: Ken Sumrall &lt;ksumrall@android.com&gt;
Cc: Anfei &lt;anfei.zhou@gmail.com&gt;
Cc: "Anand V. Avati" &lt;avati@gluster.com&gt;
Signed-off-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>mm: flush dcache before writing into page to avoid alias</title>
<updated>2010-02-03T02:11:21Z</updated>
<author>
<name>anfei zhou</name>
</author>
<published>2010-02-02T21:44:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=931e80e4b3263db75c8e34f078d22f11bbabd3a3'/>
<id>urn:sha1:931e80e4b3263db75c8e34f078d22f11bbabd3a3</id>
<content type='text'>
The cache alias problem will happen if the changes of user shared mapping
is not flushed before copying, then user and kernel mapping may be mapped
into two different cache line, it is impossible to guarantee the coherence
after iov_iter_copy_from_user_atomic.  So the right steps should be:

	flush_dcache_page(page);
	kmap_atomic(page);
	write to page;
	kunmap_atomic(page);
	flush_dcache_page(page);

More precisely, we might create two new APIs flush_dcache_user_page and
flush_dcache_kern_page to replace the two flush_dcache_page accordingly.

Here is a snippet tested on omap2430 with VIPT cache, and I think it is
not ARM-specific:

	int val = 0x11111111;
	fd = open("abc", O_RDWR);
	addr = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
	*(addr+0) = 0x44444444;
	tmp = *(addr+0);
	*(addr+1) = 0x77777777;
	write(fd, &amp;val, sizeof(int));
	close(fd);

The results are not always 0x11111111 0x77777777 at the beginning as expected.  Sometimes we see 0x44444444 0x77777777.

Signed-off-by: Anfei &lt;anfei.zhou@gmail.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fuse: fix kunmap in fuse_ioctl_copy_user</title>
<updated>2009-11-04T09:24:51Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2009-11-03T10:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0bd87182d3ab18a32a8e9175d3f68754c58e3432'/>
<id>urn:sha1:0bd87182d3ab18a32a8e9175d3f68754c58e3432</id>
<content type='text'>
Looks like another victim of the confusing kmap() vs kmap_atomic() API
differences.

Reported-by: Todor Gyumyushev &lt;yodor1@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>fuse: prevent fuse_put_request on invalid pointer</title>
<updated>2009-11-04T09:24:50Z</updated>
<author>
<name>Anand V. Avati</name>
</author>
<published>2009-10-22T13:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f60311d5f7670d9539b424e4ed8b5c0872fc9e83'/>
<id>urn:sha1:f60311d5f7670d9539b424e4ed8b5c0872fc9e83</id>
<content type='text'>
fuse_direct_io() has a loop where requests are allocated in each
iteration. if allocation fails, the loop is broken out and follows
into an unconditional fuse_put_request() on that invalid pointer.

Signed-off-by: Anand V. Avati &lt;avati@gluster.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>const: mark struct vm_struct_operations</title>
<updated>2009-09-27T18:39:25Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2009-09-27T18:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0f37e2f77731b3473fa6bd5ee53255d9a9cdb40'/>
<id>urn:sha1:f0f37e2f77731b3473fa6bd5ee53255d9a9cdb40</id>
<content type='text'>
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fuse: fix bad return value in fuse_file_poll()</title>
<updated>2009-06-30T18:06:24Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2009-06-30T18:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=201fa69a2849536ef2912e8e971ec0b01c04eff4'/>
<id>urn:sha1:201fa69a2849536ef2912e8e971ec0b01c04eff4</id>
<content type='text'>
Fix fuse_file_poll() which returned a -errno value instead of a poll
mask.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@kernel.org
</content>
</entry>
</feed>
