From owner-freebsd-current@freebsd.org Thu Aug 8 15:14:15 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 7A875A92CE for ; Thu, 8 Aug 2019 15:14:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 464Bjg2jqTz4RfB for ; Thu, 8 Aug 2019 15:14:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 5CC0CA92CD; Thu, 8 Aug 2019 15:14:15 +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 5C8A5A92CA for ; Thu, 8 Aug 2019 15:14:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464Bjg0NGJz4Rf9; Thu, 8 Aug 2019 15:14:14 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2a02:8109:1140:c3d:74b3:4ddc:d2a0:1393] (unknown [IPv6:2a02:8109:1140:c3d:74b3:4ddc:d2a0:1393]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 7413471E3F908; Thu, 8 Aug 2019 17:14:10 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: kernel module code coverage From: Michael Tuexen In-Reply-To: Date: Thu, 8 Aug 2019 17:14:09 +0200 Cc: Alan Somers , current Content-Transfer-Encoding: quoted-printable Message-Id: <24BDECBA-3E34-4FD9-AE82-DCDFFAEE7A81@freebsd.org> References: To: "slavash@freebsd.org" X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 464Bjg0NGJz4Rf9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.88 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.89)[-0.894,0]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE]; NEURAL_HAM_LONG(-0.99)[-0.991,0] 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 15:14:15 -0000 > On 8. Aug 2019, at 16:16, Slava Shwartsman = wrote: >=20 >=20 >=20 > On 08-Aug-19 16:52, Alan Somers wrote: >> On Thu, Aug 8, 2019 at 7:42 AM Michael Tuexen = wrote: >>>=20 >>>=20 >>>=20 >>>> On 8. Aug 2019, at 14:24, Slava Shwartsman = wrote: >>>>=20 >>>> Apparently, Bullseye are dropping support for FreeBSD. >>>>=20 >>>> We are looking for an alternative for kernel module run time = analysis. >>>> Mostly interested in code coverage (for now). >>>>=20 >>>> Any suggestions that work for you? >>> Have you looked into /dev/kcov. This is used by SYZKALLER for = getting >>> coverage information from the kernel. >>>=20 >=20 > 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=3Drevision&revision=3D342962 You might want to look at: = https://github.com/google/syzkaller/blob/master/tools/kcovtrace/kcovtrace.= c how to use it. Best regards Michael >=20 >>> Best regards >>> Michael >>>>=20 >>>>=20 >>>> 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. >=20 > In worst case, I can build my module into the kernel, right? >=20 >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239194 >> -Alan >=20 >=20 > Slava