aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/generated.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-04-15 10:37:30 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-04-15 10:19:39 +0000
commitc6f10907c38ce49ddc321539f75aabf0a9ad6c71 (patch)
tree1277a1d64e2201b58b550ef0131222eaab9fcf73 /pkg/csource/generated.go
parent33fec5a3ec55bce7f1664e70e6f5ff8daf56886d (diff)
all: remove akaros support
Akaros support is unused, it was shutdown on syzbot for a while, the akaros development seems to be frozen for years as well. We have a bunch of hacks for Akaros since it supported only super old gcc and haven't supported Go. Remove it.
Diffstat (limited to 'pkg/csource/generated.go')
-rw-r--r--pkg/csource/generated.go84
1 files changed, 3 insertions, 81 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 83d58ab09..34b0d2c55 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -80,14 +80,6 @@ static __thread int clone_ongoing;
static __thread int skip_segv;
static __thread jmp_buf segv_env;
-#if GOOS_akaros
-#include <parlib/parlib.h>
-static void recover(void)
-{
- _longjmp(segv_env, 1);
-}
-#endif
-
static void segv_handler(int sig, siginfo_t* info, void* ctx)
{
@@ -106,13 +98,7 @@ static void segv_handler(int sig, siginfo_t* info, void* ctx)
#endif
if (skip && valid) {
debug("SIGSEGV on %p, skipping\n", (void*)addr);
-#if GOOS_akaros
- struct user_context* uctx = (struct user_context*)ctx;
- uctx->tf.hw_tf.tf_rip = (long)(void*)recover;
- return;
-#else
_longjmp(segv_env, 1);
-#endif
}
debug("SIGSEGV on %p, exiting\n", (void*)addr);
doexit(sig);
@@ -212,7 +198,7 @@ static void use_temporary_dir(void)
#endif
#endif
-#if GOOS_akaros || GOOS_netbsd || GOOS_freebsd || GOOS_darwin || GOOS_openbsd || GOOS_test
+#if GOOS_netbsd || GOOS_freebsd || GOOS_darwin || GOOS_openbsd || GOOS_test
#if (SYZ_EXECUTOR || SYZ_REPEAT) && SYZ_EXECUTOR_USES_FORK_SERVER && (SYZ_EXECUTOR || SYZ_USE_TMP_DIR)
#include <dirent.h>
#include <errno.h>
@@ -334,7 +320,7 @@ static void thread_start(void* (*fn)(void*), void* arg)
#endif
#endif
-#if GOOS_freebsd || GOOS_darwin || GOOS_netbsd || GOOS_openbsd || GOOS_akaros || GOOS_test
+#if GOOS_freebsd || GOOS_darwin || GOOS_netbsd || GOOS_openbsd || GOOS_test
#if SYZ_EXECUTOR || SYZ_THREADED
#include <pthread.h>
@@ -449,40 +435,7 @@ static uint16 csum_inet_digest(struct csum_inet* csum)
}
#endif
-#if GOOS_akaros
-
-#include <ros/syscall.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#if SYZ_EXECUTOR || SYZ_SANDBOX_NONE
-static void loop();
-static int do_sandbox_none(void)
-{
- loop();
- return 0;
-}
-#endif
-
-#if SYZ_EXECUTOR || SYZ_REPEAT
-static void execute_one();
-const char* program_name;
-
-void child()
-{
-#if SYZ_EXECUTOR || SYZ_HANDLE_SEGV
- install_segv_handler();
-#endif
-#if SYZ_EXECUTOR
- receive_execute();
- close(kInPipeFd);
-#endif
- execute_one();
- doexit(0);
-}
-#endif
-
-#elif GOOS_freebsd || GOOS_darwin || GOOS_netbsd
+#if GOOS_freebsd || GOOS_darwin || GOOS_netbsd
#include <unistd.h>
@@ -12597,11 +12550,6 @@ static void loop(void)
#if SYZ_EXECUTOR
reply_handshake();
#endif
-#if SYZ_EXECUTOR && GOOS_akaros
- int child_pipe[2];
- if (pipe(child_pipe))
- fail("pipe failed");
-#endif
int iter = 0;
#if SYZ_REPEAT_TIMES
for (; iter < /*{{{REPEAT_TIMES}}}*/; iter++) {
@@ -12634,15 +12582,6 @@ static void loop(void)
#if SYZ_HAVE_SETUP_EXT_TEST
setup_ext_test();
#endif
-#if GOOS_akaros
-#if SYZ_EXECUTOR
- dup2(child_pipe[0], kInPipeFd);
- close(child_pipe[0]);
- close(child_pipe[1]);
-#endif
- execl(program_name, program_name, "child", NULL);
- fail("execl failed");
-#else
#if SYZ_EXECUTOR
close(kInPipeFd);
#endif
@@ -12654,13 +12593,8 @@ static void loop(void)
close_fds();
#endif
doexit(0);
-#endif
}
debug("spawned worker pid %d\n", pid);
-
-#if SYZ_EXECUTOR && GOOS_akaros
- resend_execute(child_pipe[1]);
-#endif
int status = 0;
uint64 start = current_time_ms();
#if SYZ_EXECUTOR && SYZ_EXECUTOR_USES_SHMEM
@@ -12738,21 +12672,9 @@ void loop(void)
#endif
}
#endif
-#if GOOS_akaros && SYZ_REPEAT
-#include <string.h>
-
-int main(int argc, char** argv)
-{
- /*{{{MMAP_DATA}}}*/
-
- program_name = argv[0];
- if (argc == 2 && strcmp(argv[1], "child") == 0)
- child();
-#else
int main(void)
{
/*{{{MMAP_DATA}}}*/
-#endif
#if SYZ_SYSCTL
setup_sysctl();