From c6f10907c38ce49ddc321539f75aabf0a9ad6c71 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 15 Apr 2024 10:37:30 +0200 Subject: 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. --- pkg/csource/gen.go | 1 - pkg/csource/generated.go | 84 ++---------------------------------------------- 2 files changed, 3 insertions(+), 82 deletions(-) (limited to 'pkg/csource') diff --git a/pkg/csource/gen.go b/pkg/csource/gen.go index d11fd2fbf..2a491ccd6 100644 --- a/pkg/csource/gen.go +++ b/pkg/csource/gen.go @@ -28,7 +28,6 @@ func main() { } executorFilenames := []string{ "common_linux.h", - "common_akaros.h", "common_bsd.h", "common_openbsd.h", "common_fuchsia.h", 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 -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 #include @@ -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 @@ -449,40 +435,7 @@ static uint16 csum_inet_digest(struct csum_inet* csum) } #endif -#if GOOS_akaros - -#include -#include -#include - -#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 @@ -12596,11 +12549,6 @@ static void loop(void) #endif #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 @@ -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 - -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(); -- cgit mrf-deployment