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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YlZ5f0CnTO6Enr78@kuha.fi.intel.com>
Date:   Wed, 13 Apr 2022 10:19:27 +0300
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
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

Hi Greg,

On Tue, Apr 12, 2022 at 04:38:33PM +0200, Greg Kroah-Hartman wrote:
> 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.

Okay. I had to do this proposal to be sure (nobody answered my
question in v1). Sorry.

I'll make these into devices. USB Power Delivery shall be the device
class for them.

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

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ