From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ams.source.kernel.org (ams.source.kernel.org. [145.40.68.75]) by gmr-mx.google.com with ESMTPS id o29si320474wms.1.2021.12.07.00.21.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 00:21:39 -0800 (PST) Date: Tue, 7 Dec 2021 09:21:35 +0100 From: Greg Kroah-Hartman Subject: Re: [patch V2 29/31] genirq/msi: Add abuse prevention comment to msi header Message-ID: References: <20211206210600.123171746@linutronix.de> <20211206210749.170847844@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211206210749.170847844@linutronix.de> To: Thomas Gleixner Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , xen-devel@lists.xenproject.org, Juergen Gross , Niklas Schnelle , linux-s390@vger.kernel.org, Heiko Carstens , Christian Borntraeger , Logan Gunthorpe , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com List-ID: On Mon, Dec 06, 2021 at 11:51:49PM +0100, Thomas Gleixner wrote: > Signed-off-by: Thomas Gleixner > --- > 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 > #include > #include > 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