From: Keith Busch <keith.busch@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCHv2 4/4] PCI/AER: Covertly inject errors with ftrace hooks
Date: Thu, 11 Oct 2018 13:42:14 -0600 [thread overview]
Message-ID: <20181011194214.GF11034@localhost.localdomain> (raw)
In-Reply-To: <20181011194146.GU5906@bhelgaas-glaptop.roam.corp.google.com>
On Thu, Oct 11, 2018 at 02:41:46PM -0500, Bjorn Helgaas wrote:
> On Thu, Oct 11, 2018 at 12:34:13PM -0600, Keith Busch wrote:
> > The aer_inject module had been intercepting config requests by overwriting
> > the config accessor operations in the pci_bus ops. This has several
> > issues.
> >
> > First, the module was tracking kernel objects unbeknownst to the drivers
> > that own them. The kernel may free those devices, leaving the AER inject
> > module holding stale references and no way to know that happened.
> >
> > Second, the PCI enumeration has child devices inherit pci_bus ops from
> > the parent bus. Since errors may lead to link resets that trigger
> > re-enumeration, the child devices would inherit operations that don't
> > know about the devices using them, causing kernel crashes.
> >
> > Finally, CONFIG_PCI_LOCKLESS_CONFIG doesn't block accessing the pci_bus
> > ops, so it's racing with potential in-flight config requests.
> >
> > This patch uses a different error injection approach leveraging ftrace
> > to thunk the config space functions. If the kernel and architecture
> > are capable, the ftrace hook will overwrite the processor's function
> > call address with the error injection function. This discreet error
> > injection doesn't modify or track driver structures, fixing the issues
> > with the current method.
> >
> > If either the kernel config or platform arch do not support the necessary
> > ftrace capabilities, the aer_inject module will fallback to the older
> > way so that it may continue to be used as before.
>
> I dropped this patch for now because the 0-day robot found something wrong.
I just saw that. Sorry for the trouble. It fails a minimal kernel
config, so I missed checking appropriate config defines.
next prev parent reply other threads:[~2018-10-11 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 18:34 [PATCHv2 0/4] aer inject updates Keith Busch
2018-10-11 18:34 ` [PATCHv2 1/4] PCI/AER: Reuse existing pcie_port_find_device() interface Keith Busch
2018-10-11 18:34 ` [PATCHv2 2/4] PCI/AER: Abstract AER interrupt handling Keith Busch
2018-10-11 18:34 ` [PATCHv2 3/4] PCI/AER: Refactor error injection fallbacks Keith Busch
2018-10-11 18:34 ` [PATCHv2 4/4] PCI/AER: Covertly inject errors with ftrace hooks Keith Busch
2018-10-11 19:41 ` Bjorn Helgaas
2018-10-11 19:42 ` Keith Busch [this message]
2018-10-11 19:02 ` [PATCHv2 0/4] aer inject updates Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181011194214.GF11034@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).