10 Commits

Author SHA1 Message Date
Steffen Schulz
31c509b171 replace most fprintf with nyx_error/warn/debug/abort
- printf that looks like debug/status info or disabled by macro/comments
  mostly turned to corresponding nyx_debug()
- printf followed by exit/abort/assert turned to nyx_error(),
  or nyx_abort() if the error is unlikely to need backtrace/gdb
- non-fatal error/warning messages turned to nyx_warn()
- few hardcoded printf remain, e.g. hexdump and debug helpers
2022-12-15 11:23:53 +01:00
Sergej Schumilo
8a88edc2a1 auto-apply clang-format
- including vl.c & kvm-all.c
2022-10-16 23:51:13 +02:00
Sergej Schumilo
e4269fc973 manual code cleanups (reviewed)
Tried to minimize actual code modifcations but we got
- several comments/printf messages edited to meet line limits
- occasionally switch some lines to put declarations or printfs in blocks
- couple more places marked TODO or FIXME to avoid non-trivial changes
- fixed PAGE_SIZE define in helpers.h to avoid redeclaration warning
- remove several chunks of dead or commented code

Co-authored-by: Steffen Schulz <steffen.schulz@intel.com>
2022-10-16 23:51:13 +02:00
Steffen Schulz
96aac23864 move alt_bitmap implementation to redqueen_trace.c
alt_bitmap is only relevant in redqueen_trace mode, when libxdc does not
produce a bitmap on its own..
2022-02-11 10:45:30 -08:00
Steffen Schulz
f348dcfc23 redqueen_trace: disable unless 'edge_cb_trace' option is provided
Both, the legacy 'redqueen' trace via libxdc callback as well as new
dump_pt trace option are now toggled with aux-buffer trace_mode option.

This new qemu cmdline option allows to re-enable the old trace method,
or even use both trace methods at the same time.
2022-02-11 10:45:30 -08:00
Steffen Schulz
7b9bd18dc3 refactor 'redqueen trace' to separate redqueen_trace.c 2022-02-11 10:45:30 -08:00
Steffen Schulz
f32d1cb3b7 add alt_bitmap for use in trace mode, truncate trace file on new exec
libxdc does not create a bitmap in trace mode
This patch lets qemu create the bitmap instead

Note that the bitmap not compatible with libxdc bitmap since the trace
callback behavior is different.
2022-02-11 10:45:30 -08:00
Steffen Schulz
7dbb64e7c2 compile-time option to restore kAFL style full edge traces 2022-02-11 10:45:30 -08:00
Sergej Schumilo
61fd863ba1 update QEMU-Nyx to support latest and greatest version of libxdc 2022-01-11 02:08:05 +01:00
Sergej Schumilo
cd702b528c Initial Release of Nyx
Co-authored-by: Cornelius Aschermann <cornelius@hexgolems.com>
2021-11-14 22:20:53 +01:00