summaryrefslogtreecommitdiff
path: root/Documentation/driver-model/device.txt
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-03-24 15:43:30 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-15 21:30:23 -0700
commit3959214f971417f4162926ac52ad4cd042958caa (patch)
tree1e73536b383a2a8337c09c5630871b2f94a8bcfa /Documentation/driver-model/device.txt
parentf6ee649f4b191d316a463ce7e514f9d12fa31c01 (diff)
downloadkernel-common-3959214f971417f4162926ac52ad4cd042958caa.tar.gz
kernel-common-3959214f971417f4162926ac52ad4cd042958caa.tar.bz2
kernel-common-3959214f971417f4162926ac52ad4cd042958caa.zip
sched: delayed cleanup of user_struct
During bootup performance tracing we see repeated occurrences of /sys/kernel/uid/* events for the same uid, leading to a, in this case, rather pointless userspace processing for the same uid over and over. This is usually caused by tools which change their uid to "nobody", to run without privileges to read data supplied by untrusted users. This change delays the execution of the (already existing) scheduled work, to cleanup the uid after one second, so the allocated and announced uid can possibly be re-used by another process. This is the current behavior, where almost every invocation of a binary, which changes the uid, creates two events: $ read START < /sys/kernel/uevent_seqnum; \ for i in `seq 100`; do su --shell=/bin/true bin; done; \ read END < /sys/kernel/uevent_seqnum; \ echo $(($END - $START)) 178 With the delayed cleanup, we get only two events, and userspace finishes a bit faster too: $ read START < /sys/kernel/uevent_seqnum; \ for i in `seq 100`; do su --shell=/bin/true bin; done; \ read END < /sys/kernel/uevent_seqnum; \ echo $(($END - $START)) 1 Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/driver-model/device.txt')
0 files changed, 0 insertions, 0 deletions