mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-11 06:25:17 +00:00
sys/fuchsia: update zx_clock_get syscall (#1292)
* sys/fuchsia: update zx_clock_get. zx_clock_get was deprecated and replaced by zx_clock_get_new. In a recent CL[0], they replaced the zx_clock_get by zx_clock_get_new and moved all client. This commit updates syzkaller to use the new function. [0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/298575 * run make extract && make generate
This commit is contained in:
parent
4ec4ea4890
commit
0d10349cf0
@ -223,6 +223,7 @@ static long syz_job_default(void)
|
||||
static long syz_future_time(volatile long when)
|
||||
{
|
||||
zx_time_t delta_ms;
|
||||
zx_time_t now;
|
||||
switch (when) {
|
||||
case 0:
|
||||
delta_ms = 5;
|
||||
@ -234,7 +235,7 @@ static long syz_future_time(volatile long when)
|
||||
delta_ms = 10000;
|
||||
break;
|
||||
}
|
||||
zx_time_t now = zx_clock_get(ZX_CLOCK_MONOTONIC);
|
||||
zx_clock_get(ZX_CLOCK_MONOTONIC, &now);
|
||||
return now + delta_ms * 1000 * 1000;
|
||||
}
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
#if GOARCH_amd64
|
||||
#define GOARCH "amd64"
|
||||
#define SYZ_REVISION "10ad2411f1db75aaa4971061b5f008e17d8dd923"
|
||||
#define SYZ_REVISION "0831ecb34bc4bfd3c444366782fdbd3fafe56026"
|
||||
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
|
||||
#define SYZ_EXECUTOR_USES_SHMEM 0
|
||||
#define SYZ_PAGE_SIZE 4096
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
#if GOARCH_arm64
|
||||
#define GOARCH "arm64"
|
||||
#define SYZ_REVISION "8513a6093b2306314106c924eee6cb5263d85436"
|
||||
#define SYZ_REVISION "b643855d1cb7438abcacb87d29a4dfdd49961397"
|
||||
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
|
||||
#define SYZ_EXECUTOR_USES_SHMEM 0
|
||||
#define SYZ_PAGE_SIZE 4096
|
||||
|
@ -1537,7 +1537,6 @@ const call_t syscalls[] = {
|
||||
{"zx_channel_write$fuchsia_timezone_TimezoneWatcherOnTimezoneOffsetChange", 0, (syscall_t)zx_channel_write},
|
||||
{"zx_clock_get", 0, (syscall_t)zx_clock_get},
|
||||
{"zx_clock_get_monotonic", 0, (syscall_t)zx_clock_get_monotonic},
|
||||
{"zx_clock_get_new", 0, (syscall_t)zx_clock_get_new},
|
||||
{"zx_cprng_add_entropy", 0, (syscall_t)zx_cprng_add_entropy},
|
||||
{"zx_cprng_draw", 0, (syscall_t)zx_cprng_draw},
|
||||
{"zx_deadline_after", 0, (syscall_t)zx_deadline_after},
|
||||
@ -1958,7 +1957,6 @@ const call_t syscalls[] = {
|
||||
{"zx_channel_write$fuchsia_timezone_TimezoneWatcherOnTimezoneOffsetChange", 0, (syscall_t)zx_channel_write},
|
||||
{"zx_clock_get", 0, (syscall_t)zx_clock_get},
|
||||
{"zx_clock_get_monotonic", 0, (syscall_t)zx_clock_get_monotonic},
|
||||
{"zx_clock_get_new", 0, (syscall_t)zx_clock_get_new},
|
||||
{"zx_cprng_add_entropy", 0, (syscall_t)zx_cprng_add_entropy},
|
||||
{"zx_cprng_draw", 0, (syscall_t)zx_cprng_draw},
|
||||
{"zx_deadline_after", 0, (syscall_t)zx_deadline_after},
|
||||
|
@ -981,6 +981,7 @@ static long syz_job_default(void)
|
||||
static long syz_future_time(volatile long when)
|
||||
{
|
||||
zx_time_t delta_ms;
|
||||
zx_time_t now;
|
||||
switch (when) {
|
||||
case 0:
|
||||
delta_ms = 5;
|
||||
@ -992,7 +993,7 @@ static long syz_future_time(volatile long when)
|
||||
delta_ms = 10000;
|
||||
break;
|
||||
}
|
||||
zx_time_t now = zx_clock_get(ZX_CLOCK_MONOTONIC);
|
||||
zx_clock_get(ZX_CLOCK_MONOTONIC, &now);
|
||||
return now + delta_ms * 1000 * 1000;
|
||||
}
|
||||
#endif
|
||||
|
@ -6944,12 +6944,9 @@ var syscalls_amd64 = []*Syscall{
|
||||
}},
|
||||
{Name: "zx_clock_get", CallName: "zx_clock_get", Args: []Type{
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "clock_id", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_time", FldName: "ret", TypeSize: 8, ArgDir: 1}}},
|
||||
{Name: "zx_clock_get_monotonic", CallName: "zx_clock_get_monotonic"},
|
||||
{Name: "zx_clock_get_new", CallName: "zx_clock_get_new", Args: []Type{
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "clock_id", TypeSize: 4}}},
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "zx_time", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8, ArgDir: 1}}}},
|
||||
}},
|
||||
{Name: "zx_clock_get_monotonic", CallName: "zx_clock_get_monotonic"},
|
||||
{Name: "zx_cprng_add_entropy", CallName: "zx_cprng_add_entropy", Args: []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
|
||||
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Path: []string{"buffer"}},
|
||||
@ -7797,4 +7794,4 @@ var consts_amd64 = []ConstValue{
|
||||
{Name: "fuchsia_power_Status_OK"},
|
||||
}
|
||||
|
||||
const revision_amd64 = "10ad2411f1db75aaa4971061b5f008e17d8dd923"
|
||||
const revision_amd64 = "0831ecb34bc4bfd3c444366782fdbd3fafe56026"
|
||||
|
@ -6944,12 +6944,9 @@ var syscalls_arm64 = []*Syscall{
|
||||
}},
|
||||
{Name: "zx_clock_get", CallName: "zx_clock_get", Args: []Type{
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "clock_id", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_time", FldName: "ret", TypeSize: 8, ArgDir: 1}}},
|
||||
{Name: "zx_clock_get_monotonic", CallName: "zx_clock_get_monotonic"},
|
||||
{Name: "zx_clock_get_new", CallName: "zx_clock_get_new", Args: []Type{
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "clock_id", TypeSize: 4}}},
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "zx_time", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8, ArgDir: 1}}}},
|
||||
}},
|
||||
{Name: "zx_clock_get_monotonic", CallName: "zx_clock_get_monotonic"},
|
||||
{Name: "zx_cprng_add_entropy", CallName: "zx_cprng_add_entropy", Args: []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
|
||||
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Path: []string{"buffer"}},
|
||||
@ -7797,4 +7794,4 @@ var consts_arm64 = []ConstValue{
|
||||
{Name: "fuchsia_power_Status_OK"},
|
||||
}
|
||||
|
||||
const revision_arm64 = "8513a6093b2306314106c924eee6cb5263d85436"
|
||||
const revision_arm64 = "b643855d1cb7438abcacb87d29a4dfdd49961397"
|
||||
|
@ -6,8 +6,7 @@ include <zircon/syscalls.h>
|
||||
resource zx_time[int64]: 0, ZX_TIME_INFINITE
|
||||
|
||||
zx_nanosleep(deadline zx_time)
|
||||
zx_clock_get(clock_id flags[clock_id]) zx_time
|
||||
zx_clock_get_new(clock_id int32, zx_time ptr[out, intptr])
|
||||
zx_clock_get(clock_id flags[clock_id], zx_time ptr[out, intptr])
|
||||
zx_clock_get_monotonic()
|
||||
zx_ticks_get()
|
||||
zx_ticks_per_second()
|
||||
|
Loading…
x
Reference in New Issue
Block a user