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: <20260105190747.625082-1-cmllamas@google.com>
Date: Mon,  5 Jan 2026 19:07:46 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>, 
	Robin Murphy <robin.murphy@....com>, Jason Gunthorpe <jgg@...pe.ca>, Kevin Tian <kevin.tian@...el.com>, 
	Vasant Hegde <vasant.hegde@....com>, Lu Baolu <baolu.lu@...ux.intel.com>, 
	Andrew Morton <akpm@...ux-foundation.org>
Cc: kernel-team@...roid.com, linux-kernel@...r.kernel.org, 
	Carlos Llamas <cmllamas@...gle.com>, "open list:IOMMU SUBSYSTEM" <iommu@...ts.linux.dev>
Subject: [PATCH] iommu/sva: include mmu_notifier.h header

A call to mmu_notifier_arch_invalidate_secondary_tlbs() was introduced
in commit e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for
kernel address space") but without explicitly adding its corresponding
header file <linux/mmu_notifier.h>. This was evidenced while trying to
enable compile testing support for IOMMU_SVA:

   config IOMMU_SVA
          select IOMMU_MM_DATA
  -       bool
  +       bool "Shared Virtual Addressing" if COMPILE_TEST

The thing is for certain architectures this header file is indirectly
included via <asm/tlbflush.h>. However, for others such as 32-bit arm
the header is missing and it results in a build failure:

  $ make ARCH=arm allmodconfig
  [...]
  drivers/iommu/iommu-sva.c:340:3: error: call to undeclared function 'mmu_notifier_arch_invalidate_secondary_tlbs' [...]
    340 |  mmu_notifier_arch_invalidate_secondary_tlbs(iommu_mm->mm, start, end);
        |  ^

Fix this by including the appropriate header file.

Fixes: e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for kernel address space")
Signed-off-by: Carlos Llamas <cmllamas@...gle.com>
---
 drivers/iommu/iommu-sva.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c
index d236aef80a8d..e1e63c2be82b 100644
--- a/drivers/iommu/iommu-sva.c
+++ b/drivers/iommu/iommu-sva.c
@@ -3,6 +3,7 @@
  * Helpers for IOMMU drivers implementing SVA
  */
 #include <linux/mmu_context.h>
+#include <linux/mmu_notifier.h>
 #include <linux/mutex.h>
 #include <linux/sched/mm.h>
 #include <linux/iommu.h>
-- 
2.52.0.358.g0dd7633a29-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ