aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursell <dpursell@google.com>2019-10-30 10:00:55 -0700
committerMarco Vanotti <mvanotti@users.noreply.github.com>2019-11-14 16:21:01 -0800
commit79248ee88b39eb1a5b730f3bc0a995efed4d6a2c (patch)
tree04b01b0c1cee6866b94f5fa82e3a9087e3a52028
parenta3f5ce76b10a3c0e2a07cd96bd5a29acc42ac532 (diff)
sys/fuchsia: remove deprecated exception APIs
The port-based exception APIs have been deprecated on Fuchsia and will be removed shortly. Delete them from the syscall definitions and modify the Fuchsia executor to use the new channel-based APIs instead.
-rw-r--r--executor/common_fuchsia.h91
-rw-r--r--executor/defs.h4
-rw-r--r--executor/syscalls.h4
-rw-r--r--pkg/csource/generated.go91
-rw-r--r--pkg/report/testdata/fuchsia/report/2465
-rw-r--r--sys/fuchsia/gen/amd64.go20
-rw-r--r--sys/fuchsia/gen/arm64.go20
-rw-r--r--sys/fuchsia/objects.txt2
-rw-r--r--sys/fuchsia/tasks.txt7
-rw-r--r--sys/fuchsia/tasks_amd64.const3
-rw-r--r--sys/fuchsia/tasks_arm64.const3
11 files changed, 123 insertions, 187 deletions
diff --git a/executor/common_fuchsia.h b/executor/common_fuchsia.h
index 646173eba..b537705e4 100644
--- a/executor/common_fuchsia.h
+++ b/executor/common_fuchsia.h
@@ -31,7 +31,6 @@
#include <zircon/syscalls/debug.h>
#include <zircon/syscalls/exception.h>
#include <zircon/syscalls/object.h>
-#include <zircon/syscalls/port.h>
static __thread int skip_segv;
static __thread jmp_buf segv_env;
@@ -46,49 +45,69 @@ static void segv_handler(void)
doexit(SIGSEGV);
}
+static zx_status_t update_exception_thread_regs(zx_handle_t exception)
+{
+ zx_handle_t thread;
+ zx_status_t status = zx_exception_get_thread(exception, &thread);
+ if (status != ZX_OK) {
+ debug("zx_exception_get_thread failed: %d\n", status);
+ return status;
+ }
+
+ zx_thread_state_general_regs_t regs;
+ status = zx_thread_read_state(thread, ZX_THREAD_STATE_GENERAL_REGS,
+ &regs, sizeof(regs));
+ if (status != ZX_OK) {
+ debug("zx_thread_read_state failed: %d (%d)\n",
+ (int)sizeof(regs), status);
+ } else {
+#if GOARCH_amd64
+ regs.rip = (uint64)(void*)&segv_handler;
+#elif GOARCH_arm64
+ regs.pc = (uint64)(void*)&segv_handler;
+#else
+#error "unsupported arch"
+#endif
+ status = zx_thread_write_state(thread, ZX_THREAD_STATE_GENERAL_REGS, &regs, sizeof(regs));
+ if (status != ZX_OK) {
+ debug("zx_thread_write_state failed: %d\n", status);
+ }
+ }
+
+ zx_handle_close(thread);
+ return status;
+}
+
static void* ex_handler(void* arg)
{
- zx_handle_t port = (zx_handle_t)(long)arg;
+ zx_handle_t exception_channel = (zx_handle_t)(long)arg;
for (int i = 0; i < 10000; i++) {
- zx_port_packet_t packet = {};
- zx_status_t status = zx_port_wait(port, ZX_TIME_INFINITE, &packet);
+ zx_status_t status = zx_object_wait_one(exception_channel, ZX_CHANNEL_READABLE, ZX_TIME_INFINITE, NULL);
if (status != ZX_OK) {
- debug("zx_port_wait failed: %d\n", status);
+ debug("zx_object_wait_one failed: %d\n", status);
continue;
}
- debug("got exception packet: type=%d status=%d tid=%llu\n",
- packet.type, packet.status, (unsigned long long)(packet.exception.tid));
- zx_handle_t thread;
- status = zx_object_get_child(zx_process_self(), packet.exception.tid,
- ZX_RIGHT_SAME_RIGHTS, &thread);
+
+ zx_exception_info_t info;
+ zx_handle_t exception;
+ status = zx_channel_read(exception_channel, 0, &info, &exception, sizeof(info), 1, NULL, NULL);
if (status != ZX_OK) {
- debug("zx_object_get_child failed: %d\n", status);
+ debug("zx_channel_read failed: %d\n", status);
continue;
}
- zx_thread_state_general_regs_t regs;
- status = zx_thread_read_state(thread, ZX_THREAD_STATE_GENERAL_REGS,
- &regs, sizeof(regs));
+
+ debug("got exception: type=%d tid=%llu\n", info.type, (unsigned long long)(info.tid));
+ status = update_exception_thread_regs(exception);
if (status != ZX_OK) {
- debug("zx_thread_read_state failed: %d (%d)\n",
- (int)sizeof(regs), status);
- } else {
-#if GOARCH_amd64
- regs.rip = (uint64)(void*)&segv_handler;
-#elif GOARCH_arm64
- regs.pc = (uint64)(void*)&segv_handler;
-#else
-#error "unsupported arch"
-#endif
- status = zx_thread_write_state(thread, ZX_THREAD_STATE_GENERAL_REGS, &regs, sizeof(regs));
- if (status != ZX_OK) {
- debug("zx_thread_write_state failed: %d\n", status);
- }
+ debug("failed to update exception thread registers: %d\n", status);
}
- status = zx_task_resume_from_exception(thread, port, 0);
+
+ uint32 state = ZX_EXCEPTION_STATE_HANDLED;
+ status = zx_object_set_property(exception, ZX_PROP_EXCEPTION_STATE, &state, sizeof(state));
if (status != ZX_OK) {
- debug("zx_task_resume_from_exception failed: %d\n", status);
+ debug("zx_object_set_property(ZX_PROP_EXCEPTION_STATE) failed: %d\n", status);
}
- zx_handle_close(thread);
+ zx_handle_close(exception);
}
doexit(1);
return 0;
@@ -97,13 +116,11 @@ static void* ex_handler(void* arg)
static void install_segv_handler(void)
{
zx_status_t status;
- zx_handle_t port;
- if ((status = zx_port_create(0, &port)) != ZX_OK)
- fail("zx_port_create failed: %d", status);
- if ((status = zx_task_bind_exception_port(zx_process_self(), port, 0, 0)) != ZX_OK)
- fail("zx_task_bind_exception_port failed: %d", status);
+ zx_handle_t exception_channel;
+ if ((status = zx_task_create_exception_channel(zx_process_self(), 0, &exception_channel)) != ZX_OK)
+ fail("zx_task_create_exception_channel failed: %d", status);
pthread_t th;
- if (pthread_create(&th, 0, ex_handler, (void*)(long)port))
+ if (pthread_create(&th, 0, ex_handler, (void*)(long)exception_channel))
fail("pthread_create failed");
}
diff --git a/executor/defs.h b/executor/defs.h
index 993956828..765b88112 100644
--- a/executor/defs.h
+++ b/executor/defs.h
@@ -45,7 +45,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
-#define SYZ_REVISION "bdf3b9df3ff1d16e7a61432e4f19a866479775e2"
+#define SYZ_REVISION "329fe6a047fa9d6a9ad388c2e46e5d3dc9ab6c72"
#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 "42bf2ab2b8b1b89317ed03575f5c42aec66d7a62"
+#define SYZ_REVISION "e0903c549d1df4deee6c6891fa0b9220464983d4"
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
#define SYZ_EXECUTOR_USES_SHMEM 0
#define SYZ_PAGE_SIZE 4096
diff --git a/executor/syscalls.h b/executor/syscalls.h
index e608c9970..0d81a1481 100644
--- a/executor/syscalls.h
+++ b/executor/syscalls.h
@@ -1597,9 +1597,7 @@ const call_t syscalls[] = {
{"zx_system_get_num_cpus", 0, (syscall_t)zx_system_get_num_cpus},
{"zx_system_get_physmem", 0, (syscall_t)zx_system_get_physmem},
{"zx_system_get_version", 0, (syscall_t)zx_system_get_version},
- {"zx_task_bind_exception_port", 0, (syscall_t)zx_task_bind_exception_port},
{"zx_task_create_exception_channel", 0, (syscall_t)zx_task_create_exception_channel},
- {"zx_task_resume_from_exception", 0, (syscall_t)zx_task_resume_from_exception},
{"zx_thread_create", 0, (syscall_t)zx_thread_create},
{"zx_thread_exit", 0, (syscall_t)zx_thread_exit},
{"zx_thread_read_state", 0, (syscall_t)zx_thread_read_state},
@@ -2004,9 +2002,7 @@ const call_t syscalls[] = {
{"zx_system_get_num_cpus", 0, (syscall_t)zx_system_get_num_cpus},
{"zx_system_get_physmem", 0, (syscall_t)zx_system_get_physmem},
{"zx_system_get_version", 0, (syscall_t)zx_system_get_version},
- {"zx_task_bind_exception_port", 0, (syscall_t)zx_task_bind_exception_port},
{"zx_task_create_exception_channel", 0, (syscall_t)zx_task_create_exception_channel},
- {"zx_task_resume_from_exception", 0, (syscall_t)zx_task_resume_from_exception},
{"zx_thread_create", 0, (syscall_t)zx_thread_create},
{"zx_thread_exit", 0, (syscall_t)zx_thread_exit},
{"zx_thread_read_state", 0, (syscall_t)zx_thread_read_state},
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 9de67e97e..4bac21f5d 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -799,7 +799,6 @@ static int do_sandbox_setuid(void)
#include <zircon/syscalls/debug.h>
#include <zircon/syscalls/exception.h>
#include <zircon/syscalls/object.h>
-#include <zircon/syscalls/port.h>
static __thread int skip_segv;
static __thread jmp_buf segv_env;
@@ -814,49 +813,69 @@ static void segv_handler(void)
doexit(SIGSEGV);
}
+static zx_status_t update_exception_thread_regs(zx_handle_t exception)
+{
+ zx_handle_t thread;
+ zx_status_t status = zx_exception_get_thread(exception, &thread);
+ if (status != ZX_OK) {
+ debug("zx_exception_get_thread failed: %d\n", status);
+ return status;
+ }
+
+ zx_thread_state_general_regs_t regs;
+ status = zx_thread_read_state(thread, ZX_THREAD_STATE_GENERAL_REGS,
+ &regs, sizeof(regs));
+ if (status != ZX_OK) {
+ debug("zx_thread_read_state failed: %d (%d)\n",
+ (int)sizeof(regs), status);
+ } else {
+#if GOARCH_amd64
+ regs.rip = (uint64)(void*)&segv_handler;
+#elif GOARCH_arm64
+ regs.pc = (uint64)(void*)&segv_handler;
+#else
+#error "unsupported arch"
+#endif
+ status = zx_thread_write_state(thread, ZX_THREAD_STATE_GENERAL_REGS, &regs, sizeof(regs));
+ if (status != ZX_OK) {
+ debug("zx_thread_write_state failed: %d\n", status);
+ }
+ }
+
+ zx_handle_close(thread);
+ return status;
+}
+
static void* ex_handler(void* arg)
{
- zx_handle_t port = (zx_handle_t)(long)arg;
+ zx_handle_t exception_channel = (zx_handle_t)(long)arg;
for (int i = 0; i < 10000; i++) {
- zx_port_packet_t packet = {};
- zx_status_t status = zx_port_wait(port, ZX_TIME_INFINITE, &packet);
+ zx_status_t status = zx_object_wait_one(exception_channel, ZX_CHANNEL_READABLE, ZX_TIME_INFINITE, NULL);
if (status != ZX_OK) {
- debug("zx_port_wait failed: %d\n", status);
+ debug("zx_object_wait_one failed: %d\n", status);
continue;
}
- debug("got exception packet: type=%d status=%d tid=%llu\n",
- packet.type, packet.status, (unsigned long long)(packet.exception.tid));
- zx_handle_t thread;
- status = zx_object_get_child(zx_process_self(), packet.exception.tid,
- ZX_RIGHT_SAME_RIGHTS, &thread);
+
+ zx_exception_info_t info;
+ zx_handle_t exception;
+ status = zx_channel_read(exception_channel, 0, &info, &exception, sizeof(info), 1, NULL, NULL);
if (status != ZX_OK) {
- debug("zx_object_get_child failed: %d\n", status);
+ debug("zx_channel_read failed: %d\n", status);
continue;
}
- zx_thread_state_general_regs_t regs;
- status = zx_thread_read_state(thread, ZX_THREAD_STATE_GENERAL_REGS,
- &regs, sizeof(regs));
+
+ debug("got exception: type=%d tid=%llu\n", info.type, (unsigned long long)(info.tid));
+ status = update_exception_thread_regs(exception);
if (status != ZX_OK) {
- debug("zx_thread_read_state failed: %d (%d)\n",
- (int)sizeof(regs), status);
- } else {
-#if GOARCH_amd64
- regs.rip = (uint64)(void*)&segv_handler;
-#elif GOARCH_arm64
- regs.pc = (uint64)(void*)&segv_handler;
-#else
-#error "unsupported arch"
-#endif
- status = zx_thread_write_state(thread, ZX_THREAD_STATE_GENERAL_REGS, &regs, sizeof(regs));
- if (status != ZX_OK) {
- debug("zx_thread_write_state failed: %d\n", status);
- }
+ debug("failed to update exception thread registers: %d\n", status);
}
- status = zx_task_resume_from_exception(thread, port, 0);
+
+ uint32 state = ZX_EXCEPTION_STATE_HANDLED;
+ status = zx_object_set_property(exception, ZX_PROP_EXCEPTION_STATE, &state, sizeof(state));
if (status != ZX_OK) {
- debug("zx_task_resume_from_exception failed: %d\n", status);
+ debug("zx_object_set_property(ZX_PROP_EXCEPTION_STATE) failed: %d\n", status);
}
- zx_handle_close(thread);
+ zx_handle_close(exception);
}
doexit(1);
return 0;
@@ -865,13 +884,11 @@ static void* ex_handler(void* arg)
static void install_segv_handler(void)
{
zx_status_t status;
- zx_handle_t port;
- if ((status = zx_port_create(0, &port)) != ZX_OK)
- fail("zx_port_create failed: %d", status);
- if ((status = zx_task_bind_exception_port(zx_process_self(), port, 0, 0)) != ZX_OK)
- fail("zx_task_bind_exception_port failed: %d", status);
+ zx_handle_t exception_channel;
+ if ((status = zx_task_create_exception_channel(zx_process_self(), 0, &exception_channel)) != ZX_OK)
+ fail("zx_task_create_exception_channel failed: %d", status);
pthread_t th;
- if (pthread_create(&th, 0, ex_handler, (void*)(long)port))
+ if (pthread_create(&th, 0, ex_handler, (void*)(long)exception_channel))
fail("pthread_create failed");
}
diff --git a/pkg/report/testdata/fuchsia/report/24 b/pkg/report/testdata/fuchsia/report/24
deleted file mode 100644
index be444d057..000000000
--- a/pkg/report/testdata/fuchsia/report/24
+++ /dev/null
@@ -1,65 +0,0 @@
-TITLE: ASSERT FAILED in ExceptionPort::SetTarget
-
-ZIRCON KERNEL PANIC
-panic (caller 0xffffffff00187dc2 frame 0xffffff9b59433ef0): DEBUG ASSERT FAILED at (kernel/object/excp_port.cpp:84): port_ != n
-ullptr
-platform_halt suggested_action 0 reason 2
-bt#00: 0x00105e46 platform_halt platform/pc/power.cpp:122
-bt#01: 0x001aa1a4 _panic lib/debug/debug.cpp:39
-bt#02: 0x0014feb8 ExceptionPort::SetTarget object/excp_port.cpp:83
-bt#03: [ inline ] task_bind_exception_port syscalls/exceptions.cpp:90
-bt#03: 0x00187dc2 sys_task_bind_exception_port syscalls/exceptions.cpp:149
-bt#04: [ inline ] operator() syscall-kernel-wrappers.inc:328
-bt#04: [ inline ] lambda syscalls/syscalls.cpp:60
-bt#04: 0x001767ff wrapper_task_bind_exception_port syscall-kernel-wrappers.inc:330
-bt#05: 0x00116af0 x86_syscall syscall-kernel-branches.S:51
-bt#06: end
-<PAGE FAULT> Instruction Pointer = 0x10:0xffffffff00139911
-<PAGE FAULT> Stack Pointer = 0x18:0xffffff9b59433da0
-<PAGE FAULT> Fault Linear Address = 0x90
-<PAGE FAULT> Error Code Value = 0x0
-<PAGE FAULT> Error Code Type = supervisor read data, page not present
-dump_thread: t 0xffffff800c1a6b88 (/tmp/syz-executor13:pthread_t:0x4d4bcf6e3b30)
- state run, curr/last cpu 0/0, cpu_affinity 0xffffffff, priority 19 [16:3,-1], remaining time slice 10000000
- runtime_ns 252291478, runtime_s 0
- stack 0xffffff9b59432000, stack_size 8192
- entry 0xffffffff00169788, arg 0xffffff800c1a6a10, flags 0x0
- wait queue 0, blocked_status 0, interruptable 0, mutexes held 1
- aspace 0xffffff800d03fd40
- user_thread 0xffffff800c1a6a10, pid 822439, tid 823621
-vector 14
-Supervisor Page Fault exception, halting
- RIP: 0x00139911 crashlog_to_string lib/crashlog/crashlog.cpp:131
- CS: 0x10 RIP: 0xffffffff00139911 EFL: 0x10092 CR2: 0x90
- RAX: 0 RBX: 0x1000 RCX: 0x20 RDX: 0x3191ab138c90
- RSI: 0x2 RDI: 0xffffffff0020c55b RBP: 0xffffff9b59433e00 RSP: 0xffffff9b59433da0
- R8: 0xffffffff0020c55b R9: 0xffffffff002a98ef R10: 0xa R11: 0x21
- R12: 0xffffffff002a9910 R13: 0x15 R14: 0xf40 R15: 0x15
-errc: 0
-bottom of kernel stack at 0xffffff9b59433cf0:
-0xffffff9b59433cf0: 0020c55b ffffffff 00000002 00000000 |[. .............|
-0xffffff9b59433d00: 59433e00 ffffff9b 00001000 00000000 |.>CY............|
-0xffffff9b59433d10: ab138c90 00003191 00000020 00000000 |.....1.. .......|
-0xffffff9b59433d20: 00000000 00000000 0020c55b ffffffff |........[. .....|
-0xffffff9b59433d30: 002a98ef ffffffff 0000000a 00000000 |..*.............|
-0xffffff9b59433d40: 00000021 00000000 002a9910 ffffffff |!.........*.....|
-0xffffff9b59433d50: 00000015 00000000 00000f40 00000000 |........@.......|
-0xffffff9b59433d60: 00000015 00000000 0000000e 00000000 |................|
-platform_halt suggested_action 0 reason 2
-bt#00: 0x00105e46 platform_halt platform/pc/power.cpp:122
-bt#01: 0x00108b08 exception_die arch/x86/faults.cpp:100
-bt#02: [ inline ] x86_fatal_pfe_handler arch/x86/faults.cpp:240
-bt#02: [ inline ] handle_exception_types arch/x86/faults.cpp:371
-bt#02: 0x0010968f x86_exception_handler arch/x86/faults.cpp:458
-bt#03: 0x001164b7 interrupt_common arch/x86/exceptions.S:127
-bt#04: 0x001a5ed5 dlog_bluescreen_halt system/ulib/fbl/include/fbl/ref_counted_internal.h:119
-bt#05: 0x00105e4b platform_halt platform/pc/power.cpp:123
-bt#06: 0x001aa1a4 _panic lib/debug/debug.cpp:39
-bt#07: 0x0014feb8 ExceptionPort::SetTarget object/excp_port.cpp:83
-bt#08: [ inline ] task_bind_exception_port syscalls/exceptions.cpp:90
-bt#08: 0x00187dc2 sys_task_bind_exception_port syscalls/exceptions.cpp:149
-bt#09: [ inline ] operator() syscall-kernel-wrappers.inc:328
-bt#09: [ inline ] lambda syscalls/syscalls.cpp:60
-bt#09: 0x001767ff wrapper_task_bind_exception_port syscall-kernel-wrappers.inc:330
-bt#10: 0x00116af0 x86_syscall syscall-kernel-branches.S:51
-bt#11: end
diff --git a/sys/fuchsia/gen/amd64.go b/sys/fuchsia/gen/amd64.go
index 9f51a44e9..6d7ec5c40 100644
--- a/sys/fuchsia/gen/amd64.go
+++ b/sys/fuchsia/gen/amd64.go
@@ -4695,7 +4695,7 @@ var structDescs_amd64 = []*KeyedStruct{
}}},
{Key: StructKey{Name: "zx_info_thread", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "zx_info_thread", TypeSize: 8, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "state", TypeSize: 4, ArgDir: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "wait_exception_port_type", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "wait_exception_channel_type", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "zx_info_thread_stats", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "zx_info_thread_stats", TypeSize: 8, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "total_runtime", TypeSize: 8, ArgDir: 1}}},
@@ -7068,22 +7068,11 @@ var syscalls_amd64 = []*Syscall{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "version", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "version_len", TypeSize: 8}}, Path: []string{"version"}},
}},
- {Name: "zx_task_bind_exception_port", CallName: "zx_task_bind_exception_port", Args: []Type{
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_task", FldName: "task", TypeSize: 4}},
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_port", FldName: "eport", TypeSize: 4}},
- &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 1000, ValuesPerProc: 4},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "exception_port_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
- }},
{Name: "zx_task_create_exception_channel", CallName: "zx_task_create_exception_channel", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_task", FldName: "task", TypeSize: 4}},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "exception_port_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "exception_channel_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "out", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_chan", TypeSize: 4, ArgDir: 1}}},
}},
- {Name: "zx_task_resume_from_exception", CallName: "zx_task_resume_from_exception", Args: []Type{
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_task", FldName: "task", TypeSize: 4}},
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_port", FldName: "eport", TypeSize: 4}},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "task_resume_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{2}, BitMask: true},
- }},
{Name: "zx_thread_create", CallName: "zx_thread_create", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_process", FldName: "process", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}},
@@ -7357,7 +7346,7 @@ var consts_amd64 = []ConstValue{
{Name: "ZX_CLOCK_MONOTONIC"},
{Name: "ZX_CLOCK_THREAD", Value: 2},
{Name: "ZX_CLOCK_UTC", Value: 1},
- {Name: "ZX_EXCEPTION_PORT_DEBUGGER", Value: 1},
+ {Name: "ZX_EXCEPTION_CHANNEL_DEBUGGER", Value: 1},
{Name: "ZX_HANDLE_INVALID"},
{Name: "ZX_INFO_BTI", Value: 20},
{Name: "ZX_INFO_CPU_STATS", Value: 16},
@@ -7403,7 +7392,6 @@ var consts_amd64 = []ConstValue{
{Name: "ZX_POL_NEW_VMO", Value: 4},
{Name: "ZX_POL_VMAR_WX", Value: 2},
{Name: "ZX_POL_WRONG_OBJECT", Value: 1},
- {Name: "ZX_RESUME_TRY_NEXT", Value: 2},
{Name: "ZX_RIGHT_DESTROY", Value: 512},
{Name: "ZX_RIGHT_DUPLICATE", Value: 1},
{Name: "ZX_RIGHT_ENUMERATE", Value: 256},
@@ -7487,4 +7475,4 @@ var consts_amd64 = []ConstValue{
{Name: "fuchsia_power_Status_OK"},
}
-const revision_amd64 = "bdf3b9df3ff1d16e7a61432e4f19a866479775e2"
+const revision_amd64 = "329fe6a047fa9d6a9ad388c2e46e5d3dc9ab6c72"
diff --git a/sys/fuchsia/gen/arm64.go b/sys/fuchsia/gen/arm64.go
index 25a01bf80..fbfd0f29e 100644
--- a/sys/fuchsia/gen/arm64.go
+++ b/sys/fuchsia/gen/arm64.go
@@ -4695,7 +4695,7 @@ var structDescs_arm64 = []*KeyedStruct{
}}},
{Key: StructKey{Name: "zx_info_thread", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "zx_info_thread", TypeSize: 8, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "state", TypeSize: 4, ArgDir: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "wait_exception_port_type", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "wait_exception_channel_type", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "zx_info_thread_stats", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "zx_info_thread_stats", TypeSize: 8, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "total_runtime", TypeSize: 8, ArgDir: 1}}},
@@ -7068,22 +7068,11 @@ var syscalls_arm64 = []*Syscall{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "version", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "version_len", TypeSize: 8}}, Path: []string{"version"}},
}},
- {Name: "zx_task_bind_exception_port", CallName: "zx_task_bind_exception_port", Args: []Type{
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_task", FldName: "task", TypeSize: 4}},
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_port", FldName: "eport", TypeSize: 4}},
- &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 1000, ValuesPerProc: 4},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "exception_port_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
- }},
{Name: "zx_task_create_exception_channel", CallName: "zx_task_create_exception_channel", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_task", FldName: "task", TypeSize: 4}},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "exception_port_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "exception_channel_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "out", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_chan", TypeSize: 4, ArgDir: 1}}},
}},
- {Name: "zx_task_resume_from_exception", CallName: "zx_task_resume_from_exception", Args: []Type{
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_task", FldName: "task", TypeSize: 4}},
- &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_port", FldName: "eport", TypeSize: 4}},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "task_resume_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{2}, BitMask: true},
- }},
{Name: "zx_thread_create", CallName: "zx_thread_create", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_process", FldName: "process", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}},
@@ -7357,7 +7346,7 @@ var consts_arm64 = []ConstValue{
{Name: "ZX_CLOCK_MONOTONIC"},
{Name: "ZX_CLOCK_THREAD", Value: 2},
{Name: "ZX_CLOCK_UTC", Value: 1},
- {Name: "ZX_EXCEPTION_PORT_DEBUGGER", Value: 1},
+ {Name: "ZX_EXCEPTION_CHANNEL_DEBUGGER", Value: 1},
{Name: "ZX_HANDLE_INVALID"},
{Name: "ZX_INFO_BTI", Value: 20},
{Name: "ZX_INFO_CPU_STATS", Value: 16},
@@ -7403,7 +7392,6 @@ var consts_arm64 = []ConstValue{
{Name: "ZX_POL_NEW_VMO", Value: 4},
{Name: "ZX_POL_VMAR_WX", Value: 2},
{Name: "ZX_POL_WRONG_OBJECT", Value: 1},
- {Name: "ZX_RESUME_TRY_NEXT", Value: 2},
{Name: "ZX_RIGHT_DESTROY", Value: 512},
{Name: "ZX_RIGHT_DUPLICATE", Value: 1},
{Name: "ZX_RIGHT_ENUMERATE", Value: 256},
@@ -7487,4 +7475,4 @@ var consts_arm64 = []ConstValue{
{Name: "fuchsia_power_Status_OK"},
}
-const revision_arm64 = "42bf2ab2b8b1b89317ed03575f5c42aec66d7a62"
+const revision_arm64 = "e0903c549d1df4deee6c6891fa0b9220464983d4"
diff --git a/sys/fuchsia/objects.txt b/sys/fuchsia/objects.txt
index 8a43350f7..4cc7c186a 100644
--- a/sys/fuchsia/objects.txt
+++ b/sys/fuchsia/objects.txt
@@ -75,7 +75,7 @@ zx_info_process {
zx_info_thread {
state int32
- wait_exception_port_type int32
+ wait_exception_channel_type int32
}
zx_exception_report {
diff --git a/sys/fuchsia/tasks.txt b/sys/fuchsia/tasks.txt
index 48fcff106..9bf8b30c9 100644
--- a/sys/fuchsia/tasks.txt
+++ b/sys/fuchsia/tasks.txt
@@ -6,13 +6,10 @@ include <zircon/syscalls/exception.h>
resource zx_task[zx_handle]
-zx_task_bind_exception_port(task zx_task, eport zx_port, key proc[1000, 4], options flags[exception_port_options])
-zx_task_create_exception_channel(task zx_task, options flags[exception_port_options], out ptr[out, zx_chan])
-zx_task_resume_from_exception(task zx_task, eport zx_port, options flags[task_resume_options])
+zx_task_create_exception_channel(task zx_task, options flags[exception_channel_options], out ptr[out, zx_chan])
# This is disabled until we figure out how to prevent executor from killing fuzzer (#594).
# zx_task_kill(handle zx_task)
# zx_task_suspend(handle zx_task, token ptr[out, zx_handle])
-exception_port_options = ZX_EXCEPTION_PORT_DEBUGGER
-task_resume_options = ZX_RESUME_TRY_NEXT
+exception_channel_options = ZX_EXCEPTION_CHANNEL_DEBUGGER
diff --git a/sys/fuchsia/tasks_amd64.const b/sys/fuchsia/tasks_amd64.const
index ea1606b18..9b3b187c1 100644
--- a/sys/fuchsia/tasks_amd64.const
+++ b/sys/fuchsia/tasks_amd64.const
@@ -1,3 +1,2 @@
# AUTOGENERATED FILE
-ZX_EXCEPTION_PORT_DEBUGGER = 1
-ZX_RESUME_TRY_NEXT = 2
+ZX_EXCEPTION_CHANNEL_DEBUGGER = 1
diff --git a/sys/fuchsia/tasks_arm64.const b/sys/fuchsia/tasks_arm64.const
index ea1606b18..9b3b187c1 100644
--- a/sys/fuchsia/tasks_arm64.const
+++ b/sys/fuchsia/tasks_arm64.const
@@ -1,3 +1,2 @@
# AUTOGENERATED FILE
-ZX_EXCEPTION_PORT_DEBUGGER = 1
-ZX_RESUME_TRY_NEXT = 2
+ZX_EXCEPTION_CHANNEL_DEBUGGER = 1