<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs, branch v2.6.28</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.28</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-11-20T02:49:58Z</updated>
<entry>
<title>eCryptfs: Allocate up to two scatterlists for crypto ops on keys</title>
<updated>2008-11-20T02:49:58Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2008-11-19T23:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac97b9f9a2d0b83488e0bbcb8517b229d5c9b142'/>
<id>urn:sha1:ac97b9f9a2d0b83488e0bbcb8517b229d5c9b142</id>
<content type='text'>
I have received some reports of out-of-memory errors on some older AMD
architectures.  These errors are what I would expect to see if
crypt_stat-&gt;key were split between two separate pages.  eCryptfs should
not assume that any of the memory sent through virt_to_scatterlist() is
all contained in a single page, and so this patch allocates two
scatterlist structs instead of one when processing keys.  I have received
confirmation from one person affected by this bug that this patch resolves
the issue for him, and so I am submitting it for inclusion in a future
stable release.

Note that virt_to_scatterlist() runs sg_init_table() on the scatterlist
structs passed to it, so the calls to sg_init_table() in
decrypt_passphrase_encrypted_session_key() are redundant.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Reported-by: Paulo J. S. Silva &lt;pjssilva@ime.usp.br&gt;
Cc: "Leon Woestenberg" &lt;leon.woestenberg@gmail.com&gt;
Cc: Tim Gardner &lt;tim.gardner@canonical.com&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>ecryptfs: fix memory corruption when storing crypto info in xattrs</title>
<updated>2008-10-30T18:38:46Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2008-10-29T21:01:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87b811c3f96559e466403e22b1fa99d472571625'/>
<id>urn:sha1:87b811c3f96559e466403e22b1fa99d472571625</id>
<content type='text'>
When ecryptfs allocates space to write crypto headers into, before copying
it out to file headers or to xattrs, it looks at the value of
crypt_stat-&gt;num_header_bytes_at_front to determine how much space it
needs.  This is also used as the file offset to the actual encrypted data,
so for xattr-stored crypto info, the value was zero.

So, we kzalloc'd 0 bytes, and then ran off to write to that memory.
(Which returned as ZERO_SIZE_PTR, so we explode quickly).

The right answer is to always allocate a page to write into; the current
code won't ever write more than that (this is enforced by the
(PAGE_CACHE_SIZE - offset) length in the call to
ecryptfs_generate_key_packet_set).  To be explicit about this, we now send
in a "max" parameter, rather than magically using PAGE_CACHE_SIZE there.

Also, since the pointer we pass down the callchain eventually gets the
virt_to_page() treatment, we should be using a alloc_page variant, not
kzalloc (see also 7fcba054373d5dfc43d26e243a5c9b92069972ee)

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&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>[PATCH] assorted path_lookup() -&gt; kern_path() conversions</title>
<updated>2008-10-23T09:12:52Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-08-02T05:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=421748ecde8e69a6364e5ae66eb3bf87e1f995c0'/>
<id>urn:sha1:421748ecde8e69a6364e5ae66eb3bf87e1f995c0</id>
<content type='text'>
more nameidata eviction

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>eCryptfs: remove netlink transport</title>
<updated>2008-10-16T18:21:39Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2008-10-16T05:02:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=624ae5284516870657505103ada531c64dba2a9a'/>
<id>urn:sha1:624ae5284516870657505103ada531c64dba2a9a</id>
<content type='text'>
The netlink transport code has not worked for a while and the miscdev
transport is a simpler solution.  This patch removes the netlink code and
makes the miscdev transport the only eCryptfs kernel to userspace
transport.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: Dustin Kirkland &lt;kirkland@canonical.com&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>ecryptfs: convert to use new aops</title>
<updated>2008-10-16T18:21:39Z</updated>
<author>
<name>Badari Pulavarty</name>
<email>pbadari@us.ibm.com</email>
</author>
<published>2008-10-16T05:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=807b7ebe41ab80d96e89a53bc290d49613e56f48'/>
<id>urn:sha1:807b7ebe41ab80d96e89a53bc290d49613e56f48</id>
<content type='text'>
Convert ecryptfs to use write_begin/write_end

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Acked-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: Dave Kleikamp &lt;shaggy@austin.ibm.com&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>eCryptfs: remove retry loop in ecryptfs_readdir()</title>
<updated>2008-10-16T18:21:38Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2008-10-16T05:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d6c7045581d3736c5f14053eb59342aa0b2cc07'/>
<id>urn:sha1:7d6c7045581d3736c5f14053eb59342aa0b2cc07</id>
<content type='text'>
The retry block in ecryptfs_readdir() has been in the eCryptfs code base
for a while, apparently for no good reason.  This loop could potentially
run without terminating.  This patch removes the loop, instead erroring
out if vfs_readdir() on the lower file fails.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Reported-by: Al Viro &lt;viro@ZinIV.linux.org.uk&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>vfs: Use const for kernel parser table</title>
<updated>2008-10-13T17:10:37Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2008-10-13T09:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a447c0932445f92ce6f4c1bd020f62c5097a7842'/>
<id>urn:sha1:a447c0932445f92ce6f4c1bd020f62c5097a7842</id>
<content type='text'>
This is a much better version of a previous patch to make the parser
tables constant. Rather than changing the typedef, we put the "const" in
all the various places where its required, allowing the __initconst
exception for nfsroot which was the cause of the previous trouble.

This was posted for review some time ago and I believe its been in -mm
since then.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Alexander Viro &lt;aviro@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: use page_alloc not kmalloc to get a page of memory</title>
<updated>2008-07-28T23:30:21Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2008-07-28T22:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7fcba054373d5dfc43d26e243a5c9b92069972ee'/>
<id>urn:sha1:7fcba054373d5dfc43d26e243a5c9b92069972ee</id>
<content type='text'>
With SLUB debugging turned on in 2.6.26, I was getting memory corruption
when testing eCryptfs.  The root cause turned out to be that eCryptfs was
doing kmalloc(PAGE_CACHE_SIZE); virt_to_page() and treating that as a nice
page-aligned chunk of memory.  But at least with SLUB debugging on, this
is not always true, and the page we get from virt_to_page does not
necessarily match the PAGE_CACHE_SIZE worth of memory we got from kmalloc.

My simple testcase was 2 loops doing "rm -f fileX; cp /tmp/fileX ." for 2
different multi-megabyte files.  With this change I no longer see the
corruption.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.25.x, 2.6.26.x]
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>[PATCH] kill nameidata passing to permission(), rename to inode_permission()</title>
<updated>2008-07-27T00:53:31Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-07-22T04:07:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f419a2e3b64def707e1384ee38abb77f99af5f6d'/>
<id>urn:sha1:f419a2e3b64def707e1384ee38abb77f99af5f6d</id>
<content type='text'>
Incidentally, the name that gives hundreds of false positives on grep
is not a good idea...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[patch 5/5] vfs: remove mode parameter from vfs_symlink()</title>
<updated>2008-07-27T00:53:18Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-06-24T14:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db2e747b14991a4c6a5c98b0e5f552a193237c03'/>
<id>urn:sha1:db2e747b14991a4c6a5c98b0e5f552a193237c03</id>
<content type='text'>
Remove the unused mode parameter from vfs_symlink and callers.

Thanks to Tetsuo Handa for noticing.

CC: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
</feed>
