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: <ZPh0Ps9UJ3HLzdeR@kuha.fi.intel.com>
Date:   Wed, 6 Sep 2023 15:44:46 +0300
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc:     David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
        Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Robert Foss <rfoss@...nel.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Janne Grunau <j@...nau.net>, Simon Ser <contact@...rsion.fr>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        freedreno@...ts.freedesktop.org, Won Chung <wonchung@...gle.com>
Subject: Re: [RFC PATCH v1 01/12] Revert "drm/sysfs: Link DRM connectors to
 corresponding Type-C connectors"

On Tue, Sep 05, 2023 at 01:56:59PM +0300, Dmitry Baryshkov wrote:
> Hi Heikki,
> 
> On Tue, 5 Sept 2023 at 11:50, Heikki Krogerus
> <heikki.krogerus@...ux.intel.com> wrote:
> >
> > Hi Dmitry,
> >
> > On Mon, Sep 04, 2023 at 12:41:39AM +0300, Dmitry Baryshkov wrote:
> > > The kdev->fwnode pointer is never set in drm_sysfs_connector_add(), so
> > > dev_fwnode() checks never succeed, making the respective commit NOP.
> >
> > That's not true. The dev->fwnode is assigned when the device is
> > created on ACPI platforms automatically. If the drm_connector fwnode
> > member is assigned before the device is registered, then that fwnode
> > is assigned also to the device - see drm_connector_acpi_find_companion().
> >
> > But please note that even if drm_connector does not have anything in
> > its fwnode member, the device may still be assigned fwnode, just based
> > on some other logic (maybe in drivers/acpi/acpi_video.c?).
> >
> > > And if drm_sysfs_connector_add() is modified to set kdev->fwnode, it
> > > breaks drivers already using components (as it was pointed at [1]),
> > > resulting in a deadlock. Lockdep trace is provided below.
> > >
> > > Granted these two issues, it seems impractical to fix this commit in any
> > > sane way. Revert it instead.
> >
> > I think there is already user space stuff that relies on these links,
> > so I'm not sure you can just remove them like that. If the component
> > framework is not the correct tool here, then I think you need to
> > suggest some other way of creating them.
> 
> The issue (that was pointed out during review) is that having a
> component code in the framework code can lead to lockups. With the
> patch #2 in place (which is the only logical way to set kdev->fwnode
> for non-ACPI systems) probing of drivers which use components and set
> drm_connector::fwnode breaks immediately.
> 
> Can we move the component part to the respective drivers? With the
> patch 2 in place, connector->fwnode will be copied to the created
> kdev's fwnode pointer.
> 
> Another option might be to make this drm_sysfs component registration optional.

You don't need to use the component framework at all if there is
a better way of determining the connection between the DP and its
Type-C connector (I'm assuming that that's what this series is about).
You just need the symlinks, not the component.

thanks,

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ