21 Commits

Author SHA1 Message Date
Sergej Schumilo
37717f5ebf fix ram offset translation for pc_piix and q35 2023-01-19 17:01:38 +01:00
Steffen Schulz
5701e26966 remove duplicate warn/error strings 2022-12-22 02:41:00 +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
Steffen Schulz
b40f7c60e9 more missing newlines, fix use of warn/error
- replace several hardcoded fprintf()
- use of warn vs error or nyx_abort()
- several more missing newlines
- fixed up messages
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
e83025a145 replace custom printf with nyx_<level>() wrappers
This introduces generic printf wrappers to replace the various
instances of debug_printf, fprintf, QEMU_PR_PRINTF etc.

Several more hardcoded printf() are still present and should probably be
replaced with nyx_debug_p().
2022-09-22 05:07:37 +02:00
Sergej Schumilo
164f449a02 fix several compiler warnings 2022-04-07 10:52:30 +02:00
Sergej Schumilo
ea4bdcd6d9
Merge pull request #7 from c01db33f/qemu-nyx-4.2.0
Reimplemented x86_64 page table walking code.
2022-04-07 07:09:14 +02:00
Mark Brand
e7f63f4401 Reimplemented x86_64 page table walking code. 2022-03-18 10:31:38 +01:00
Sergej Schumilo
1f675b053a fix crash notifier injection
Decide which crash notifier (32bit or 64bit) to inject, based on the
current memory mode instead of the current CPU mode. Otherwise, in the
case of a 32bit loader running on a 64bit operating system, the wrong
notifier code will be injected.
2022-02-23 10:26:02 +01:00
Sergej Schumilo
09d7d437b7
Merge branch 'qemu-nyx-4.2.0-dev-intel' into staging-upstream-3 2022-02-22 23:25:52 +01:00
Sergej Schumilo
c023bfb750 bug fix: don't reuse ram_offset as physical address
to register PF in snapshot blocklist
(breaks memory access and shared memory if address is above 0x0C0000000)
2022-02-22 19:35:16 +01:00
Steffen Schulz
6b008a1be4 error checking on payload remap + other 2022-02-11 10:45:30 -08:00
Sergej Schumilo
7af65d1fdc add various improvements:
- root snapshot serialization / deserialization
	- abort if specific hypercalls are called during fuzzing
	- ignore requests to disable write protection
2022-01-20 03:43:12 +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
1d77722270 improve x86-64 page walker and add helper functions to resize inter-VM shared memory mappings 2022-01-11 04:17:49 +01:00
Sergej Schumilo
18ad4753d3 add AFL++ support and other improvements 2021-12-18 14:30:24 +01:00
Sergej Schumilo
23a408e2cf fix write protection 2021-12-08 18:22:35 +01:00
Sergej Schumilo
5d6f07cc22 add hypercall hander for KVM_EXIT_KAFL_PERSIST_PAGE_PAST_SNAPSHOT 2021-12-02 21:43:28 +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