From 10d4c0c7d59f74b3c83824dd05d3ea79b4f7d8a5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 6 Dec 2021 23:51:49 +0100 Subject: [PATCH] genirq/msi: Add abuse prevention comment to msi header Hope dies last. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20211206210749.170847844@linutronix.de --- include/linux/msi.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/linux/msi.h b/include/linux/msi.h index b54010ba7b0d9..70cc6a555a8e6 100644 --- 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 -- 2.39.5