aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-05-31 20:24:45 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-05-31 20:24:45 +0200
commit7ab352e19de91bafb25435a38164bf0bac7dde1e (patch)
tree0822805d89e4a693334a38ab94077f570b7ba5f9 /executor
parent536006ee07efc1bd13df4441f0ab3c69c725bc11 (diff)
executor: limit stack frame size
Stack usage warning currently breaks our internal build (with 16K frame limit). Executor uses stacks of limited size, that's another reason to not allow frames of arbitrary size. Limit stack frame size to 8K. Reduce tun packet size. We don't need to read out whole packet.
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/executor/common.h b/executor/common.h
index 73a528471..af87856fb 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -234,7 +234,9 @@ static void execute_command(const char* format, ...)
int tunfd = -1;
-#define SYZ_TUN_MAX_PACKET_SIZE (64 << 10)
+// We just need this to be large enough to hold headers that we parse (ethernet/ip/tcp).
+// Rest of the packet (if any) will be silently truncated which is fine.
+#define SYZ_TUN_MAX_PACKET_SIZE 1000
// sysgen knowns about this constant (maxPids)
#define MAX_PIDS 32