linux.kernel - 25 new messages in 16 topics - digest
linux.kernel
http://groups.google.com/group/linux.kernel?hl=en
Today's topics:
* : input: add support for VirtualBox touchscreen emulation to the Lifebook
driver - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/36b703b3286dcd72?hl=en
* ocfs2: ensure trusted xattrs are not returned to unprivileged users via
listxattr - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/5b44e2eb8c050e04?hl=en
* Memory management woes - order 1 allocation failures - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/5fdc2e7e4a505944?hl=en
* union-mount: Drive the union cache via dcache - 6 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f742d01e7a256efe?hl=en
* Security: Add __init to register_security to disable load a security module
on runtime - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/b8462433eb210b7a?hl=en
* memcg: dirty pages instrumentation - 4 messages, 1 author
http://groups.google.com/group/linux.kernel/t/98b8f3d66410be44?hl=en
* BUG: spinlock lockup on task_rq_lock in 2.6.33 - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/d3689fc14b36b1fd?hl=en
* Union mount core rewrite v1 - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/7a12827f871406c7?hl=en
* Selinux: Remove unused headers slab.h in selinux/ss/symtab.c - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/ae9a24511f0c90e9?hl=en
* audit: Protect find_task_by_vpid() with RCU. - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/478fd517f853f636?hl=en
* tty: Take a 256 byte padding into account when buffering below sub-page
units - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/1bf34df18eb613c7?hl=en
* Selinux: Remove unused headers list.h in selinux/netlink.c - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/98c07de782e1e71f?hl=en
* BNX2: Kernel crashes with 2.6.31 and 2.6.31.9 - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/c0235d6a433f1e2b?hl=en
* 2.6.33 staging rt2870 += Belkin F5D8055 Wireless-N USB Dongle - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/46c759f6f4b38e5f?hl=en
* x86/bootmem: get rid of bootmem on the x86 platform - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/94fb514ae01769c1?hl=en
* BUG mutex_unlock without mutex_lock in drivers/pnp/isapnp/core.c - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/2715d34247f3f583?hl=en
==============================================================================
TOPIC: : input: add support for VirtualBox touchscreen emulation to the
Lifebook driver
http://groups.google.com/group/linux.kernel/t/36b703b3286dcd72?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Mar 2 2010 2:10 pm
From: Michael Thayer
Le mardi 02 mars 2010 à 13:28 -0800, Dmitry Torokhov a écrit :
> On Tue, Mar 02, 2010 at 09:44:48PM +0100, Michael Thayer wrote:
> > it still provides a reasonable user experience until the user has installed our
> > guest drivers.
>
> It is your call but I would much rather if you worked on fixeng evdev to
> work with your virtual device rather than having to install a new X
> driver and going through the hoops trying to detect which one should be
> used on a particular box. At least on Linux...
That wouldn't really help us much here, as we are talking about distributions
shipping X.Org Server 1.4 and earlier, and those distributions are no longer
going to get that sort of update (in those cases in which they are still
getting updates at all). Legacy support if you like.
Thanks again,
Michael
--
Sun Microsystems GmbH Michael Thayer
Werkstrasse 24 VirtualBox engineer
71384 Weinstadt, Germany mailto:michael.thayer@sun.com
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels
Vorsitzender des Aufsichtsrates: Martin Haering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
==============================================================================
TOPIC: ocfs2: ensure trusted xattrs are not returned to unprivileged users via
listxattr
http://groups.google.com/group/linux.kernel/t/5b44e2eb8c050e04?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Mar 2 2010 2:10 pm
From: James Morris
On Tue, 2 Mar 2010, Joel Becker wrote:
> On Tue, Mar 02, 2010 at 07:02:22PM +1100, James Morris wrote:
> > Ensure that trusted xattrs are not returned to unprivileged users
> > via listxattr, in keeping with several other implmentations, such
> > as ext3.
> >
> > Signed-off-by: James Morris <jmorris@namei.org>
>
> If this is the standard expectation, why not lift it up into the vfs?
The VFS doesn't know what's in the listxattr list. When using generic
xattr handlers for synthetic xattrs, it's easy to determine the xattr
namespace (each namespace has a handler), although on-disk xattrs need to
be read from disk to determine if they're in the trusted namespace.
The VFS could possibly modify the listxattr results after the fact,
although it's very ugly, and it would not be able to correctly handle size
probes, where the VFS only sees a total size value from the FS.
- James
--
James Morris
<jmorris@namei.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
==============================================================================
TOPIC: Memory management woes - order 1 allocation failures
http://groups.google.com/group/linux.kernel/t/5fdc2e7e4a505944?hl=en
==============================================================================
== 1 of 2 ==
Date: Tues, Mar 2 2010 2:20 pm
From: Alan Cox
> -#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2)
> +#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
Yes agreed I missed a '-1'
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
== 2 of 2 ==
Date: Tues, Mar 2 2010 2:40 pm
From: Mel Gorman
On Tue, Mar 02, 2010 at 10:17:51PM +0000, Alan Cox wrote:
> > -#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2)
> > +#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
>
> Yes agreed I missed a '-1'
>
Thanks.
Frans, would you mind testing your NAS box with the following patch applied
please? It should apply cleanly on top of 2.6.33-rc7. Thanks
==== CUT HERE ====
tty: Keep the default buffering to sub-page units
We allocate during interrupts so while our buffering is normally diced up
small anyway on some hardware at speed we can pressure the VM excessively
for page pairs. We don't really need big buffers to be linear so don't try
so hard.
In order to make this work well we will tidy up excess callers to request_room,
which cannot itself enforce this break up.
[mel@csn.ul.ie: Adjust TTY_BUFFER_PAGE to take padding into account]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_buffer.c | 6 ++++--
include/linux/tty.h | 11 +++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tty_buffer.c b/drivers/char/tty_buffer.c
index 66fa4e1..f27c4d6 100644
--- a/drivers/char/tty_buffer.c
+++ b/drivers/char/tty_buffer.c
@@ -247,7 +247,8 @@ int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars,
{
int copied = 0;
do {
- int space = tty_buffer_request_room(tty, size - copied);
+ int goal = min(size - copied, TTY_BUFFER_PAGE);
+ int space = tty_buffer_request_room(tty, goal);
struct tty_buffer *tb = tty->buf.tail;
/* If there is no space then tb may be NULL */
if (unlikely(space == 0))
@@ -283,7 +284,8 @@ int tty_insert_flip_string_flags(struct tty_struct *tty,
{
int copied = 0;
do {
- int space = tty_buffer_request_room(tty, size - copied);
+ int goal = min(size - copied, TTY_BUFFER_PAGE);
+ int space = tty_buffer_request_room(tty, goal);
struct tty_buffer *tb = tty->buf.tail;
/* If there is no space then tb may be NULL */
if (unlikely(space == 0))
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 6abfcf5..42f2076 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -68,6 +68,17 @@ struct tty_buffer {
unsigned long data[0];
};
+/*
+ * We default to dicing tty buffer allocations to this many characters
+ * in order to avoid multiple page allocations. We know the size of
+ * tty_buffer itself but it must also be taken into account that the
+ * the buffer is 256 byte aligned. See tty_buffer_find for the allocation
+ * logic this must match
+ */
+
+#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
+
+
struct tty_bufhead {
struct delayed_work work;
spinlock_t lock;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
==============================================================================
TOPIC: union-mount: Drive the union cache via dcache
http://groups.google.com/group/linux.kernel/t/f742d01e7a256efe?hl=en
==============================================================================
== 1 of 6 ==
Date: Tues, Mar 2 2010 2:20 pm
From: Valerie Aurora
From: Jan Blunck <jblunck@suse.de>
If a dentry is removed from dentry cache because its usage count drops to
zero, the references to the underlying layer of the unions the dentry is in
are dropped too. Therefore the union cache is driven by the dentry cache.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Valerie Aurora <vaurora@redhat.com>
---
fs/dcache.c | 13 +++++++++++
fs/union.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/dcache.h | 8 ++++++
include/linux/union.h | 4 +++
4 files changed, 81 insertions(+), 0 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 0c2dd32..fc37f7a 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -18,6 +18,7 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/fs.h>
+#include <linux/union.h>
#include <linux/fsnotify.h>
#include <linux/slab.h>
#include <linux/init.h>
@@ -175,6 +176,8 @@ static struct dentry *d_kill(struct dentry *dentry)
dentry_stat.nr_dentry--; /* For d_free, below */
/*drops the locks, at that point nobody can reach this dentry */
dentry_iput(dentry);
+ /* If the dentry was in an union delete them */
+ shrink_d_unions(dentry);
if (IS_ROOT(dentry))
parent = NULL;
else
@@ -696,6 +699,7 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)
iput(inode);
}
+ shrink_d_unions(dentry);
d_free(dentry);
/* finished when we fall off the top of the tree,
@@ -1536,7 +1540,9 @@ void d_delete(struct dentry * dentry)
spin_lock(&dentry->d_lock);
isdir = S_ISDIR(dentry->d_inode->i_mode);
if (atomic_read(&dentry->d_count) == 1) {
+ __d_drop_unions(dentry);
dentry_iput(dentry);
+ shrink_d_unions(dentry);
fsnotify_nameremove(dentry, isdir);
return;
}
@@ -1547,6 +1553,13 @@ void d_delete(struct dentry * dentry)
spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
+ /*
+ * Remove any associated unions. While someone still has this
+ * directory open (ref count > 0), we could not have deleted
+ * it unless it was empty, and therefore has no references to
+ * directories below it. So we don't need the unions.
+ */
+ shrink_d_unions(dentry);
fsnotify_nameremove(dentry, isdir);
}
EXPORT_SYMBOL(d_delete);
diff --git a/fs/union.c b/fs/union.c
index 2e005d9..182ca91 100644
--- a/fs/union.c
+++ b/fs/union.c
@@ -14,6 +14,7 @@
#include <linux/bootmem.h>
#include <linux/init.h>
+#include <linux/module.h>
#include <linux/types.h>
#include <linux/hash.h>
#include <linux/fs.h>
@@ -236,6 +237,8 @@ int append_to_union(struct vfsmount *upper_mnt, struct dentry *upper_dentry,
union_put(new);
return 0;
}
+ list_add(&new->u_unions, &upper_dentry->d_unions);
+ lower_dentry->d_unionized++;
__union_hash(new);
spin_unlock(&union_lock);
return 0;
@@ -288,3 +291,56 @@ int union_down_one(struct vfsmount **mnt, struct dentry **dentry)
}
return 0;
}
+
+/**
+ * __d_drop_unions - remove all this dentry's unions from the union hash table
+ *
+ * @dentry - topmost dentry in the union stack to remove
+ *
+ * This must be called after unhashing a dentry. This is called with
+ * dcache_lock held and unhashes all the unions this dentry is
+ * attached to.
+ */
+void __d_drop_unions(struct dentry *dentry)
+{
+ struct union_mount *this, *next;
+
+ spin_lock(&union_lock);
+ list_for_each_entry_safe(this, next, &dentry->d_unions, u_unions)
+ __union_unhash(this);
+ spin_unlock(&union_lock);
+}
+EXPORT_SYMBOL_GPL(__d_drop_unions);
+
+/*
+ * This must be called after __d_drop_unions() without holding any locks.
+ * Note: The dentry might still be reachable via a lookup but at that time it
+ * already a negative dentry. Otherwise it would be unhashed. The union_mount
+ * structure itself is still reachable through mnt->mnt_unions (which we
+ * protect against with union_lock).
+ *
+ * We were worried about a recursive dput() call through:
+ *
+ * dput()->d_kill()->shrink_d_unions()->union_put()->dput()
+ *
+ * But this path can only be reached if the dentry is unhashed when we
+ * enter the first dput(), and it can only be unhashed if it was
+ * rmdir()'d, and d_delete() calls shrink_d_unions() for us.
+ */
+void shrink_d_unions(struct dentry *dentry)
+{
+ struct union_mount *this, *next;
+
+repeat:
+ spin_lock(&union_lock);
+ list_for_each_entry_safe(this, next, &dentry->d_unions, u_unions) {
+ BUG_ON(!hlist_unhashed(&this->u_hash));
+ BUG_ON(!hlist_unhashed(&this->u_rhash));
+ list_del(&this->u_unions);
+ this->u_next.dentry->d_unionized--;
+ spin_unlock(&union_lock);
+ union_put(this);
+ goto repeat;
+ }
+ spin_unlock(&union_lock);
+}
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index d6c1da2..bfa8f97 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -227,12 +227,20 @@ extern seqlock_t rename_lock;
* __d_drop requires dentry->d_lock.
*/
+#ifdef CONFIG_UNION_MOUNT
+extern void __d_drop_unions(struct dentry *);
+
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home