• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 syzkaller project authors. All rights reserved.
2# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
3
4# See https://fuchsia.googlesource.com/zircon/+/master/docs/syscalls.md
5
6include <zircon/syscalls.h>
7include <ddk/driver.h>
8
9# Provided by sysroot (include/ddk/driver.h)
10resource zx_root_resource[zx_handle]
11get_root_resource() zx_root_resource
12
13# Used by syzkaller to allocate memory for syscall arguments.
14syz_mmap(addr vma, len len[addr])
15
16# Provided by process runtime (zircon/process.h).
17syz_process_self() zx_process
18syz_thread_self() zx_thread
19syz_vmar_root_self() zx_vmar
20syz_job_default() zx_job
21
22# TODO: the get_system_features_options flags are only valid on ARM;
23# find a way to make syzkaller generate ARM-specific code
24# zx_system_features(kind int32, features flags[get_system_features_options])
25zx_system_get_num_cpus()
26zx_system_get_physmem()
27zx_system_get_version(version ptr[out, array[int8]], version_len len[version])
28
29zx_cprng_draw(buffer ptr[out, array[int8]], len len[buffer], actual ptr[out, intptr])
30zx_cprng_add_entropy(buffer ptr[in, array[int8]], len len[buffer])
31
32zx_vmar_unmap_handle_close_thread_exit(vmar_handle zx_vmar, addr vma, len len[addr], close_handle zx_handle)
33zx_futex_wake_handle_close_thread_exit(value_ptr ptr[in, int32], wake_count int32, new_value int32, close_handle zx_handle)
34
35# get_system_features_options = ZX_ARM_64_ISA_FP, ZX_ARM64_FEATURE_ASIMD, ZX_ARM64_FEATURE_ISA_AES, ZX_ARM64_FEATURE_ISA_PMULL, ZX_ARM64_FEATURE_ISA_SHA1, ZX_ARM64_FEATURE_ISA_SHA2, ZX_ARM64_FEATURE_ISA_CRC32, ZX_ARM64_FEATURE_ISA_ATOMICS, ZX_ARM64_FEATURE_ISA_RDM, ZX_ARM64_FEATURE_ISA_SHA3, ZX_ARM64_FEATURE_ISA_SM3, ZX_ARM64_FEATURE_ISA_SM4, ZX_ARM64_FEATURE_ISA_DP, ZX_ARM64_FEATURE_ISA_DPB
36