<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs, branch v2.6.22.7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ecryptfs?h=v2.6.22.7</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ecryptfs?h=v2.6.22.7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2007-08-09T21:27:38Z</updated>
<entry>
<title>eCryptfs: ecryptfs_setattr() bugfix</title>
<updated>2007-08-09T21:27:38Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-07-19T08:47:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=34d85f595af946a9ab05d509160a3cb6015db42a'/>
<id>urn:sha1:34d85f595af946a9ab05d509160a3cb6015db42a</id>
<content type='text'>
There is another bug recently introduced into the ecryptfs_setattr()
function in 2.6.22.  eCryptfs will attempt to treat special files like
regular eCryptfs files on chmod, chown, and so forth.  This leads to a NULL
pointer dereference.  This patch validates that the file is a regular file
before proceeding with operations related to the inode's crypt_stat.

Thanks to Ryusuke Konishi for finding this bug and suggesting the fix.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>zero out last page for llseek/write</title>
<updated>2007-06-28T18:34:53Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-06-27T21:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4c5cdb3e099da7cc64df622b02ff7659babe16e'/>
<id>urn:sha1:d4c5cdb3e099da7cc64df622b02ff7659babe16e</id>
<content type='text'>
When one llseek's past the end of the file and then writes, every page past
the previous end of the file should be cleared.  Trevor found that the code,
as is, does not assure that the very last page is always cleared.  This patch
takes care of that.

Signed-off-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>eCryptfs: initialize crypt_stat in setattr</title>
<updated>2007-06-28T18:34:53Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-06-27T21:09:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e10f281bca03f45bdec91e67645c394eaec2f8f6'/>
<id>urn:sha1:e10f281bca03f45bdec91e67645c394eaec2f8f6</id>
<content type='text'>
Recent changes in eCryptfs have made it possible to get to ecryptfs_setattr()
with an uninitialized crypt_stat struct.  This results in a wide and colorful
variety of unpleasantries.  This patch properly initializes the crypt_stat
structure in ecryptfs_setattr() when it is necessary to do so.

Signed-off-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>eCryptfs: fix write zeros behavior</title>
<updated>2007-06-28T18:34:53Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-06-27T21:09:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=240e2df5c740d73fc08cac9989872212deb2d20e'/>
<id>urn:sha1:240e2df5c740d73fc08cac9989872212deb2d20e</id>
<content type='text'>
This patch fixes the processes involved in wiping regions of the data during
truncate and write events, fixing a kernel hang in 2.6.22-rc4 while assuring
that zero values are written out to the appropriate locations during events in
which the i_size will change.

The range passed to ecryptfs_truncate() from ecryptfs_prepare_write() includes
the page that is the object of ecryptfs_prepare_write().  This leads to a
kernel hang as read_cache_page() is executed on the same page in the
ecryptfs_truncate() execution path.  This patch remedies this by limiting the
range passed to ecryptfs_truncate() so as to exclude the page that is the
object of ecryptfs_prepare_write(); it also adds code to
ecryptfs_prepare_write() to zero out the region of its own page when writing
past the i_size position.  This patch also modifies ecryptfs_truncate() so
that when a file is truncated to a smaller size, eCryptfs will zero out the
contents of the new last page from the new size through to the end of the last
page.

Signed-off-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>eCryptfs: delay writing 0's after llseek until write</title>
<updated>2007-05-24T03:14:15Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-05-23T20:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53a2731f9310a66beaf55677229ab067c85ce4fa'/>
<id>urn:sha1:53a2731f9310a66beaf55677229ab067c85ce4fa</id>
<content type='text'>
Delay writing 0's out in eCryptfs after a seek past the end of the file
until data is actually written.

http://www.opengroup.org/onlinepubs/009695399/functions/lseek.html

``The lseek() function shall not, by itself, extend the size of a
file.''

Without this fix, applications that lseek() past the end of the file without
writing will experience unexpected behavior.

Signed-off-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>Detach sched.h from mm.h</title>
<updated>2007-05-21T16:18:19Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2007-05-20T21:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8edc6e03a5c8562dc70a6d969f732bdb355a7e7'/>
<id>urn:sha1:e8edc6e03a5c8562dc70a6d969f732bdb355a7e7</id>
<content type='text'>
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

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>ecryptfs: use zero_user_page</title>
<updated>2007-05-17T12:23:05Z</updated>
<author>
<name>Nate Diller</name>
<email>nate.diller@gmail.com</email>
</author>
<published>2007-05-17T05:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c9f2875b7968453a852e1de5d3504fd2241e8989'/>
<id>urn:sha1:c9f2875b7968453a852e1de5d3504fd2241e8989</id>
<content type='text'>
Use zero_user_page() instead of open-coding it.

Signed-off-by: Nate Diller &lt;nate.diller@gmail.com&gt;
Cc: 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>Remove SLAB_CTOR_CONSTRUCTOR</title>
<updated>2007-05-17T12:23:04Z</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@sgi.com</email>
</author>
<published>2007-05-17T05:10:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a35afb830f8d71ec211531aeb9a621b09a2efb39'/>
<id>urn:sha1:a35afb830f8d71ec211531aeb9a621b09a2efb39</id>
<content type='text'>
SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Steven French &lt;sfrench@us.ibm.com&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: Anton Altaparmakov &lt;aia21@cantab.net&gt;
Cc: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jan Kara &lt;jack@ucw.cz&gt;
Cc: David Chinner &lt;dgc@sgi.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&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>header cleaning: don't include smp_lock.h when not used</title>
<updated>2007-05-08T18:15:07Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2007-05-08T07:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e63340ae6b6205fef26b40a75673d1c9c0c8bb90'/>
<id>urn:sha1:e63340ae6b6205fef26b40a75673d1c9c0c8bb90</id>
<content type='text'>
Remove includes of &lt;linux/smp_lock.h&gt; where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap &lt;randy.dunlap@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;
</content>
</entry>
<entry>
<title>slab allocators: Remove SLAB_DEBUG_INITIAL flag</title>
<updated>2007-05-07T19:12:57Z</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@sgi.com</email>
</author>
<published>2007-05-06T21:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=50953fe9e00ebbeffa032a565ab2f08312d51a87'/>
<id>urn:sha1:50953fe9e00ebbeffa032a565ab2f08312d51a87</id>
<content type='text'>
I have never seen a use of SLAB_DEBUG_INITIAL.  It is only supported by
SLAB.

I think its purpose was to have a callback after an object has been freed
to verify that the state is the constructor state again?  The callback is
performed before each freeing of an object.

I would think that it is much easier to check the object state manually
before the free.  That also places the check near the code object
manipulation of the object.

Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
compiled with SLAB debugging on.  If there would be code in a constructor
handling SLAB_DEBUG_INITIAL then it would have to be conditional on
SLAB_DEBUG otherwise it would just be dead code.  But there is no such code
in the kernel.  I think SLUB_DEBUG_INITIAL is too problematic to make real
use of, difficult to understand and there are easier ways to accomplish the
same effect (i.e.  add debug code before kfree).

There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
clear in fs inode caches.  Remove the pointless checks (they would even be
pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.

This is the last slab flag that SLUB did not support.  Remove the check for
unimplemented flags from SLUB.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.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>
</feed>
