github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/fuchsia/job.txt (about)

     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://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/job.fidl
     5  
     6  include <zircon/syscalls.h>
     7  include <zircon/syscalls/policy.h>
     8  
     9  resource zx_job[zx_task]
    10  
    11  zx_job_create(job zx_job, options const[0], out ptr[out, zx_job])
    12  
    13  zx_job_set_policy$BASIC_V1(job_handle zx_job, options flags[job_policy_options], topic const[ZX_JOB_POL_BASIC_V1], policy ptr[in, array[zx_policy_basic_v1]], count len[policy])
    14  zx_job_set_policy$BASIC_V2(job_handle zx_job, options flags[job_policy_options], topic const[ZX_JOB_POL_BASIC_V2], policy ptr[in, array[zx_policy_basic_v2]], count len[policy])
    15  zx_job_set_policy$TIMER_SLACK(job_handle zx_job, options flags[job_policy_options], topic const[ZX_JOB_POL_TIMER_SLACK], policy ptr[in, array[zx_policy_timer_slack, 1]], count len[policy])
    16  zx_job_set_critical(job zx_job, options flags[job_critical_options], process zx_process)
    17  
    18  zx_policy_basic_v1 {
    19  	condition	flags[zx_policy_condition, int32]
    20  	policy		flags[zx_policy_action, int32]
    21  }
    22  
    23  zx_policy_basic_v2 {
    24  	condition	flags[zx_policy_condition, int32]
    25  	action		flags[zx_policy_action, int32]
    26  	flags		flags[zx_policy_flags, int32]
    27  }
    28  
    29  zx_policy_timer_slack {
    30  	min_slack	int64
    31  	default_mode	flags[zx_policy_timer_mode, int32]
    32  # not mentioned in `job.fidl` but present in `policy.h`
    33  	padding1	array[int8, 4]
    34  }
    35  
    36  job_policy_options = ZX_JOB_POL_RELATIVE, ZX_JOB_POL_ABSOLUTE
    37  
    38  zx_policy_condition = ZX_POL_BAD_HANDLE, ZX_POL_WRONG_OBJECT, ZX_POL_VMAR_WX, ZX_POL_NEW_VMO, ZX_POL_NEW_CHANNEL, ZX_POL_NEW_EVENT, ZX_POL_NEW_PORT, ZX_POL_NEW_SOCKET, ZX_POL_NEW_FIFO, ZX_POL_NEW_TIMER, ZX_POL_NEW_ANY, ZX_POL_NEW_EVENTPAIR, ZX_POL_NEW_PROCESS, ZX_POL_NEW_PROFILE, ZX_POL_NEW_PAGER, ZX_POL_AMBIENT_MARK_VMO_EXEC
    39  zx_policy_action = ZX_POL_ACTION_ALLOW, ZX_POL_ACTION_DENY, ZX_POL_ACTION_KILL, ZX_POL_ACTION_ALLOW_EXCEPTION, ZX_POL_ACTION_DENY_EXCEPTION
    40  zx_policy_flags = ZX_POL_OVERRIDE_ALLOW, ZX_POL_OVERRIDE_DENY
    41  zx_policy_timer_mode = ZX_TIMER_SLACK_CENTER, ZX_TIMER_SLACK_EARLY, ZX_TIMER_SLACK_LATE
    42  
    43  job_critical_options = ZX_JOB_CRITICAL_PROCESS_RETCODE_NONZERO