public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CPU online file permission
@ 2007-07-30  0:56 Ulrich Drepper
  2007-07-30 23:57 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Drepper @ 2007-07-30  0:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

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>

--- drivers/base/cpu.c	2007-02-20 12:01:31.000000000 -0800
+++ drivers/base/cpu.c-new	2007-07-29 17:52:58.000000000 -0700
@@ -53,7 +53,7 @@
 		ret = count;
 	return ret;
 }
-static SYSDEV_ATTR(online, 0600, show_online, store_online);
+static SYSDEV_ATTR(online, 0644, show_online, store_online);
 
 static void __devinit register_cpu_control(struct cpu *cpu)
 {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-31  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30  0:56 [PATCH] CPU online file permission Ulrich Drepper
2007-07-30 23:57 ` Andrew Morton
2007-07-31  7:38   ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox