aboutsummaryrefslogtreecommitdiffstats
path: root/executor/snapshot.h
Commit message (Collapse)AuthorAgeFilesLines
* executor: query globs in the test program contextDmitry Vyukov2024-12-111-0/+1
| | | | | | | | | | | | | | | | | We query globs for 2 reasons: 1. Expand glob types in syscall descriptions. 2. Dynamic file probing for automatic descriptions generation. In both of these contexts are are interested in files that will be present during test program execution (rather than normal unsandboxed execution). For example, some files may not be accessible to test programs after pivot root. On the other hand, we create and link some additional files for the test program that don't normally exist. Add a new request type for querying of globs that are executed in the test program context.
* executor: setup sysctl/cgroups in snapshot modeDmitry Vyukov2024-12-061-0/+8
| | | | We missed that step for snapshot mode.
* executor: increase coverage buffer sizeDmitry Vyukov2024-11-201-1/+1
| | | | | | | | | | | The coverage buffer frequently overflows. We cannot increase it radically b/c they consume lots of memory (num procs x num kcovs x buffer size) and lead to OOM kills (at least with 8 procs and 2GB KASAN VM). So increase it 2x and slightly reduce number of threads/kcov descriptors. However, in snapshot mode we can be more aggressive (only 1 proc). This reduces number of overflows by ~~2-4x depending on syscall.
* executor: better handling for hanged test processesDmitry Vyukov2024-10-241-1/+1
| | | | | | | | | | | | | | | Currently we kill hanged processes and consider the corresponding test finished. We don't kill/wait for the actual test subprocess (we don't know its pid to kill, and waiting will presumably hang). This has 2 problems: 1. If the hanged process causes "task hung" report, we can't reproduce it, since the test finished too long ago (manager thinks its finished and discards the request). 2. The test process still consumed per-pid resources. Explicitly detect and handle such cases: Manager keeps these hanged tests forever, and we assign a new proc id for future processes (don't reuse the hanged one).
* executor: protect kcov/output regions with pkeysDmitry Vyukov2024-08-161-0/+9
| | | | | | | Protect KCOV regions with pkeys if they are available. Protect output region with pkeys in snapshot mode. Snapshot mode is especially sensitive to output buffer corruption since its location is not randomized.
* all: add qemu snapshotting modeDmitry Vyukov2024-07-251-0/+252