aboutsummaryrefslogtreecommitdiff
path: root/include/cmplog.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-01-17 16:39:05 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-01-17 16:39:05 +0100
commit55e9297202d646cfe7da8d6c5eb6937952812569 (patch)
tree42b402e419e225a644b8cedb7c1c0481d4404cc7 /include/cmplog.h
parentbd58094dbc87463680a54d99ffcff7ae2a591353 (diff)
downloadAFLplusplus-55e9297202d646cfe7da8d6c5eb6937952812569.tar.gz
first experiment cmplog
Diffstat (limited to 'include/cmplog.h')
-rw-r--r--include/cmplog.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/cmplog.h b/include/cmplog.h
new file mode 100644
index 00000000..26d4b692
--- /dev/null
+++ b/include/cmplog.h
@@ -0,0 +1,49 @@
+#ifndef _AFL_REDQUEEN_H
+#define _AFL_REDQUEEN_H
+
+#include "config.h"
+
+#define CMP_MAP_W 65536
+#define CMP_MAP_H 256
+
+#define SHAPE_BYTES(x) (x+1)
+
+#define CMP_TYPE_INS 0
+#define CMP_TYPE_RTN 1
+
+struct cmp_header {
+
+ unsigned hits : 20;
+
+ unsigned cnt : 20;
+ unsigned id : 16;
+
+ unsigned shape : 5; // from 0 to 31
+ unsigned type : 1;
+
+} __attribute__((packed));
+
+struct cmp_operands {
+
+ u64 v0;
+ u64 v1;
+
+};
+
+struct cmpfn_operands {
+
+ u8 v0[32];
+ u8 v1[32];
+
+};
+
+typedef struct cmp_operands cmp_map_list[CMP_MAP_H];
+
+struct cmp_map {
+
+ struct cmp_header headers[CMP_MAP_W];
+ struct cmp_operands log[CMP_MAP_W][CMP_MAP_H];
+
+};
+
+#endif