diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 10:37:30 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 10:19:39 +0000 |
| commit | c6f10907c38ce49ddc321539f75aabf0a9ad6c71 (patch) | |
| tree | 1277a1d64e2201b58b550ef0131222eaab9fcf73 /pkg/csource | |
| parent | 33fec5a3ec55bce7f1664e70e6f5ff8daf56886d (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')
| -rw-r--r-- | pkg/csource/gen.go | 1 | ||||
| -rw-r--r-- | pkg/csource/generated.go | 84 |
2 files changed, 3 insertions, 82 deletions
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 <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(); |
