15 Commits

Author SHA1 Message Date
Steffen Schulz
0fb4268b3e fix setting starved bit
Must be set before interface_send_char().

Currently only works for 'regular' executions, so we set it in
synchronization_lock_disable_pt()..
2022-12-22 04:53:31 +01:00
Steffen Schulz
397dba5ee2 reset aux_buffer pt_overflow bit 2022-12-22 04:53:31 +01:00
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
9e56f6731e fix timeout detection to only reset on VM reset
reset_timeout_detection() is already called at end of NEXT_PAYLOAD
handler to properly re-init the timer on every new execution.

Remove the additional call in synchronization_lock() which prevents
proper timeout on targets that do a lot of hprintf().

Also remove extra call in synchronization_lock_timeout_found() which
really just seems to be a duplicate with no observable effect.

To reproduce, run a harness that uses hprintf() in infinite loop. It
will take longer due to execute due to userland overhead but should
eventually return with aux_buffer/runtime similar to configured timeout.
2022-05-11 18:00:11 +02:00
Steffen Schulz
35809c5207 cleanup timeout_detection 2022-05-11 18:00:11 +02:00
Steffen Schulz
a2ee5ef587 fix runtime_usec wraparound in aux_buffer
To reproduce the issue, launch fast running harness with aux_buffer->timeout_usec=0 and timeout_sec=1
2022-05-11 18:00:11 +02:00
Steffen Schulz
7b9bd18dc3 refactor 'redqueen trace' to separate redqueen_trace.c 2022-02-11 10:45:30 -08:00
Steffen Schulz
c12c6bd70d starved: signal if guest was reading beyond end of payload 2022-02-11 10:45:30 -08:00
Steffen Schulz
35c4f356ab patch KASAN hypercall back in 2022-02-08 23:38:20 +01:00
Sergej Schumilo
42d434e28f add several improvements:
- Intel PT page dump feature works now
- size of input and bitmap buffers are configurable
- new aux buffer layout
- various bug fixes
2022-01-18 10:10:04 +01:00
Sergej Schumilo
dd9f586327 disable unused hypercalls 2022-01-11 04:16:34 +01:00
Sergej Schumilo
18ad4753d3 add AFL++ support and other improvements 2021-12-18 14:30:24 +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