]> git.baikalelectronics.ru Git - kernel.git/commit
CPU online file permission
authorUlrich Drepper <drepper@redhat.com>
Tue, 31 Jul 2007 07:38:16 +0000 (00:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:39 +0000 (15:39 -0700)
commit861e2d589f398b1df8416825bca8d387edbb0b25
tree86566782602f9012935c2de195f970f878b94401
parentcc0d5e3298a33113c424f37f1f7b4d207077fe68
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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/base/cpu.c