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:   Tue, 12 Apr 2022 16:38:33 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:     Benson Leung <bleung@...gle.com>,
        Prashant Malani <pmalani@...omium.org>,
        Jameson Thies <jthies@...gle.com>,
        "Regupathy, Rajaram" <rajaram.regupathy@...el.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Won Chung <wonchung@...gle.com>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/3] usb: typec: Separate sysfs directory for all USB
 PD objects

On Tue, Apr 12, 2022 at 04:00:20PM +0300, Heikki Krogerus wrote:
> Hi,
> 
> In this version the USB Power Delivery support is now completely
> separated into its own little subsystem. The USB Power Delivery
> objects are not devices, but they are also no longer tied to any
> device by default. This change makes it possible to share the USB PD
> objects between multiple devices on top of being able to select the
> objects that we want the device to use.
> 
> The USB Power Delivery objects are now placed under
> /sys/kernel/usb_power_delivery directory. As an example:
> 
> 	/sys/kernel/usb_power_delivery/pd0

No, sorry, this is a device, it does NOT belong in /sys/kernel/

And this really should be a real device, as I mentioned before, not a
kobject.

> So now that pd0 can be linked to a device, or devices, that want (or
> can) use it to negotiate the USB PD contract with. An example where
> two devices share the PD:
> 
> 	/sys/class/typec/port0/usb_power_delivery -> ../../../../../../../kernel/usb_power_delivery/pd0
> 	/sys/class/typec/port1/usb_power_delivery -> ../../../../../../../kernel/usb_power_delivery/pd0

Point to the pd device, not the kobject.

> I did not change the directory hierarchy at all, because I'm assuming
> that it is not a problem anymore:
> 
> 	pd0/<message>/<object>/<field>

Let's get back to devices first, worry about crazy depth second.

thanks,

greg k-h

Powered by blists - more mailing lists