From a4718693a3d9fcabb02299b2ec07c19d8208c539 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 30 Aug 2018 21:10:38 -0700 Subject: sys/linux: add syz_execute_func The function executes random code. Update #310 --- executor/common.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'executor/common.h') diff --git a/executor/common.h b/executor/common.h index 5dbb7f7b9..15b279956 100644 --- a/executor/common.h +++ b/executor/common.h @@ -364,6 +364,15 @@ static uint16 csum_inet_digest(struct csum_inet* csum) } #endif +#if SYZ_EXECUTOR || __NR_syz_execute_func +// syz_execute_func(text ptr[in, text[taget]]) +static long syz_execute_func(long text) +{ + ((void (*)(void))(text))(); + return 0; +} +#endif + #if GOOS_akaros #include "common_akaros.h" #elif GOOS_freebsd || GOOS_netbsd || GOOS_openbsd -- cgit mrf-deployment