Re: kcov: deny mmap() while enabled

2019-01-16 Thread Alexander Bluhm
On Wed, Jan 16, 2019 at 06:14:49PM +0100, Anton Lindqvist wrote: > Comments? OK? OK bluhm@ > Index: dev/kcov.c > === > RCS file: /cvs/src/sys/dev/kcov.c,v > retrieving revision 1.9 > diff -u -p -r1.9 kcov.c > --- dev/kcov.c3

kcov: deny mmap() while enabled

2019-01-16 Thread Anton Lindqvist
Hi, When a kcov fd is in an enabled state, disallow mmap() calls using the same fd. Sometimes, syzkaller manages to create a device node using mknod() with major=22 and minor=X where X maps to an already open kcov fd in the current process; it then mmap() the kcov coverage buffer which is used as