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:	Thu, 21 Aug 2014 13:30:10 +0100
From:	Sudeep Holla <sudeep.holla@....com>
To:	David Herrmann <dh.herrmann@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Kay Sievers <kay.sievers@...y.org>
CC:	Sudeep Holla <sudeep.holla@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Stephen Boyd <sboyd@...eaurora.org>
Subject: Re: [PATCH v3 03/11] drivers: base: add new class "cpu" to group
 cpu devices



On 21/08/14 12:20, David Herrmann wrote:
> Hi
>
> On Thu, Aug 21, 2014 at 12:59 PM, Sudeep Holla <sudeep.holla@....com> 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
>
> This patch lacks any explanation _why_ you add a class for CPUs. With
> this patch applied, these directories are effectively the same:
>    /sys/bus/cpu/devices/
>    /sys/class/cpu/
>

Yes that's the intention, so that we don't break any existing sysfs/ABI

> Why do we need a cpu-class if the same set of information is already
> available on the cpu-bus? Furthermore, classes are deprecated anyway.
> Everything you can do with a class can be solved with a bus. And we
> already have a bus for cpus.
>

This was suggested[1] by GregKH. The main reason it was added is to
reuse the device attributes rather than creating the raw kobjects.

It helps to move few other cpu related subsystems using raw kobjects to
the device attribute groups.

Regards,
Sudeep

[1] https://lkml.org/lkml/2014/2/10/766

--
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