[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h6bm1ngo.fsf@mail.lhotse>
Date: Thu, 15 Aug 2024 13:20:23 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Bjorn Helgaas <helgaas@...nel.org>, Amit Machhiwal
<amachhiw@...ux.ibm.com>, Rob Herring <robh@...nel.org>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
kvm-ppc@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>, Lizhi Hou
<lizhi.hou@....com>, Saravana Kannan <saravanak@...gle.com>, Vaibhav Jain
<vaibhav@...ux.ibm.com>, Nicholas Piggin <npiggin@...il.com>, Vaidyanathan
Srinivasan <svaidy@...ux.ibm.com>, Kowshik Jois B S
<kowsjois@...ux.ibm.com>, Lukas Wunner <lukas@...ner.de>,
kernel-team@...ts.ubuntu.com, Stefan Bader <stefan.bader@...onical.com>
Subject: Re: [PATCH v3] PCI: Fix crash during pci_dev hot-unplug on pseries
KVM guest
Bjorn Helgaas <helgaas@...nel.org> writes:
> On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote:
>> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and hot-unplug sequence
>> of a PCI device attached to a PCI-bridge causes following kernel Oops on
>> a pseries KVM guest:
>
> What is unique about pseries here? There's nothing specific to
> pseries in the patch, so I would expect this to be a generic problem
> on any arch.
>
>> RTAS: event: 2, Type: Hotplug Event (229), Severity: 1
>> Kernel attempted to read user page (10ec00000048) - exploit attempt? (uid: 0)
>> BUG: Unable to handle kernel data access on read at 0x10ec00000048
>
> Weird address. I would expect NULL or something. Where did this
> non-NULL pointer come from?
It originally comes from np->data, which is supposed to be an
of_changeset.
The powerpc code also uses np->data for the struct pci_dn pointer, see
pci_add_device_node_info().
I wonder if that's why it's non-NULL?
Amit, do we have exact steps to reproduce this? I poked around a bit but
couldn't get it to trigger.
cheers
Powered by blists - more mailing lists