summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-model/device.txt
diff options
context:
space:
mode:
authorKay Sievers2009-03-24 15:43:30 +0100
committerGreg Kroah-Hartman2009-06-16 06:30:23 +0200
commit3959214f971417f4162926ac52ad4cd042958caa (patch)
tree1e73536b383a2a8337c09c5630871b2f94a8bcfa /Documentation/driver-model/device.txt
parentdriver core: set default SYSFS_DEPRECATED=n (diff)
downloadkernel-qcow2-linux-3959214f971417f4162926ac52ad4cd042958caa.tar.gz
kernel-qcow2-linux-3959214f971417f4162926ac52ad4cd042958caa.tar.xz
kernel-qcow2-linux-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