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  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]
Date:   Tue, 19 Jan 2021 09:59:49 +0800
From:   Zhen Lei <>
To:     Will Deacon <>, Robin Murphy <>,
        "Mark Rutland" <>,
        Joerg Roedel <>,
        linux-arm-kernel <>,
        iommu <>,
        linux-kernel <>
CC:     Zhen Lei <>,
        Jean-Philippe Brucker <>,
        Neil Leeder <>,
        "Shameer Kolothum" <>
Subject: [PATCH 0/2] Use another method to avoid resource conflicts between the SMMU and PMCG drivers

Since the PMCG may implement its resigters space(4KB Page0 and 4KB Page1)
within the SMMUv3 64KB Page0. In this case, when the SMMUv3 driver reserves the
64KB Page0 resource in advance, the PMCG driver try to reserve its Page0 and
Page1 resources, a resource conflict occurs.

commit 52f3fab0067d6fa ("iommu/arm-smmu-v3: Don't reserve implementation
defined register space") reduce the resource reservation range of the SMMUv3
driver, it only reserves the first 0xe00 bytes in the 64KB Page0, to avoid
the above-mentioned resource conflicts.

But the SMMUv3.3 add support for ECMDQ, its registers space is also implemented
in the SMMUv3 64KB Page0. This means we need to build two separate mappings.
New features may be added in the future, and more independent mappings may be
required. The simple problem is complicated because the user expects to map the
entire SMMUv3 64KB Page0.

Therefore, the proper solution is: If the PMCG register resources are located in
the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict resources
when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG
driver only performs devm_ioremap() to ensure that it can work properly.

Zhen Lei (2):
  perf/smmuv3: Don't reserve the register space that overlaps with the
  Revert "iommu/arm-smmu-v3: Don't reserve implementation defined
    register space"

 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 32 +++-------------------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |  3 ---
 drivers/perf/arm_smmuv3_pmu.c               | 42 +++++++++++++++++++++++++++--
 3 files changed, 44 insertions(+), 33 deletions(-)


Powered by blists - more mailing lists