aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorPengfei Xu <pengfei.xu@intel.com>2023-10-02 11:38:04 +0800
committerAleksandr Nogikh <nogikh@google.com>2023-10-02 10:21:45 +0000
commit50b20e75ef04c31603a5b0cfe1f59c749f172724 (patch)
tree5e88070ce31888b4d98a04a200a1e0aa249eebc7 /sys/linux
parent0c7326f3a3d0b5d82cff24da03f232d53f672aba (diff)
sys/linux: add iommufd MOCK_DOMAIN_REPLACE and ACCESS_REPLACE_IOAS descriptions
Added IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE and IOMMU_TEST_OP_ACCESS_REPLACE_IOAS ioctl syscall descriptions and let syzkaller hit these ioctls easily and quickly. Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/dev_iommu.txt18
-rw-r--r--sys/linux/dev_iommu.txt.const2
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/linux/dev_iommu.txt b/sys/linux/dev_iommu.txt
index 7abda765b..5a159a536 100644
--- a/sys/linux/dev_iommu.txt
+++ b/sys/linux/dev_iommu.txt
@@ -205,6 +205,8 @@ ioctl$IOMMU_TEST_OP_ACCESS_PAGES$syz(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], a
ioctl$IOMMU_TEST_OP_ACCESS_RW(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$access_rw])
ioctl$IOMMU_TEST_OP_ACCESS_RW$syz(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$access_rw$syz])
ioctl$IOMMU_TEST_OP_SET_TEMP_MEMORY_LIMIT(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$memory_limit])
+ioctl$IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$mock_domain_replace])
+ioctl$IOMMU_TEST_OP_ACCESS_REPLACE_IOAS(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$access_replace_ioas])
ioctl$IOMMU_DESTROY$device(fd fd_iommufd, cmd const[IOMMU_DESTROY], arg ptr[in, iommu_destroy$device])
ioctl$IOMMU_DESTROY$hwpt(fd fd_iommufd, cmd const[IOMMU_DESTROY], arg ptr[in, iommu_destroy$hwpt])
@@ -324,6 +326,22 @@ iommu_test_cmd$memory_limit {
limit int32
} [size[IOMMU_TEST_CMD_SIZE]]
+iommu_test_cmd$mock_domain_replace {
+ size len[parent, int32]
+ op const[IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE, int32]
+ id ioas_handle
+ __reserved const[0x0, int32]
+ pt_id int32
+} [size[IOMMU_TEST_CMD_SIZE]]
+
+iommu_test_cmd$access_replace_ioas {
+ size len[parent, int32]
+ op const[IOMMU_TEST_OP_ACCESS_REPLACE_IOAS, int32]
+ id fd_access
+ __reserved const[0x0, int32]
+ ioas_id int32
+} [size[IOMMU_TEST_CMD_SIZE]]
+
iommu_destroy$device {
size len[parent, int32]
id device_handle
diff --git a/sys/linux/dev_iommu.txt.const b/sys/linux/dev_iommu.txt.const
index 15b448d8c..1386e23d6 100644
--- a/sys/linux/dev_iommu.txt.const
+++ b/sys/linux/dev_iommu.txt.const
@@ -27,6 +27,8 @@ IOMMU_TEST_OP_MD_CHECK_MAP = 3
IOMMU_TEST_OP_MD_CHECK_REFS = 4
IOMMU_TEST_OP_MOCK_DOMAIN = 2
IOMMU_TEST_OP_SET_TEMP_MEMORY_LIMIT = 9
+IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE = 10
+IOMMU_TEST_OP_ACCESS_REPLACE_IOAS = 11
IOMMU_VFIO_IOAS = 15240, mips64le:ppc64le:536886152
IOMMU_VFIO_IOAS_CLEAR = 2
IOMMU_VFIO_IOAS_GET = 0