[lkml]   [2007]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] 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 <>

    --- 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)
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2007-07-30 02:59    [W:0.017 / U:3.672 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site