lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Mar 2014 07:28:28 +0000
From:	Sudeep Holla <sudeep.holla@....com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC/RFT v3 1/9] drivers: base: add new class "cpu" to
 group cpu devices

Hi Greg,

On Sat, Mar 1, 2014 at 12:42 AM, Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
> On Wed, Feb 19, 2014 at 04:06:08PM +0000, Sudeep Holla wrote:
>> From: Sudeep Holla <sudeep.holla@....com>
>>
>> This patch creates a new class called "cpu" and assigns it to all the
>> cpu devices. This helps in grouping all the cpu devices and associated
>> child devices under the same class.
>>
>> This patch also:
>> 1. modifies the get_parent_device to return the legacy path
>>    (/sys/devices/system/cpu/..) for the cpu class devices to support
>>    existing sysfs ABI
>> 2. avoids creating link in the class directory pointing to the device as
>>    there would be per-cpu instance of these devices with the same name
>> 3. makes sure subsystem symlink continues pointing to cpu bus instead of
>>    cpu class for cpu devices
>>
>> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> Does the sysfs layout change at all with this patch applied?
>

No change to the existing layout, it just adds new entries, e.g. device symlink.

Before this patch:
/ # ls /sys/devices/system/cpu/cpu0/ -l
total 0
drwxr-xr-x    5 root     0                0 Jan  1 00:02 cpuidle
-rw-r--r--    1 root     0             4096 Jan  1 00:02 online
drwxr-xr-x    2 root     0                0 Jan  1 00:02 power
lrwxrwxrwx    1 root     0                0 Jan  1 00:02 subsystem ->
../../../../bus/cpu
drwxr-xr-x    2 root     0                0 Jan  1 00:02 topology
-rw-r--r--    1 root     0             4096 Jan  1 00:02 uevent

After this patch:
/sys/class/cpu # ls /sys/devices/system/cpu/cpu0 -l
total 0
drwxr-xr-x    6 root     0                0 Jan  1 00:00 cache
drwxr-xr-x    5 root     0                0 Jan  1 00:00 cpuidle
lrwxrwxrwx    1 root     0                0 Jan  1 00:00 device -> ../../cpu
-rw-r--r--    1 root     0             4096 Jan  1 00:00 online
drwxr-xr-x    2 root     0                0 Jan  1 00:00 power
lrwxrwxrwx    1 root     0                0 Jan  1 00:00 subsystem ->
../../../../bus/cpu
drwxr-xr-x    2 root     0                0 Jan  1 00:00 topology
-rw-r--r--    1 root     0             4096 Jan  1 00:00 uevent

Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ