13 Commits

Author SHA1 Message Date
Sergej Schumilo
5dae6ab764 split FDL and PT mode
- PT mode now works with both FDL and dirty ring backend
as in-kernel dirty page trackers.
2023-03-06 07:32:21 +01:00
Steffen Schulz
21368bc0d9 minor
- use more symmetric message for GET_HOST_CONFIG
- the char* cast won't be needed once we have 'better errors' merged
2022-12-15 11:25:52 +01:00
Sergej Schumilo
ab9a1be9fe Fix previous patch (GET_HOST / SET_AGENT config)
- fix debug mode (by including nyx/debug.h)
- call qemu_trace() only if host_config has already been requested once
- change nyx_abort message back to previous one (otherwise some tests will break)
2022-12-15 11:25:52 +01:00
Steffen Schulz
2889f88a00 Allow multiple GET_HOST_CONFIG, but abort on SET_AGENT_CONFIG
GET_HOST_CONFIG may be queried multiple times to verify host
magic/version info by different tools. Only inform in debug mode.
2022-12-15 11:25:52 +01:00
Steffen Schulz
2f869ed3e1 replace printf + exit() with nyx_abort()
- Replace instances of error/printf + exit(1) with nyx_abort(), except
  for one instance where we don't give any useful error and a plain
  assert() seems more appropriate

- Remove [Qemu-Nyx] and Error: in arguments to nyx_error()
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
68f74353b2 record worker_id in state and report via KAFL_HYPERCALL_GET_HOST_CONFIG
Modifies elements of host_config_t - update guest agent struct!
2022-02-11 10:45:30 -08:00
Sergej Schumilo
c2c69cfc52 abort if a configuration was not set or received
(via GET_HOST / SET_AGENT) or if either was executed twice
2022-01-21 20:23:52 +01: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
39a646fb4c update configuration hypercalls 2022-01-11 04:22:34 +01:00