Re: [PATCH resend] kcov: allow simultaneous KCOV_ENABLE/KCOV_REMOTE_ENABLE
From: Jann Horn
Date: Fri May 15 2026 - 13:30:04 EST
On Fri, May 15, 2026 at 8:59 AM Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
> On Tue, 5 May 2026 at 11:01, Jann Horn <jannh@xxxxxxxxxx> wrote:
> > Allow the same userspace thread to simultaneously collect normal coverage
> > in syscall context (KCOV_ENABLE) and remote coverage of asynchronous work
> > created by the thread (KCOV_REMOTE_ENABLE).
> > With this, remote KCOV coverage becomes useful for generic fuzzing and not
> > just fuzzing of specific data injection interfaces.
[...]
> > @@ -651,8 +662,7 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,
> > LONG_MAX / sizeof(unsigned long))
> > return -EINVAL;
> > kcov->mode = mode;
> > - t->kcov = kcov;
> > - t->kcov_mode = KCOV_MODE_REMOTE;
>
> KCOV_MODE_REMOTE does not seem to be used anywhere else now.
> Please remove it.
Ah, indeed. I'll send a v2 now with KCOV_MODE_REMOTE removed.
> Otherwise, this looks good to me (though, all the logic here is pretty
> involved).
>
> Reviewed-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Thanks!