<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/udf/inode.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-02-25T19:58:54Z</updated>
<entry>
<title>udf: limit the maximum number of indirect extents in a row</title>
<updated>2016-02-25T19:58:54Z</updated>
<author>
<name>Vegard Nossum</name>
</author>
<published>2015-12-11T14:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e84fcd856d1dbab34c5c6eda3b31c0bdd55d57b'/>
<id>urn:sha1:1e84fcd856d1dbab34c5c6eda3b31c0bdd55d57b</id>
<content type='text'>
commit b0918d9f476a8434b055e362b83fa4fd1d462c3f upstream.

udf_next_aext() just follows extent pointers while extents are marked as
indirect. This can loop forever for corrupted filesystem. Limit number
the of indirect extents we are willing to follow in a row.

[JK: Updated changelog, limit, style]

Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Cc: Jan Kara &lt;jack@suse.com&gt;
Cc: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>udf: Check length of extended attributes and allocation descriptors</title>
<updated>2015-10-01T09:36:26Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2015-01-07T12:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34820fc89c5e635b7381e4060931ca30a63d110a'/>
<id>urn:sha1:34820fc89c5e635b7381e4060931ca30a63d110a</id>
<content type='text'>
commit 23b133bdc452aa441fcb9b82cbf6dd05cfd342d0 upstream.

Check length of extended attributes and allocation descriptors when
loading inodes from disk. Otherwise corrupted filesystems could confuse
the code and make the kernel oops.

This fixes CVE-2015-4167.

Reported-by: Carl Henrik Lunde &lt;chlunde@ping.uio.no&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
[Use make_bad_inode() instead of branching due to older implementation.]
Signed-off-by: Chas Williams &lt;3chas3@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>udf: Avoid infinite loop when processing indirect ICBs</title>
<updated>2014-10-09T19:21:26Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2014-09-04T12:06:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82335226733fdf82ee3f231c08269a17fd62a3fc'/>
<id>urn:sha1:82335226733fdf82ee3f231c08269a17fd62a3fc</id>
<content type='text'>
commit c03aa9f6e1f938618e6db2e23afef0574efeeb65 upstream.

We did not implement any bound on number of indirect ICBs we follow when
loading inode. Thus corrupted medium could cause kernel to go into an
infinite loop, possibly causing a stack overflow.

Fix the possible stack overflow by removing recursion from
__udf_read_inode() and limit number of indirect ICBs we follow to avoid
infinite loops.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Cc: Chuck Ebbert &lt;cebbert.lkml@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>udf: Fix data corruption on file type conversion</title>
<updated>2014-02-20T20:56:00Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2014-02-18T11:00:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09ebb17ab476b6ac1cc07b53d07e88f4d31ee4d3'/>
<id>urn:sha1:09ebb17ab476b6ac1cc07b53d07e88f4d31ee4d3</id>
<content type='text'>
UDF has two types of files - files with data stored in inode (ICB in
UDF terminology) and files with data stored in external data blocks. We
convert file from in-inode format to external format in
udf_file_aio_write() when we find out data won't fit into inode any
longer. However the following race between two O_APPEND writes can happen:

CPU1					CPU2
udf_file_aio_write()			udf_file_aio_write()
  down_write(&amp;iinfo-&gt;i_data_sem);
  checks that i_size + count1 fits within inode
    =&gt; no need to convert
  up_write(&amp;iinfo-&gt;i_data_sem);
					  down_write(&amp;iinfo-&gt;i_data_sem);
					  checks that i_size + count2 fits
					    within inode =&gt; no need to convert
					  up_write(&amp;iinfo-&gt;i_data_sem);
  generic_file_aio_write()
    - extends file by count1 bytes
					  generic_file_aio_write()
					    - extends file by count2 bytes

Clearly if count1 + count2 doesn't fit into the inode, we overwrite
kernel buffers beyond inode, possibly corrupting the filesystem as well.

Fix the problem by acquiring i_mutex before checking whether write fits
into the inode and using __generic_file_aio_write() afterwards which
puts check and write into one critical section.

Reported-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>truncate: drop 'oldsize' truncate_pagecache() parameter</title>
<updated>2013-09-12T22:38:02Z</updated>
<author>
<name>Kirill A. Shutemov</name>
</author>
<published>2013-09-12T22:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7caef26767c1727d7abfbbbfbe8b2bb473430d48'/>
<id>urn:sha1:7caef26767c1727d7abfbbbfbe8b2bb473430d48</id>
<content type='text'>
truncate_pagecache() doesn't care about old size since commit
cedabed49b39 ("vfs: Fix vmtruncate() regression").  Let's drop it.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&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>aio: don't include aio.h in sched.h</title>
<updated>2013-05-08T03:16:25Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2013-05-07T23:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a27bb332c04cec8c4afd7912df0dc7890db27560'/>
<id>urn:sha1:a27bb332c04cec8c4afd7912df0dc7890db27560</id>
<content type='text'>
Faster kernel compiles by way of fewer unnecessary includes.

[akpm@linux-foundation.org: fix fallout]
[akpm@linux-foundation.org: fix build]
Signed-off-by: Kent Overstreet &lt;koverstreet@google.com&gt;
Cc: Zach Brown &lt;zab@redhat.com&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Asai Thambi S P &lt;asamymuthupa@micron.com&gt;
Cc: Selvan Mani &lt;smani@micron.com&gt;
Cc: Sam Bradshaw &lt;sbradshaw@micron.com&gt;
Cc: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Reviewed-by: "Theodore Ts'o" &lt;tytso@mit.edu&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>udf: add extent cache support in case of file reading</title>
<updated>2013-01-22T09:48:31Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2013-01-19T02:17:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99600051b04bc4ec8bd4d16a8bf993ca54042db6'/>
<id>urn:sha1:99600051b04bc4ec8bd4d16a8bf993ca54042db6</id>
<content type='text'>
This patch implements extent caching in case of file reading.
While reading a file, currently, UDF reads metadata serially
which takes a lot of time depending on the number of extents present
in the file. Caching last accessd extent improves metadata read time.
Instead of reading file metadata from start, now we read from
the cached extent.

This patch considerably improves the time spent by CPU in kernel mode.
For example, while reading a 10.9 GB file using dd:
Time before applying patch:
11677022208 bytes (10.9GB) copied, 1529.748921 seconds, 7.3MB/s
real    25m 29.85s
user    0m 12.41s
sys     15m 34.75s

Time after applying patch:
11677022208 bytes (10.9GB) copied, 1469.338231 seconds, 7.6MB/s
real    24m 29.44s
user    0m 15.73s
sys     3m 27.61s

[JK: Fix bh refcounting issues, simplify initialization]

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Ashish Sangwan &lt;a.sangwan@samsung.com&gt;
Signed-off-by: Bonggil Bak &lt;bgbak@samsung.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: remove un-needed variable from inode_getblk</title>
<updated>2012-12-13T15:33:23Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2012-10-09T15:09:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d31d15f21b376ac0d8a2323fd6673683bc82bd6'/>
<id>urn:sha1:6d31d15f21b376ac0d8a2323fd6673683bc82bd6</id>
<content type='text'>
The variable last_block is not needed.

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Ashish Sangwan &lt;a.sangwan@samsung.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: don't increment lenExtents while writing to a hole</title>
<updated>2012-12-13T15:33:23Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2012-10-09T15:09:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb719c59bdb4fca86ee1fd1f42ab3735ca12b6b2'/>
<id>urn:sha1:fb719c59bdb4fca86ee1fd1f42ab3735ca12b6b2</id>
<content type='text'>
Incrementing lenExtents even while writing to a hole is bad
for performance as calls to udf_discard_prealloc and
udf_truncate_tail_extent would not return from start if
isize != lenExtents

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Ashish Sangwan &lt;a.sangwan@samsung.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: fix memory leak while allocating blocks during write</title>
<updated>2012-12-13T15:33:23Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2012-10-09T15:08:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2fb7d99d0de3fd8ae869f35ab682581d8455887a'/>
<id>urn:sha1:2fb7d99d0de3fd8ae869f35ab682581d8455887a</id>
<content type='text'>
Need to brelse the buffer_head stored in cur_epos and next_epos.

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Ashish Sangwan &lt;a.sangwan@samsung.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
