From owner-freebsd-current@freebsd.org Thu Aug 8 16:02:10 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0400AA416 for ; Thu, 8 Aug 2019 16:02:10 +0000 (UTC) (envelope-from slava.shwartsman@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 464Cmy4CQ7z4VTN for ; Thu, 8 Aug 2019 16:02:10 +0000 (UTC) (envelope-from slava.shwartsman@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 90639AA415; Thu, 8 Aug 2019 16:02:10 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9021CAA414 for ; Thu, 8 Aug 2019 16:02:10 +0000 (UTC) (envelope-from slava.shwartsman@gmail.com) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464Cmx5LFKz4VTM; Thu, 8 Aug 2019 16:02:09 +0000 (UTC) (envelope-from slava.shwartsman@gmail.com) Received: by mail-wr1-f65.google.com with SMTP id x1so45561147wrr.9; Thu, 08 Aug 2019 09:02:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=gFVUok3QUBDe8mCmVnpZulMXZwu7C+/Jf5shrdzJQRw=; b=LZ9cCssa2ZxT9NPsHHMEOCkt2ONafo3EjbWOvdvLQApQGFrwT7555jgtpF9INu8a11 L/5wWZqWPjTe0sxlMErnYEagoadm4O5yXr1+KhwqOb/xdak+7rb3YtDH/h0OZ2uhY42U A1UarhDTzotXS1zqT8FvXW5fRJzp6OvGRV5xpITABknJZbLxGm6obW+O5dtvDMHISQC3 csxKipVipf8cGl8qEIn+yvbP5UEUIS7Gw3reYnYParyYJli6GDRJB76i3MJosrjORCEV wHAyy8ZKFKPn7XnzxdOdmlQt5ZAWKiU524bhRovJucxTt3UkMn2Zjw7gp5HrVbMkzP83 1EYQ== X-Gm-Message-State: APjAAAWP9qv3Bb/U+HEziTwZrPe/yftf0SuAGrxkwtmJe7sI0D4z7E5B bHJGuQWJ6HgL02AqjP+DiRDaGw6B X-Google-Smtp-Source: APXvYqwcedYqMHOkl+D8Typ5LkwGawxD2tNE9Nunm/q8rdlVj3dmLl5cjbtgQeSH5l0T/DD03r/ujw== X-Received: by 2002:adf:9ece:: with SMTP id b14mr17792927wrf.192.1565280128190; Thu, 08 Aug 2019 09:02:08 -0700 (PDT) Received: from [10.223.3.125] ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id l17sm70381893wrr.94.2019.08.08.09.02.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Aug 2019 09:02:07 -0700 (PDT) Reply-To: slavash@FreeBSD.org Subject: Re: kernel module code coverage To: Michael Tuexen Cc: Alan Somers , current References: <24BDECBA-3E34-4FD9-AE82-DCDFFAEE7A81@freebsd.org> From: Slava Shwartsman Message-ID: Date: Thu, 8 Aug 2019 19:02:06 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <24BDECBA-3E34-4FD9-AE82-DCDFFAEE7A81@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 464Cmx5LFKz4VTM X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of slavashwartsman@gmail.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=slavashwartsman@gmail.com X-Spamd-Result: default: False [-6.08 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[slavash@FreeBSD.org]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; FORGED_SENDER(0.30)[slavash@FreeBSD.org,slavashwartsman@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[slavash@FreeBSD.org,slavashwartsman@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; IP_SCORE(-3.09)[ip: (-9.57), ipnet: 209.85.128.0/17(-3.39), asn: 15169(-2.43), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[65.221.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2019 16:02:10 -0000 On 08-Aug-19 18:14, Michael Tuexen wrote: >> On 8. Aug 2019, at 16:16, Slava Shwartsman wrote: >> >> >> >> On 08-Aug-19 16:52, Alan Somers wrote: >>> On Thu, Aug 8, 2019 at 7:42 AM Michael Tuexen wrote: >>>> >>>> >>>> >>>>> On 8. Aug 2019, at 14:24, Slava Shwartsman wrote: >>>>> >>>>> Apparently, Bullseye are dropping support for FreeBSD. >>>>> >>>>> We are looking for an alternative for kernel module run time analysis. >>>>> Mostly interested in code coverage (for now). >>>>> >>>>> Any suggestions that work for you? >>>> Have you looked into /dev/kcov. This is used by SYZKALLER for getting >>>> coverage information from the kernel. >>>> >> >> Thanks. >> Is there a man page for /dev/kcov? > I don't think so. There was no man page in the commit which introduced the feature: > https://svnweb.freebsd.org/base?view=revision&revision=342962 > > You might want to look at: > https://github.com/google/syzkaller/blob/master/tools/kcovtrace/kcovtrace.c > how to use it. > > Best regards > Michael >> >>>> Best regards >>>> Michael >>>>> >>>>> >>>>> Slava >>> That's part of Matt Macy's gcov project, right?. However, while it >>> works for the kernel itself, it doesn't work for modules. >> >> In worst case, I can build my module into the kernel, right? >> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239194 >>> -Alan >> >> >> Slava > Thanks Michael and Alan. Slava