linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Fixes for HiSilicon LPC driver and logical PIO code
@ 2019-06-24 14:35 John Garry
  2019-06-24 14:35 ` [PATCH v2 1/6] lib: logic_pio: Fix RCU usage John Garry
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: John Garry @ 2019-06-24 14:35 UTC (permalink / raw)
  To: xuwei5
  Cc: bhelgaas, linuxarm, linux-kernel, linux-pci, arnd, olof, John Garry

As reported in [1], the hisi-lpc driver has certain issues in handling
logical PIO regions, specifically unregistering regions.

This series add a method to unregister a logical PIO region, and fixes up
the driver to use them.

RCU usage in logical PIO code looks to always have been broken, so that
is fixed also. This is not a major fix as the list which RCU protects
would be rarely modified.

There is another patch to simplify logical PIO registration, made possible
by the fixes.

At this point, there are still separate ongoing discussions about how to
stop the logical PIO and PCI host bridge code leaking ranges, as in [2].

Hopefully this series can go through the arm soc tree and the maintainers
have no issue with that. I'm talking specifically about the logical PIO
code, which went through PCI tree on only previous upstreaming.

Cc. linux-pci@vger.kernel.org

[1] https://lore.kernel.org/lkml/1560770148-57960-1-git-send-email-john.garry@huawei.com/
[2] https://lore.kernel.org/lkml/4b24fd36-e716-7c5e-31cc-13da727802e7@huawei.com/

Changes since v1:
- Add more reasoning in RCU fix patch
- Create separate patch to change LOGIC_PIO_CPU_MMIO registration to
  accomodate unregistration

John Garry (6):
  lib: logic_pio: Fix RCU usage
  lib: logic_pio: Avoid possible overlap for unregistering regions
  lib: logic_pio: Add logic_pio_unregister_range()
  bus: hisi_lpc: Unregister logical PIO range to avoid potential
    use-after-free
  bus: hisi_lpc: Add .remove method to avoid driver unbind crash
  lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at
    registration

 drivers/bus/hisi_lpc.c    | 43 +++++++++++++++++---
 include/linux/logic_pio.h |  1 +
 lib/logic_pio.c           | 86 +++++++++++++++++++++++++++------------
 3 files changed, 99 insertions(+), 31 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-25  9:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 14:35 [PATCH v2 0/6] Fixes for HiSilicon LPC driver and logical PIO code John Garry
2019-06-24 14:35 ` [PATCH v2 1/6] lib: logic_pio: Fix RCU usage John Garry
2019-06-24 14:35 ` [PATCH v2 2/6] lib: logic_pio: Avoid possible overlap for unregistering regions John Garry
2019-06-24 14:35 ` [PATCH v2 3/6] lib: logic_pio: Add logic_pio_unregister_range() John Garry
2019-06-24 14:35 ` [PATCH v2 4/6] bus: hisi_lpc: Unregister logical PIO range to avoid potential use-after-free John Garry
2019-06-24 14:35 ` [PATCH v2 5/6] bus: hisi_lpc: Add .remove method to avoid driver unbind crash John Garry
2019-06-24 14:35 ` [PATCH v2 6/6] lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at registration John Garry
2019-06-25  9:57 ` [PATCH v2 0/6] Fixes for HiSilicon LPC driver and logical PIO code Wei Xu

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).