<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v2.6.28.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v2.6.28.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v2.6.28.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-03-23T21:55:32Z</updated>
<entry>
<title>eCryptfs: Allocate a variable number of pages for file headers</title>
<updated>2009-03-23T21:55:32Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-03-20T06:25:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c5a8c953669c14d1ef845b745f63f657e0adf46f'/>
<id>urn:sha1:c5a8c953669c14d1ef845b745f63f657e0adf46f</id>
<content type='text'>
commit 8faece5f906725c10e7a1f6caf84452abadbdc7b upstream.

When allocating the memory used to store the eCryptfs header contents, a
single, zeroed page was being allocated with get_zeroed_page().
However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or
ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whichever is larger, and is
stored in the file's private_data-&gt;crypt_stat-&gt;num_header_bytes_at_front
field.

ecryptfs_write_metadata_to_contents() was using
num_header_bytes_at_front to decide how many bytes should be written to
the lower filesystem for the file header.  Unfortunately, at least 8K
was being written from the page, despite the chance of the single,
zeroed page being smaller than 8K.  This resulted in random areas of
kernel memory being written between the 0x1000 and 0x1FFF bytes offsets
in the eCryptfs file headers if PAGE_SIZE was 4K.

This patch allocates a variable number of pages, calculated with
num_header_bytes_at_front, and passes the number of allocated pages
along to ecryptfs_write_metadata_to_contents().

Thanks to Florian Streibelt for reporting the data leak and working with
me to find the problem.  2.6.28 is the only kernel release with this
vulnerability.  Corresponds to CVE-2009-0787

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Acked-by: Dustin Kirkland &lt;kirkland@canonical.com&gt;
Reviewed-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Reviewed-by: Eugene Teo &lt;eugeneteo@kernel.sg&gt;
Cc: dann frazier &lt;dannf@dannf.org&gt;
Cc: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Florian Streibelt &lt;florian@f-streibelt.de&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>NFSD: provide encode routine for OP_OPENATTR</title>
<updated>2009-03-23T21:55:25Z</updated>
<author>
<name>Benny Halevy</name>
<email>bhalevy@panasas.com</email>
</author>
<published>2009-03-04T21:05:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2bddaa01c5da9aa6083218f0f4c991a12a8f8054'/>
<id>urn:sha1:2bddaa01c5da9aa6083218f0f4c991a12a8f8054</id>
<content type='text'>
commit 84f09f46b4ee9e4e9b6381f8af31817516d2091b upstream.

Although this operation is unsupported by our implementation
we still need to provide an encode routine for it to
merely encode its (error) status back in the compound reply.

Thanks for Bill Baker at sun.com for testing with the Sun
OpenSolaris' client, finding, and reporting this bug at
Connectathon 2009.

This bug was introduced in 2.6.27

Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>eventfd: remove fput() call from possible IRQ context</title>
<updated>2009-03-23T21:55:24Z</updated>
<author>
<name>Davide Libenzi</name>
<email>davidel@xmailserver.org</email>
</author>
<published>2009-03-19T00:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=85cf549f789682191f527408f028a5d7dd125bfc'/>
<id>urn:sha1:85cf549f789682191f527408f028a5d7dd125bfc</id>
<content type='text'>
commit 87c3a86e1c220121d0ced59d1a71e78ed9abc6dd upstream.

Remove a source of fput() call from inside IRQ context.  Myself, like Eric,
wasn't able to reproduce an fput() call from IRQ context, but Jeff said he was
able to, with the attached test program.  Independently from this, the bug is
conceptually there, so we might be better off fixing it.  This patch adds an
optimization similar to the one we already do on -&gt;ki_filp, on -&gt;ki_eventfd.
Playing with -&gt;f_count directly is not pretty in general, but the alternative
here would be to add a brand new delayed fput() infrastructure, that I'm not
sure is worth it.

Signed-off-by: Davide Libenzi &lt;davidel@xmailserver.org&gt;
Cc: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Zach Brown &lt;zach.brown@oracle.com&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: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Fix deadlock in ext4_write_begin() and ext4_da_write_begin()</title>
<updated>2009-03-17T00:32:43Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2009-03-05T07:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9d9cc48d44908a2e476167fb1345d250225a8e69'/>
<id>urn:sha1:9d9cc48d44908a2e476167fb1345d250225a8e69</id>
<content type='text'>
(cherry picked from commit ebd3610b110bbb18ea6f9f2aeed1e1068c537227)

Functions ext4_write_begin() and ext4_da_write_begin() call
grab_cache_page_write_begin() without AOP_FLAG_NOFS. Thus it
can happen that page reclaim is triggered in that function
and it recurses back into the filesystem (or some other filesystem).
But this can lead to various problems as a transaction is already
started at that point. Add the necessary flag.

http://bugzilla.kernel.org/show_bug.cgi?id=11688

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Add fallback for find_group_flex</title>
<updated>2009-03-17T00:32:43Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2009-03-05T07:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f08d9c62257c72baacd3050b45f3073a815b5297'/>
<id>urn:sha1:f08d9c62257c72baacd3050b45f3073a815b5297</id>
<content type='text'>
(cherry picked from commit 05bf9e839d9de4e8a094274a0a2fd07beb47eaf1)

This is a workaround for find_group_flex() which badly needs to be
replaced.  One of its problems (besides ignoring the Orlov algorithm)
is that it is a bit hyperactive about returning failure under
suspicious circumstances.  This can lead to spurious ENOSPC failures
even when there are inodes still available.

Work around this for now by retrying the search using
find_group_other() if find_group_flex() returns -1.  If
find_group_other() succeeds when find_group_flex() has failed, log a
warning message.

A better block/inode allocator that will fix this problem for real has
been queued up for the next merge window.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Fix NULL dereference in ext4_ext_migrate()'s error handling</title>
<updated>2009-03-17T00:32:42Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2009-02-24T17:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=49d5e9a1f84aae864ac49b9579efcd99ce6993f4'/>
<id>urn:sha1:49d5e9a1f84aae864ac49b9579efcd99ce6993f4</id>
<content type='text'>
(cherry picked from commit 090542641de833c6f756895fc2f139f046e298f9)

This was found through a code checker (http://repo.or.cz/w/smatch.git/).
It looks like you might be able to trigger the error by trying to migrate
a readonly file system.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Implement range_cyclic in ext4_da_writepages instead of write_cache_pages</title>
<updated>2009-03-17T00:32:41Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@linux.vnet.ibm.com</email>
</author>
<published>2009-02-24T17:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4925e4c65904e5c52cd3a3e5e9b1873eec340c0'/>
<id>urn:sha1:c4925e4c65904e5c52cd3a3e5e9b1873eec340c0</id>
<content type='text'>
(cherry picked from commit 2acf2c261b823d9d9ed954f348b97620297a36b5)

With delayed allocation we lock the page in write_cache_pages() and
try to build an in memory extent of contiguous blocks.  This is needed
so that we can get large contiguous blocks request.  If range_cyclic
mode is enabled, write_cache_pages() will loop back to the 0 index if
no I/O has been done yet, and try to start writing from the beginning
of the range.  That causes an attempt to take the page lock of lower
index page while holding the page lock of higher index page, which can
cause a dead lock with another writeback thread.

The solution is to implement the range_cyclic behavior in
ext4_da_writepages() instead.

http://bugzilla.kernel.org/show_bug.cgi?id=12579

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Initialize preallocation list_head's properly</title>
<updated>2009-03-17T00:32:38Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@linux.vnet.ibm.com</email>
</author>
<published>2009-02-24T17:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6da0e051ce63fd4351830c1ce31a9c6d8e9ffa92'/>
<id>urn:sha1:6da0e051ce63fd4351830c1ce31a9c6d8e9ffa92</id>
<content type='text'>
(cherry picked from commit d794bf8e0936dce45104565cd48c571061f4c1e3)

When creating a new ext4_prealloc_space structure, we have to
initialize its list_head pointers before we add them to any prealloc
lists.  Otherwise, with list debug enabled, we will get list
corruption warnings.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Fix lockdep warning</title>
<updated>2009-03-17T00:32:38Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@linux.vnet.ibm.com</email>
</author>
<published>2009-02-24T17:14:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39f5468e31f482f6a2d7b842e3d9b909534bf9ec'/>
<id>urn:sha1:39f5468e31f482f6a2d7b842e3d9b909534bf9ec</id>
<content type='text'>
(cherry picked from commit ba4439165f0f0d25b2fe065cf0c1ff8130b802eb)

We should not call ext4_mb_add_n_trim while holding alloc_semp.

    =============================================
    [ INFO: possible recursive locking detected ]
    2.6.29-rc4-git1-dirty #124
    ---------------------------------------------
    ffsb/3116 is trying to acquire lock:
     (&amp;meta_group_info[i]-&gt;alloc_sem){----}, at: [&lt;ffffffff8035a6e8&gt;]
     ext4_mb_load_buddy+0xd2/0x343

    but task is already holding lock:
     (&amp;meta_group_info[i]-&gt;alloc_sem){----}, at: [&lt;ffffffff8035a6e8&gt;]
     ext4_mb_load_buddy+0xd2/0x343

http://bugzilla.kernel.org/show_bug.cgi?id=12672

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Fix to read empty directory blocks correctly in 64k</title>
<updated>2009-03-17T00:32:35Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2009-02-24T17:14:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=305a27a920b46943dd1518f31d6386414c7fb87e'/>
<id>urn:sha1:305a27a920b46943dd1518f31d6386414c7fb87e</id>
<content type='text'>
(cherry picked from commit 7be2baaa0322c59ba888aa5260a8c130666acd41)

The rec_len field in the directory entry is 16 bits, so there was a
problem representing rec_len for filesystems with a 64k block size in
the case where the directory entry takes the entire 64k block.
Unfortunately, there were two schemes that were proposed; one where
all zeros meant 65536 and one where all ones (65535) meant 65536.
E2fsprogs used 0, whereas the kernel used 65535.  Oops.  Fortunately
this case happens extremely rarely, with the most common case being
the lost+found directory, created by mke2fs.

So we will be liberal in what we accept, and accept both encodings,
but we will continue to encode 65536 as 65535.  This will require a
change in e2fsprogs, but with fortunately ext4 filesystems normally
have the dir_index feature enabled, which precludes having a
completely empty directory block.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
