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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YYD3iqLEoaalO79M@kuha.fi.intel.com>
Date:   Tue, 2 Nov 2021 10:32:10 +0200
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Qian Cai <quic_qiancai@...cinc.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] software node: Skip duplicated software_node sysfs

On Tue, Nov 02, 2021 at 10:28:45AM +0200, Heikki Krogerus wrote:
> On Tue, Nov 02, 2021 at 01:51:34AM +0200, Andy Shevchenko wrote:
> > On Monday, November 1, 2021, Qian Cai <quic_qiancai@...cinc.com> wrote:
> > 
> > > A recent commit allowed device_create_managed_software_node() to call
> > > software_node_notify() which could generate duplicated "software_node"
> > > sysfs files. For example,
> > >
> > > "/devices/platform/808622B7:01/xhci-hcd.3.auto/software_node"
> > >
> > > Since it was created earlier from another path,
> > >
> > >   sysfs_create_link
> > >   software_node_notify
> > >   device_add
> > >   platform_device_add
> > >   dwc3_host_init
> > >   dwc3_probe
> > >   platform_probe
> > >   really_probe.part.0
> > >   really_probe
> > >   __driver_probe_device
> > >   driver_probe_device
> > >   __driver_attach
> > >   bus_for_each_dev
> > >   driver_attach
> > >   bus_add_driver
> > >   driver_register
> > >   __platform_driver_register
> > >   dwc3_driver_init at drivers/usb/dwc3/core.c:2072
> > >   do_one_initcall
> > >
> > > Fixed it by using sysfs_create_link_nowarn() in software_node_notify() to
> > > avoid those bad messages during booting,
> > 
> > 
> > No, it’s not so easy. What you are doing is a papering over the real issue
> > which is the limitation of the firmware nodes to two. What we need is to
> > drop the link from struct fwnode_handle, move it to upper layer and modify
> > all fwnode ops to be used over the list of fwnode:s.
> > 
> > XHCI driver and DWC3 are sharing the primary fwnode, but at the same time
> > they wanted to have _different_ secondary ones when role is switched. This
> > can’t be done in the current design. And here is the symptom what you got.
> 
> I'm actually not sure what is going on in this case, because this is
> the ACPI enumerated BSW board, at least based on the ACPI ID?
> 
> That board should not have the initial secondary fwnode assigned by
> the time the dwc3 host driver is called.

But what Andy said is still true. You are only hiding the core problem
with this. So this patch is not the way to go.


thanks,

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ