aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fuchsia/bti.txt17
-rw-r--r--sys/fuchsia/cache.txt10
-rw-r--r--sys/fuchsia/ddk.txt4
-rw-r--r--sys/fuchsia/iommu.txt12
-rw-r--r--sys/fuchsia/pmt.txt10
-rw-r--r--sys/fuchsia/process.txt22
-rw-r--r--sys/fuchsia/processes.txt13
7 files changed, 71 insertions, 17 deletions
diff --git a/sys/fuchsia/bti.txt b/sys/fuchsia/bti.txt
new file mode 100644
index 000000000..c8cccb0c8
--- /dev/null
+++ b/sys/fuchsia/bti.txt
@@ -0,0 +1,17 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# See: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/bti.fidl
+
+include <zircon/syscalls.h>
+
+resource zx_bti[zx_handle]
+
+zx_bti_create(iommu zx_iommu, options flags[bti_create_options], bti_id int64, bti ptr[out, zx_bti])
+
+zx_bti_pin(handle zx_bti, options flags[bti_pin_options], vmo zx_vmo, offset int64, size int64, addrs ptr[out, array[intptr]], num_addrs len[addrs], pmt ptr[out, zx_pmt])
+
+zx_bti_release_quarantine(bti zx_bti)
+
+bti_create_options = 0
+bti_pin_options = ZX_BTI_PERM_READ, ZX_BTI_PERM_WRITE, ZX_BTI_PERM_EXECUTE, ZX_BTI_COMPRESS, ZX_BTI_CONTIGUOUS
diff --git a/sys/fuchsia/cache.txt b/sys/fuchsia/cache.txt
new file mode 100644
index 000000000..e6e750d09
--- /dev/null
+++ b/sys/fuchsia/cache.txt
@@ -0,0 +1,10 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# See: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/cache.fidl
+
+include <zircon/syscalls.h>
+
+zx_cache_flush(addr ptr[in, array[int8]], size len[addr], options flags[cache_flush_options])
+
+cache_flush_options = ZX_CACHE_FLUSH_DATA, ZX_CACHE_FLUSH_INVALIDATE, ZX_CACHE_FLUSH_INSN
diff --git a/sys/fuchsia/ddk.txt b/sys/fuchsia/ddk.txt
index 2bc278136..9a886b1d6 100644
--- a/sys/fuchsia/ddk.txt
+++ b/sys/fuchsia/ddk.txt
@@ -3,7 +3,3 @@
include <zircon/syscalls.h>
include <zircon/types.h>
-
-cache_flush_flags = ZX_CACHE_FLUSH_DATA, ZX_CACHE_FLUSH_INVALIDATE, ZX_CACHE_FLUSH_INSN
-
-zx_cache_flush(addr ptr[out, intptr], size int64, flags flags[cache_flush_flags])
diff --git a/sys/fuchsia/iommu.txt b/sys/fuchsia/iommu.txt
new file mode 100644
index 000000000..f6bcffbbf
--- /dev/null
+++ b/sys/fuchsia/iommu.txt
@@ -0,0 +1,12 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# See: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/iommu.fidl
+
+include <zircon/syscalls.h>
+
+resource zx_iommu[zx_handle]
+
+zx_iommu_create(handle zx_handle, type flags[iommu_create_type], desc ptr[in, array[int8]], size len[desc], out_handle ptr[out, zx_iommu])
+
+iommu_create_type = ZX_IOMMU_TYPE_DUMMY
diff --git a/sys/fuchsia/pmt.txt b/sys/fuchsia/pmt.txt
new file mode 100644
index 000000000..7bdd65643
--- /dev/null
+++ b/sys/fuchsia/pmt.txt
@@ -0,0 +1,10 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# See: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/pmt.fidl
+
+include <zircon/syscalls.h>
+
+resource zx_pmt[zx_handle]
+
+zx_pmt_unpin(handle zx_pmt)
diff --git a/sys/fuchsia/process.txt b/sys/fuchsia/process.txt
new file mode 100644
index 000000000..c4e57d175
--- /dev/null
+++ b/sys/fuchsia/process.txt
@@ -0,0 +1,22 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# See: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/process.fidl
+
+include <zircon/syscalls.h>
+
+resource zx_process[zx_handle]
+
+zx_process_exit(ret_code int64)
+
+zx_process_create(job zx_job, name ptr[in, string], name_len len[name], options const[0], proc_handle ptr[out, zx_process], vmar_handle ptr[out, zx_vmar])
+
+zx_process_start$allargs(proc_handle zx_process, thread_handle zx_thread, entry ptr[in, text[target]], stack intptr, arg1 zx_handle, arg2 intptr)
+
+zx_process_start$arg1(proc_handle zx_process, thread_handle zx_thread, entry ptr[in, text[target]], stack intptr, arg1 zx_handle, arg2 const[0])
+
+zx_process_start$arg2(proc_handle zx_process, thread_handle zx_thread, entry ptr[in, text[target]], stack intptr, arg1 const[0], arg2 intptr)
+
+zx_process_read_memory(proc_handle zx_process, vaddr intptr, buffer ptr[out, array[int8]], size len[buffer], actual ptr[out, int64])
+
+zx_process_write_memory(proc_handle zx_process, vaddr intptr, buffer ptr[in, array[int8]], size len[buffer], actual ptr[out, int64])
diff --git a/sys/fuchsia/processes.txt b/sys/fuchsia/processes.txt
deleted file mode 100644
index e6e6b9367..000000000
--- a/sys/fuchsia/processes.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2017 syzkaller project authors. All rights reserved.
-# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-
-include <zircon/syscalls.h>
-
-resource zx_process[zx_task]
-
-zx_process_create(job zx_job, name ptr[in, string], name_len len[name], options const[0], proc_handle ptr[out, zx_process], vmar_handle ptr[out, zx_vmar])
-zx_process_read_memory(process zx_process, vaddr ptr[out, int8], buffer ptr[out, array[int8]], len len[buffer], actual ptr[out, intptr])
-zx_process_start(process zx_process, thread zx_thread, entry ptr[in, text[target]], stack ptr[out, array[int8]], arg1 const[0], arg2 const[0])
-# TODO: temporary disabled as it crashes kernel left and right.
-# zx_process_write_memory(process zx_process, vaddr ptr[out, int8], buffer ptr[in, array[int8]], len len[buffer], actual ptr[out, intptr])
-zx_process_exit(ret_code int64)