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]
Message-ID: <YaCrnMAEXnG+VO6d@kuha.fi.intel.com>
Date:   Fri, 26 Nov 2021 11:40:44 +0200
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Prashant Malani <pmalani@...omium.org>
Cc:     linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        wonchung@...gle.com, bleung@...omium.org,
        Alan Stern <stern@...land.harvard.edu>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Chunfeng Yun <chunfeng.yun@...iatek.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Noralf Trønnes <noralf@...nnes.org>,
        Rajat Jain <rajatja@...gle.com>,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Thomas Zimmermann <tzimmermann@...e.de>
Subject: Re: [PATCH 0/4] usb: Use notifier for linking Type C ports.

On Wed, Nov 24, 2021 at 03:10:06PM -0800, Prashant Malani wrote:
> This series resolves the cyclic dependency error which was introduced by
> commit 63cd78617350 ("usb: Link the ports to the connectors they are
> attached to") which lead to it being reverted. The approach here is to
> use a notifier to link a new Type C port to pre-existing USB ports
> instead of calling an iterator of usb ports from the Type C connector
> class. This allows commit 63cd78617350 ("usb: Link the ports to the
> connectors they are attached to") to then be submitted without any
> depmod cyclic dependency error.
> 
> The final patch removes the usb port iterator since it is no longer
> needed.

This is not enough. Build the Type-C Class as a module and the USB bus
statically, and the links will not get created.

I'm not sure you actually achieve much with this series, and I'm not
sure this approach will ever fully solve the problem. As long as we
have to declare API, we will have the circular dependency issue on our
hands. But there are ways to avoid that.

There is for example the component framework (drivers/base/component.c)
that I've been thinking about using here. In this case it would work
so that you declare the USB Type-C part as your aggregate driver, and
everything that is connected to it (so USB ports, DisplayPorts, TBT,
etc.) would then just declare themselves as general components. Could
you take a look at that?

thanks,

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ