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]
Date:   Mon, 8 May 2023 21:51:46 -0700
From:   Nicolin Chen <nicolinc@...dia.com>
To:     <jgg@...dia.com>, <kevin.tian@...el.com>
CC:     <robin.murphy@....com>, <eric.auger@...hat.com>,
        <yi.l.liu@...el.com>, <baolu.lu@...ux.intel.com>,
        <will@...nel.org>, <joro@...tes.org>,
        <shameerali.kolothum.thodi@...wei.com>, <jean-philippe@...aro.org>,
        <linux-arm-kernel@...ts.infradead.org>, <iommu@...ts.linux.dev>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH RFC v4 0/4] Add set_dev_data and unset_dev_data support

Changelog
v4:
 * Rebased on top of v6.4-rc1, and iommufd_nesting-v2 (candidate)
 * Dropped WARN_ON in the destroy()
v3:
 https://lore.kernel.org/all/cover.1682234302.git.nicolinc@nvidia.com/
 * Reverted the data in VFIO BIND ioctl to a set of new iommufd ioctls
 * Replaced the iommu_device_data_size array with a dev_user_data_len
   variable in the iommu_ops structure.
 * Added has_dev_data check and locking protection
 * Added selftest coverage
v2:
 https://lore.kernel.org/all/cover.1681976394.git.nicolinc@nvidia.com/
 * Integrated the uAPI into VFIO_DEVICE_BIND_IOMMUFD call
 * Renamed the previous set_rid_user to set_dev_data, to decouple from
   the PCI regime.
v1:
 https://lore.kernel.org/all/cover.1680762112.git.nicolinc@nvidia.com/

This is a pair of new uAPI/ops for user space to set an iommu specific
device data for a passthrough device. This is primarily used by SMMUv3
driver for now, to link the vSID and the pSID of a device that's behind
the SMMU. The link (lookup table) will be used to verify any ATC_INV
command from the user space for that device, and then replace the SID
field (virtual SID) with the corresponding physical SID.

This series is available on Github:
https://github.com/nicolinc/iommufd/commits/set_dev_data-rfc-v4

Thanks!
Nicolin

Nicolin Chen (4):
  iommu: Add set/unset_dev_user_data ops
  iommufd: Add IOMMUFD_CMD_DEVICE_SET_DATA and
    IOMMUFD_CMD_DEVICE_UNSET_DATA
  iommufd/selftest: Add IOMMU_TEST_OP_DEV_CHECK_DATA
  iommufd/selftests: Add coverage for IOMMU_DEVICE_SET/UNSET_DATA

 drivers/iommu/iommufd/device.c                | 81 +++++++++++++++++++
 drivers/iommu/iommufd/iommufd_private.h       |  3 +
 drivers/iommu/iommufd/iommufd_test.h          | 15 ++++
 drivers/iommu/iommufd/main.c                  |  4 +
 drivers/iommu/iommufd/selftest.c              | 42 ++++++++++
 include/linux/iommu.h                         | 13 +++
 include/uapi/linux/iommufd.h                  | 32 ++++++++
 tools/testing/selftests/iommu/iommufd.c       | 20 +++++
 tools/testing/selftests/iommu/iommufd_utils.h | 59 ++++++++++++++
 9 files changed, 269 insertions(+)

-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ