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
| ||
|
Date: Thu, 10 Mar 2022 00:29:56 +0100 From: Greg Kroah-Hartman <gregkh@...uxfoundation.org> To: Won Chung <wonchung@...gle.com> Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>, "Rafael J . Wysocki" <rafael@...nel.org>, Benson Leung <bleung@...omium.org>, Prashant Malani <pmalani@...omium.org>, linux-kernel@...r.kernel.org Subject: Re: [PATCH v4] driver core: Add sysfs support for physical location of a device On Wed, Mar 09, 2022 at 11:06:07PM +0000, Won Chung wrote: > When ACPI table includes _PLD fields for a device, create a new > directory (physical_location) in sysfs to share _PLD fields. > > Currently without PLD information, when there are multiple of same > devices, it is hard to distinguish which device corresponds to which > physical device at which location. For example, when there are two Type > C connectors, it is hard to find out which connector corresponds to the > Type C port on the left panel versus the Type C port on the right panel. > With PLD information provided, we can determine which specific device at > which location is doing what. > > _PLD output includes much more fields, but only generic fields are added > and exposed to sysfs, so that non-ACPI devices can also support it in > the future. The minimal generic fields needed for locating a device are > the following. > - panel > - vertical_position > - horizontal_position > - dock > - lid > > Signed-off-by: Won Chung <wonchung@...gle.com> > --- > > Changes from v3 > - Move dev_add_physical_location() and dev_attr_physical_location_group > to driver/base/physical_location.h. > - Use pointer and reorder physical_location in struct device to pack its > bytes. (checked using pahole) You forgot to test your code and see what happens when you remove a device :(
Powered by blists - more mailing lists