]> git.karo-electronics.de Git - karo-tx-linux.git/commit
CPU online file permission
authorUlrich Drepper <drepper@redhat.com>
Tue, 31 Jul 2007 07:38:16 +0000 (00:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Aug 2007 21:27:35 +0000 (14:27 -0700)
commitdf358e1bad63f47ef3d399f8193bdc5a59d3d747
tree382026f81d200dc7532c6c7dfcd2be90ec363a0e
parente71139fd0da506636c1a78765f7eaed178a97a34
CPU online file permission

Is there a reason why the "online" file in the subdirectories for the CPUs
in /sys/devices/system isn't world-readable?  I cannot imagine it to be
security relevant especially now that a getcpu() syscall can be used to
determine what CPUa thread runs on.

The file is useful to correctly implement the sysconf() function to return
the number of online CPUs.  In the presence of hotplug we currently cannot
provide this information.  The patch below should to it.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/cpu.c