[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya8Zj+bADtKEISSP@kroah.com>
Date: Tue, 7 Dec 2021 09:21:35 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <helgaas@...nel.org>,
Marc Zygnier <maz@...nel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Kevin Tian <kevin.tian@...el.com>,
Jason Gunthorpe <jgg@...dia.com>,
Megha Dey <megha.dey@...el.com>,
Ashok Raj <ashok.raj@...el.com>, linux-pci@...r.kernel.org,
Cedric Le Goater <clg@...d.org>,
xen-devel@...ts.xenproject.org, Juergen Gross <jgross@...e.com>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
linux-s390@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Logan Gunthorpe <logang@...tatee.com>,
Jon Mason <jdmason@...zu.us>,
Dave Jiang <dave.jiang@...el.com>,
Allen Hubbe <allenbh@...il.com>, linux-ntb@...glegroups.com
Subject: Re: [patch V2 29/31] genirq/msi: Add abuse prevention comment to msi
header
On Mon, Dec 06, 2021 at 11:51:49PM +0100, Thomas Gleixner wrote:
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
> include/linux/msi.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> --- a/include/linux/msi.h
> +++ b/include/linux/msi.h
> @@ -2,6 +2,20 @@
> #ifndef LINUX_MSI_H
> #define LINUX_MSI_H
>
> +/*
> + * This header file contains MSI data structures and functions which are
> + * only relevant for:
> + * - Interrupt core code
> + * - PCI/MSI core code
> + * - MSI interrupt domain implementations
> + * - IOMMU, low level VFIO, NTB and other justified exceptions
> + * dealing with low level MSI details.
> + *
> + * Regular device drivers have no business with any of these functions and
> + * especially storing MSI descriptor pointers in random code is considered
> + * abuse. The only function which is relevant for drivers is msi_get_virq().
> + */
> +
> #include <linux/cpumask.h>
> #include <linux/mutex.h>
> #include <linux/list.h>
>
Ah, to be young and idealistic and hope that kernel developers read
comments in header files :)
You might want to add this to the driver-api kernel doc build?
Anyway, looks good to me:
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists