From 2ac1d00f55d2dd477e6a004c2e03f6947e867d6b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 14 Nov 2019 18:12:19 +0100 Subject: executor: rename some flags Rename some flags in preparation for subsequent changes which will align names across the code base. --- executor/common_linux.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index b3d7b8278..e2d0a4f17 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -400,7 +400,7 @@ static int tun_frags_enabled; static void initialize_tun(void) { #if SYZ_EXECUTOR - if (!flag_enable_tun) + if (!flag_net_injection) return; #endif tunfd = open("/dev/net/tun", O_RDWR | O_NONBLOCK); @@ -607,7 +607,7 @@ error: static void initialize_devlink_pci(void) { #if SYZ_EXECUTOR - if (!flag_enable_devlink_pci) + if (!flag_devlink_pci) return; #endif int netns = open("/proc/self/ns/net", O_RDONLY); @@ -664,7 +664,7 @@ static void netdevsim_add(unsigned int addr, unsigned int port_count) static void initialize_netdevices(void) { #if SYZ_EXECUTOR - if (!flag_enable_net_dev) + if (!flag_net_devices) return; #endif // TODO: add the following devices: @@ -808,7 +808,7 @@ static void initialize_netdevices(void) static void initialize_netdevices_init(void) { #if SYZ_EXECUTOR - if (!flag_enable_net_dev) + if (!flag_net_devices) return; #endif int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); @@ -933,7 +933,7 @@ static long syz_emit_ethernet(volatile long a0, volatile long a1, volatile long static void flush_tun() { #if SYZ_EXECUTOR - if (!flag_enable_tun) + if (!flag_net_injection) return; #endif char data[SYZ_TUN_MAX_PACKET_SIZE]; @@ -1914,7 +1914,7 @@ static void reset_ebtables() static void checkpoint_net_namespace(void) { #if SYZ_EXECUTOR - if (!flag_enable_net_reset) + if (!flag_net_reset) return; if (flag_sandbox == sandbox_setuid) return; @@ -1928,7 +1928,7 @@ static void checkpoint_net_namespace(void) static void reset_net_namespace(void) { #if SYZ_EXECUTOR - if (!flag_enable_net_reset) + if (!flag_net_reset) return; if (flag_sandbox == sandbox_setuid) return; @@ -1949,7 +1949,7 @@ static void reset_net_namespace(void) static void setup_cgroups() { #if SYZ_EXECUTOR - if (!flag_enable_cgroups) + if (!flag_cgroups) return; #endif if (mkdir("/syzcgroup", 0777)) { @@ -1990,7 +1990,7 @@ static void setup_cgroups() static void setup_cgroups_loop() { #if SYZ_EXECUTOR - if (!flag_enable_cgroups) + if (!flag_cgroups) return; #endif int pid = getpid(); @@ -2042,7 +2042,7 @@ static void setup_cgroups_loop() static void setup_cgroups_test() { #if SYZ_EXECUTOR - if (!flag_enable_cgroups) + if (!flag_cgroups) return; #endif char cgroupdir[64]; @@ -2065,7 +2065,7 @@ static void setup_cgroups_test() void initialize_cgroups() { #if SYZ_EXECUTOR - if (!flag_enable_cgroups) + if (!flag_cgroups) return; #endif if (mkdir("./syz-tmp/newroot/syzcgroup", 0700)) @@ -2852,7 +2852,7 @@ static void setup_test() static void close_fds() { #if SYZ_EXECUTOR - if (!flag_enable_close_fds) + if (!flag_close_fds) return; #endif // Keeping a 9p transport pipe open will hang the proccess dead, -- cgit mrf-deployment