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: <20220802072426.GA2494@thinkpad>
Date:   Tue, 2 Aug 2022 12:54:26 +0530
From:   Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To:     Rob Herring <robh@...nel.org>
Cc:     Bjorn Helgaas <helgaas@...nel.org>,
        Vidya Sagar <vidyas@...dia.com>,
        Jingoo Han <jingoohan1@...il.com>,
        Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof Wilczynski <kw@...ux.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        PCI <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Krishna Thota <kthota@...dia.com>,
        Manikanta Maddireddy <mmaddireddy@...dia.com>,
        sagar.tv@...il.com, Xiaowei Bao <xiaowei.bao@....com>,
        Hou Zhiqiang <Zhiqiang.Hou@....com>
Subject: Re: [PATCH V1] PCI: designware-ep: Fix DBI access before core init

On Mon, Aug 01, 2022 at 02:27:14PM -0600, Rob Herring wrote:
> On Sat, Jul 30, 2022 at 8:50 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@...aro.org> wrote:
> >
> > On Fri, Jul 29, 2022 at 05:44:04PM -0500, Bjorn Helgaas wrote:
> > > [+cc Xiaowei (author of 6bfc9c3a2c70), Hou (author of 8bcca2658558)]
> > >
> > > On Thu, Jul 28, 2022 at 05:56:28PM +0530, Vidya Sagar wrote:
> > > > On 7/28/2022 3:44 AM, Bjorn Helgaas wrote:
> > > > > On Wed, Jun 22, 2022 at 09:31:33AM +0530, Vidya Sagar wrote:
> > > > > > Platforms that cannot support their core initialization without the
> > > > > > reference clock from the host, implement the feature 'core_init_notifier'
> > > > > > to indicate the DesignWare sub-system about when their core is getting
> > > > > > initialized. Any accesses to the core (Ex:- DBI) would result in system
> > > > > > hang in such systems (Ex:- tegra194). This patch moves any access to the
> > > > > > core to dw_pcie_ep_init_complete() API which is effectively called only
> > > > > > after the core initialization.
> 
> > >   6) What's going on with the CORE_INIT and LINK_UP notifiers?
> > >      dw_pcie_ep_init_notify() is only called by qcom and tegra.
> > >      dw_pcie_ep_linkup() is only called by dra7xx, qcom, and tegra.
> > >      As far as I can tell, nobody at all registers to handle those
> > >      events except a test.  I think it's pointless to have that code
> > >      if nobody uses it.
> > >
> >
> > I have submitted an actual driver that makes use of these notifiers:
> > https://lore.kernel.org/lkml/20220502060611.58987-9-manivannan.sadhasivam@linaro.org/
> 
> Notifiers aren't the best interface in the kernel. I think they are
> best used if there's no real linkage between the sender and receiver.
> For an EPC and EPF that's a fixed interface, so define a proper
> interface.
> 

Fair point! The use of notifiers also suffer from an issue where the notifier
chain in EPC is atomic but the EPF calls some of the functions like
pci_epc_write_header() could potentially sleep.

I'll try to come up with an interface.

Thanks,
Mani

> Rob

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ