[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181106172100.GA22063@e107981-ln.cambridge.arm.com>
Date: Tue, 6 Nov 2018 17:21:00 +0000
From: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To: Keith Busch <keith.busch@...el.com>
Cc: Bjorn Helgaas <helgaas@...nel.org>,
Linux PCI <linux-pci@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Sinan Kaya <okaya@...nel.org>,
Thomas Tai <thomas.tai@...cle.com>, poza@...eaurora.org,
Lukas Wunner <lukas@...ner.de>, Christoph Hellwig <hch@....de>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/12] error handling and pciehp maintenance
On Tue, Nov 06, 2018 at 09:47:52AM -0700, Keith Busch wrote:
> On Tue, Nov 06, 2018 at 04:34:08PM +0000, Lorenzo Pieralisi wrote:
> > The question is whether we really need to dynamically patch the kernel
> > with ftrace to achieve what that patch does.
> >
> > Furthermore, it would also be good to report what bugs we are actually
> > fixing, from what you are writing falling back to the current method if
> > !DYNAMIC_FTRACE_WITH_REGS is broken in many ways and I would start with
> > fixing the current behaviour with something that does not depend on arch
> > features that may not even be implemented.
>
> There are two problems with the current method:
>
> 1. It may dereference pci_dev after it was freed
> 2. The pci_dev's children inherit its fake pci_bus's ops on
> enumeration
>
> Both result in kernel panic.
That's my point, current test module is not robust, I wanted to ask if
there is a way to fix it that does not depend on arch features, because
if there is a dependency that is not met we are still not fixing the
current code, using it as a fallback can still create issues.
> The dynamic kernel patch just seemed like a cool way to inject errors
> without messing with the driver's structures. But if there's a more
> elegant way to do it, I'm all for it.
If you have a simple reproducer for the bugs I am happy to help you test
it (I can also apply arm64 DYNAMIC_FTRACE_WITH_REGS patches and test that
new code path if that's the final direction we are taking).
Thanks,
Lorenzo
Powered by blists - more mailing lists