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]
Date:   Tue, 6 Sep 2022 09:53:27 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Robert Richter <rrichter@....com>
CC:     Alison Schofield <alison.schofield@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Ira Weiny <ira.weiny@...el.com>,
        Ben Widawsky <bwidawsk@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        <linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>
Subject: Re: [PATCH 05/15] cxl/acpi: Add probe function to detect restricted
 CXL hosts in RCD mode

On Tue, 6 Sep 2022 09:19:49 +0200
Robert Richter <rrichter@....com> wrote:

> On 01.09.22 11:10:38, Jonathan Cameron wrote:
> > On Thu, 1 Sep 2022 08:01:05 +0200
> > Robert Richter <rrichter@....com> wrote:  
> > > On 31.08.22 11:08:04, Jonathan Cameron wrote:  
> > > > On Wed, 31 Aug 2022 10:15:53 +0200  
> > > > Robert Richter <rrichter@....com> wrote:  
> 
> > > > > The probe function is triggered by adding an own root device for RCHs.
> > > > > This is different to CXL VH where an ACPI "ACPI0017" root device
> > > > > exists. Its detection starts the CXL host detection. In RCD mode such
> > > > > a device does not necessarily exists, so solve this by creating a
> > > > > plain platform device that is not an ACPI device and is root only for
> > > > > RCHs.    
> > > > 
> > > > If I read this correctly that platform device is created whether or not
> > > > there are any cxl devices in the system?
> > > > 
> > > > Can we create it only if we find some devices that will be placed
> > > > under it later?    
> > > 
> > > This would move the host detection from probe to init which I wanted
> > > to avoid to better control driver init order dependencies.  
> > 
> > It's a bit nasty either way.  I can see your reasoning, but
> > definitely not keen on it if there is a plausible way to avoid.  
> > > 
> > > I could add a put_device() at the end of a probe so that it will be
> > > released in case no other references use it. This implies the refcount
> > > is maintained for parent devices. Or this needs to be added to. So if
> > > there are no children (hosts) attached to the root device after probe,
> > > it will disappear.  
> > 
> > Unless there is precedence for that, it'll be weird enough to be
> > hard to maintain.  I guess I can live with the ugliness if we can't
> > add something new to ACPI to base this off.  
> 
> Let's stay with a put_device() for now. Then, we wont have a stale cxl
> root device in the system in case there are no RCD children.
> 
> -Robert
Kind of obvious, but...
Make sure to call that out as an unusual thing to do via cover letter / patch
description so we hopefully get more eyes on this detail..

Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ