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-next>] [day] [month] [year] [list]
Message-Id: <20201210192536.118432146@linutronix.de>
Date:   Thu, 10 Dec 2020 20:25:36 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Marc Zyngier <maz@...nel.org>,
        "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
        Helge Deller <deller@....de>,
        afzal mohammed <afzal.mohd.ma@...il.com>,
        linux-parisc@...r.kernel.org, Russell King <linux@...linux.org.uk>,
        linux-arm-kernel@...ts.infradead.org,
        Mark Rutland <mark.rutland@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>, linux-s390@...r.kernel.org,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@...el.com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Wambui Karuga <wambui.karugax@...il.com>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
        Jon Mason <jdmason@...zu.us>,
        Dave Jiang <dave.jiang@...el.com>,
        Allen Hubbe <allenbh@...il.com>, linux-ntb@...glegroups.com,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Michal Simek <michal.simek@...inx.com>,
        linux-pci@...r.kernel.org,
        Karthikeyan Mitran <m.karthikeyan@...iveil.co.in>,
        Hou Zhiqiang <Zhiqiang.Hou@....com>,
        Tariq Toukan <tariqt@...dia.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        xen-devel@...ts.xenproject.org
Subject: [patch 00/30] genirq: Treewide hunt for irq descriptor abuse and
 assorted fixes

A recent request to export kstat_irqs() pointed to a copy of the same in
the i915 code, which made me look for further usage of irq descriptors in
drivers.

The usage in drivers ranges from creative to broken in all colours.

irqdesc.h clearly says that this is core functionality and the fact C does
not allow full encapsulation is not a justification to fiddle with it just
because. It took us a lot of effort to make the core functionality provide
what drivers need.

If there is a shortcoming, it's not asked too much to talk to the relevant
maintainers instead of going off and fiddling with the guts of interrupt
descriptors and often enough without understanding lifetime and locking
rules.

As people insist on not respecting boundaries, this series cleans up the
(ab)use and at the end removes the export of irq_to_desc() to make it at
least harder. All legitimate users of this are built in.

While at it I stumbled over some other oddities related to interrupt
counting and cleaned them up as well.

The series applies on top of

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core

and is also available from git:

  git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git genirq

Thanks,

	tglx
---
 arch/alpha/kernel/sys_jensen.c                       |    2 
 arch/arm/kernel/smp.c                                |    2 
 arch/parisc/kernel/irq.c                             |    7 
 arch/s390/kernel/irq.c                               |    2 
 arch/x86/kernel/topology.c                           |    1 
 arch/arm64/kernel/smp.c                              |    2 
 drivers/gpu/drm/i915/display/intel_lpe_audio.c       |    4 
 drivers/gpu/drm/i915/i915_irq.c                      |   34 +++
 drivers/gpu/drm/i915/i915_pmu.c                      |   18 -
 drivers/gpu/drm/i915/i915_pmu.h                      |    8 
 drivers/mfd/ab8500-debugfs.c                         |   16 -
 drivers/net/ethernet/mellanox/mlx4/en_cq.c           |    8 
 drivers/net/ethernet/mellanox/mlx4/en_rx.c           |    6 
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h         |    3 
 drivers/net/ethernet/mellanox/mlx5/core/en.h         |    2 
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c    |    2 
 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c    |    6 
 drivers/ntb/msi.c                                    |    4 
 drivers/pci/controller/mobiveil/pcie-mobiveil-host.c |    8 
 drivers/pci/controller/pcie-xilinx-nwl.c             |    8 
 drivers/pinctrl/nomadik/pinctrl-nomadik.c            |    3 
 drivers/xen/events/events_base.c                     |  172 +++++++++++--------
 drivers/xen/evtchn.c                                 |   34 ---
 include/linux/interrupt.h                            |    1 
 include/linux/irq.h                                  |    7 
 include/linux/irqdesc.h                              |   40 +---
 include/linux/kernel_stat.h                          |    1 
 kernel/irq/irqdesc.c                                 |   42 ++--
 kernel/irq/manage.c                                  |   37 ++++
 kernel/irq/proc.c                                    |    5 
 30 files changed, 263 insertions(+), 222 deletions(-)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ