[google/syzkaller] 77ff61: executor: decouple kcov memory allocation from the...

1 view
Skip to first unread message

Alexander Potapenko

unread,
Aug 5, 2025, 9:17:26 AM8/5/25
to syzk...@googlegroups.com
Branch: refs/heads/gh-readonly-queue/master/pr-6254-0931f9bfa8eacf9840a2bd3f9def3cfb4349431e
Home: https://github.com/google/syzkaller
Commit: 77ff614fa0319f7b4e99df29822d0590128bf00c
https://github.com/google/syzkaller/commit/77ff614fa0319f7b4e99df29822d0590128bf00c
Author: Alexander Potapenko <gli...@google.com>
Date: 2025-08-05 (Tue, 05 Aug 2025)

Changed paths:
M executor/executor.cc
M executor/executor_bsd.h
M executor/executor_darwin.h
M executor/executor_linux.h
M executor/executor_test.h

Log Message:
-----------
executor: decouple kcov memory allocation from the trace

On different platforms and in different coverage collection modes
the pointer to the beginning of kcov buffer may or may not differ
from the pointer to the region that mmap() returned.

Decouple these two pointers, so that the memory is always allocated
and deallocated with cov->mmap_alloc_ptr and cov->mmap_alloc_size, and the
buffer is accessed via cov->data and cov->data_size.

I tried my best to not break Darwin and BSD, but I did not test them.


Commit: a4acbebb7c7f9bc7ff56c2e6a0e452aa6438fc11
https://github.com/google/syzkaller/commit/a4acbebb7c7f9bc7ff56c2e6a0e452aa6438fc11
Author: Alexander Potapenko <gli...@google.com>
Date: 2025-08-05 (Tue, 05 Aug 2025)

Changed paths:
M executor/executor_linux.h

Log Message:
-----------
executor: close the dangling file descriptor in setup_kcov_reset_ioctl()


Commit: 1458b364e100752374725b0cbf83b70a54b327d3
https://github.com/google/syzkaller/commit/1458b364e100752374725b0cbf83b70a54b327d3
Author: Alexander Potapenko <gli...@google.com>
Date: 2025-08-05 (Tue, 05 Aug 2025)

Changed paths:
M executor/executor.cc
M executor/executor_linux.h

Log Message:
-----------
executor: introduce cover_close()

Right now closing a kcov fd on Linux won't disable coverage, so further
attempts to open an fd and enable coverage on the same thread will
not work.

Add cover_close() which will disable the coverage if necessary, and
close the file descriptor.


Compare: https://github.com/google/syzkaller/compare/77ff614fa031%5E...1458b364e100

To unsubscribe from these emails, change your notification settings at https://github.com/google/syzkaller/settings/notifications

Alexander Potapenko

unread,
Aug 5, 2025, 9:28:19 AM8/5/25
to syzk...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages