diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-12-08 17:02:32 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-12-09 14:31:10 +0100 |
| commit | 4459585c043faace507c685bcd9997da15809aae (patch) | |
| tree | e37e0d561e243521cbcf9169bbdb0180e658f3cb /sys/linux/dev_video4linux_vim2m_386.const | |
| parent | b54aa474a6b13cc9b8c0a68f07d71873f30dfa02 (diff) | |
all: adapt to how mmapping a kcov instance works in Linux
It turns out that the current Linux implementation of KCOV does not
properly handle multiple mmap invocations on the same instance. The
first one succeedes, but the subsequent ones do not actually mmap
anything, yet returning no error at all.
The ability to mmap that memory multiple times allows us to increase
syz-executor performance and it would be a pity to completely lose it
(especially given that mmapping kcov works fine on *BSD).
In some time a patch will be prepared, but still we will have to support
both versions at the same time - the buggy one and the correct one.
Detect whether the bug is present by writing a value at the pointer
returned by mmap. If it is present, disable dynamic kcov mmapping and
pre-mmap 5 instances in the main() function - it should be enough for
all reasonable uses. Otherwise, pre-mmap 3 and let syz-executor mmap
them as needed.
Diffstat (limited to 'sys/linux/dev_video4linux_vim2m_386.const')
0 files changed, 0 insertions, 0 deletions
